fn lookup(mono: u8) -> Result<usize> {
        if mono >= 127 {
            Err(Error::InvalidMonomer { mono })
        } else {
            let idx = Self::LK[mono as usize];
            if idx == INVALID_MONO {
                Err(Error::InvalidMonomer { mono })
            } else {
                Ok(idx as usize)
            }
        }
    }
/// Returns the index of given monomer in the scores matrix using the lookup table `LK`
/// # Arguments
/// * `mono` - monomer, eg, b'A' for DNA or b'R' for protein
/// # Errors
/// * `Error::InvalidMonomer(mono)` - `mono` wasn't found in the lookup table
Returns the index of given monomer in the scores matrix using the lookup table `LK`
Returns the index of given monomer in the scores matrix using the lookup table ` LK `
fn lookup(mono: u8) -> Result<usize> {
        if mono >= 127 {
            Err(Error::InvalidMonomer { mono })
        } else {
            let idx = Self::LK[mono as usize];
            if idx == INVALID_MONO {
                Err(Error::InvalidMonomer { mono })
            } else {
                Ok(idx as usize)
            }
        }
    }
fn lookup ( mono : u8 ) -> Result < usize > { if mono >= 127 { Err ( Error :: InvalidMonomer { mono } ) } else { let idx = Self :: LK [ mono as usize ] ; if idx == INVALID_MONO { Err ( Error :: InvalidMonomer { mono } ) } else { Ok ( idx as usize ) } } }
Returns the index of given monomer in the scores matrix using the lookup table `LK`
Returns the index of given monomer in the scores matrix using the lookup table ` LK `
mono
u8
mono
u8
errors
`Error::InvalidMonomer(mono)` - `mono` wasn't found in the lookup table
` Error :: InvalidMonomer ( mono ) ` - ` mono ` wasn ' t found in the lookup table