Molecular types#
The MolType object provides services for resolving ambiguities, or providing the correct ambiguity for recoding. It also maintains the mappings between different kinds of alphabets, sequences and alignments.
If your analysis involves handling ambiguous states, or translation via a genetic code, it’s critical to specify the appropriate moltype.
Available molecular types#
For statements that have a moltype argument, use the entry under the “Abbreviation” column. For example:
Getting a MolType#
Using a MolType to get ambiguity codes#
Just using dna from above.
Nucleic acid MolType and complementing#
Making sequences#
Use the either the top level cogent3.make_seq function, or the method on the MolType instance.
Verify sequences#
Making a custom MolType#
We demonstrate this by customising DNA so it allows a . as a gap character.