back_transcribe() Return the DNA sequence from an RNA sequence by creating a new Seq object
Returns a binary representation of this sequence.
Characters not in the alphabet (20 single letter amino acids and 4 nucleotide characters) or that are not a dash are ignored by default. This means that the array for these positions will be all zeros. Other characters will be included if added to the "additionalAcceptedCharacters" array parameter.
characters that should be considered valid and included in the return array.
a binary array that is a concatenation of each position's individual binary array: for proteins - each position is represented by a binary array of length 20 plus the number of additional characters (parameter). A single one of the indices will be one and the rest zero. for oligos - each position is represented by a binary array of length 4 plus the number of additional characters (parameter). A single one of the indices will be one and the rest zero. NOTE: the index that is set to 1 is arbitrary but will be consistent with each function call - it is set from indexing the strings in IUPACData: protein_letters, unambiguous_dna_letters and unambiguous_rna_letters
complement() Return the complement sequence by creating a new Seq object.
if true, will return the sequence reversed
a new sequence complemented from this sequence
Determine the alphabet of the sequence. If this.alphabet is already set, return it directly, otherwise attempt to predict the alphabet. Not perfect - for example if the sequence only has 'agc' then it returns DNA even though this would be a valid protein or RNA. Preference order is DNA, RNA, then protein. Only canonical nucleotides and protein sequences are evaluated (not ambiguous).
Test for equality between two sequences - case insensitive. this.ignoredCharacters are not evaluated in the equality comparison.
the sequence to compare this object to
true if the sequences and their alphabets are equal, false otherwise.
integerRepresentation Returns an integer representation of this sequence. Each index in the array represents a single position. ** The values have no meaning other than to check for equality in a custom hamming distance function. **
Characters not found will be represented as -1 in the returned array
characters to consider valid and add to give returned array.
reverse_complement() Return the reverse complement sequence by creating a new Seq object.
transcribe() Return the RNA sequence from a DNA sequence by creating a new Seq object
translate(table, stop_symbol='*', to_stop=False, cds=False, gap=None) Turn a nucleotide sequence into a protein sequence by creating a new Seq object TODO: implement "gap" parameter.
Generated using TypeDoc
SeqRecord This is a super class that provides additional annotation on top of the standard Seq class.
Inspired from BioPython SeqRecord.py: https://github.com/biopython/biopython/blob/master/Bio/SeqRecord.py which is under the BSD 3-Clause License