mutcleaner.core.alphabet#
Classes
|
Base class for biological alphabets |
|
By default, the DNA alphabet accepts the four standard bases A, C, G, and T. |
|
By default, the protein alphabet accepts the 20 standard amino acids and the stop symbol ( |
|
By default, the RNA alphabet accepts the four standard bases A, C, G, and U. |
- class mutcleaner.core.alphabet.BaseAlphabet(letters, name)[source]#
Bases:
ABCBase class for biological alphabets
Methods
get_invalid_chars(sequence)Get set of invalid characters in sequence
is_valid_char(char)Check if character is valid in this alphabet
is_valid_sequence(sequence)Check if entire sequence is valid
validate_sequence(sequence)Validate sequence and raise error if invalid
- class mutcleaner.core.alphabet.DNAAlphabet(include_ambiguous=False)[source]#
Bases:
BaseAlphabetBy default, the DNA alphabet accepts the four standard bases A, C, G, and T.
The alphabet can also include IUPAC ambiguity codes for positions where more than one base is possible.
- Parameters:
include_ambiguous (
bool) – Also accept the IUPAC ambiguity codes R, Y, S, W, K, M, B, D, H, V, and N.
Methods
get_invalid_chars(sequence)Get set of invalid characters in sequence
is_valid_char(char)Check if character is valid in this alphabet
is_valid_sequence(sequence)Check if entire sequence is valid
validate_sequence(sequence)Validate sequence and raise error if invalid
- class mutcleaner.core.alphabet.ProteinAlphabet(include_stop=True, include_ambiguous=False, include_sec_pyl=False)[source]#
Bases:
BaseAlphabetBy default, the protein alphabet accepts the 20 standard amino acids and the stop symbol (
*).The alphabet can also include selenocysteine and pyrrolysine, ambiguous residue symbols, or both.
- Parameters:
include_stop (
bool) – Accept the stop symbol (*).include_ambiguous (
bool) – Accept the ambiguous residue symbols B, Z, J, and X.include_sec_pyl (
bool) – Accept selenocysteine (U) and pyrrolysine (O).
Methods
get_invalid_chars(sequence)Get set of invalid characters in sequence
get_one_letter_code(three_letter[, strict])Convert three-letter to one-letter amino acid code
get_three_letter_code(one_letter[, strict])Convert one-letter to three-letter amino acid code
is_valid_char(char)Check if character is valid in this alphabet
is_valid_sequence(sequence)Check if entire sequence is valid
validate_sequence(sequence)Validate sequence and raise error if invalid
- class mutcleaner.core.alphabet.RNAAlphabet(include_ambiguous=False)[source]#
Bases:
BaseAlphabetBy default, the RNA alphabet accepts the four standard bases A, C, G, and U.
The alphabet can also include IUPAC ambiguity codes for positions where more than one base is possible.
- Parameters:
include_ambiguous (
bool) – Also accept the IUPAC ambiguity codes R, Y, S, W, K, M, B, D, H, V, and N.
Methods
get_invalid_chars(sequence)Get set of invalid characters in sequence
is_valid_char(char)Check if character is valid in this alphabet
is_valid_sequence(sequence)Check if entire sequence is valid
validate_sequence(sequence)Validate sequence and raise error if invalid