Skip to content
Permalink
Browse files
feat: adds iupac amino acid alpha (#444)
  • Loading branch information
tshauck committed Sep 21, 2021
1 parent c038f94 commit f4b7a7c
Showing 1 changed file with 10 additions and 0 deletions.
@@ -21,6 +21,11 @@ pub fn alphabet() -> Alphabet {
Alphabet::new(&b"ARNDCEQGHILKMFPSTWYVarndceqghilkmfpstwyv"[..])
}

/// Returns the IUPAC amino acid alphabet.
pub fn iupac_alphabet() -> Alphabet {
Alphabet::new(b"ABCDEFGHIKLMNPQRSTVWXYZabcdefghiklmnpqrstvwxyz")
}

#[cfg(test)]
mod tests {
use super::*;
@@ -44,4 +49,9 @@ mod tests {
fn number_is_no_word() {
assert!(!alphabet().is_word(b"42"));
}

#[test]
fn iupac_contains_iupac_chars() {
assert!(iupac_alphabet().is_word(b"XMN"));
}
}

0 comments on commit f4b7a7c

Please sign in to comment.