This function allows the user to input DNA or RNA sequences and acquire sequences of corresponding proteins, where correspondence is encoded in specified table.
[sq_dna_bsc
|| sq_rna_bsc
]
An object this function is applied to.
[integer(1)
]
The number of translation table used, as specified
here.
further arguments to be passed from or to other methods.
[character(1)
]
A string that is used to interpret and display NA
value in the
context of sq class
. Default value equals to
"!
".
An object of class sq
with ami_bsctype.
DNA and RNA sequences use combinations of three consecutive nucleic acids to encode one of 22 amino acids. This encoding is called "genetic code".
translate()
first splits passed DNA or RNA sequences into
three-letter chunks. Then searches the codon table for the entry where the
key is equal to the current chunk and the value is one letter that encodes
the corresponding protein. These resulting letters are then pasted into one
sequence for each input sequence.
Due to how the tables works, translate()
does not support inputting
sequences with extended alphabets, as ambiguous letters in most cases cannot
be translated into exactly one protein.
Moreover, this function raises an error whenever input sequence contain
either "-
" or NA
value.
remove_ambiguous
, substitute_letters
and
typify
for necessary actions before using translate()
Functions interpreting sq in biological context:
%has%()
,
complement()
,
find_motifs()