
Last chance! 50% off unlimited learning
Sale ends in
AlignTranslation(myXStringSet, sense = "+", direction = "5' to 3'", readingFrame = NA, asAAStringSet = FALSE, geneticCode = GENETIC_CODE, ...)
DNAStringSet
or RNAStringSet
object of unaligned sequences.
"+"
) coding strand or negative ("-"
) non-coding strand.
"5' to 3'"
or "3' to 5'"
.
myXStringSet
. The readingFrame
can be either 1
, 2
, 3
to begin translating on the first, second, and third nucleotide position, or NA
(the default) to guess the reading frame. (See details section below.)
AAStringSet
rather than the input type.
GENETIC_CODE
(the default), which represents the standard genetic code.
AlignSeqs
, including gapOpening
, gapExtension
, gapPower
, terminalGap
, restrict
, anchor
, normPower
, substitutionMatrix
, structureMatrix
, guideTree
, iterations
, refinements
, structures
, FUN
, and levels
.
XStringSet
matching the input type.
sense
, direction
, and readingFrame
. The resulting amino acid sequences are aligned using AlignSeqs
, and this alignment is reverse translated into the original sequence type, sense
, and direction
. Not only is alignment of protein sequences more accurate, but aligning translations will ensure that the reading frame is maintained in the nucleotide sequences.If the readingFrame
is NA
(the default) then an attempt is made to guess the reading frame of each sequence based on the number of stop codons in the translated amino acids. For each sequence, the first reading frame will be chosen (either 1
, 2
, or 3
) without stop codons, except in the last position. If the number of stop codons is inconclusive for a sequence then the reading frame will default to 1
. The entire length of each sequence is translated in spite of any stop codons identified. Note that this method is only constructive in circumstances where there is a substantially long coding sequence with at most a single stop codon expected in the final position, and therefore it is preferable to specify the reading frame of each sequence if it is known.
AlignDB
, AlignProfiles
, AlignSeqs
# first three sequences translate to MFITP*
# and the last sequence translates as MF-TP*
rna <- RNAStringSet(c("AUGUUCAUCACCCCCUAA", "AUGUUCAUAACUCCUUGA",
"AUGUUCAUUACACCGUAG", "AUGUUUACCCCAUAA"))
RNA <- AlignSeqs(rna, verbose=FALSE)
RNA
RNA <- AlignTranslation(rna, verbose=FALSE)
RNA
AA <- AlignTranslation(rna, asAAStringSet=TRUE, verbose=FALSE)
AA
# example of aligning many protein coding sequences:
fas <- system.file("extdata", "50S_ribosomal_protein_L2.fas", package="DECIPHER")
dna <- readDNAStringSet(fas)
DNA <- AlignTranslation(dna) # align the translation then reverse translate
DNA
Run the code above in your browser using DataLab