Description Usage Arguments Details See Also Examples
GetCodonPhase determines the best translated amino acid sequence from a consensus DNA alignment by identifying the codon phase that produces the fewest number of stop codons. translate from the seqinr package is used to determine the positions of the stop codons in the consensus alignment in all three forward and three reverse codon phases, for a total of six codon phases.
| 1 | GetCodonPhase(DNA.seq, numcode = 1, NAstring = "X", ambiguous = FALSE)
 | 
|  | Vector of the consensus alignment of a DNA sequence. | 
|  | The NCBI genetic code number used for translation. By default, the standard genetic code (1) is used. See NCBI Genetic Code website for more details: http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=t | 
|  | How to treat the translation of amino acids when there are ambiguous bases in codons. | 
|  | Indicate whether ambiguous bases are considered. Set as FALSE as a default. | 
|  | In case of multiple equally good phases, return all (TRUE, the default) or just one at random. | 
numStopCodons integer list of the total number of stop codons in each of the six codon phases. 
stopCodonPositions character list of the beginning position for every stop codon found within each of the six codon phases. 
translation vector of the amino acid sequence from the codon phase with the fewest number of stop codons.
translate in seqinr package
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: 
malMfile <- system.file("sequences/malM.fasta", package = "seqinr")
malMseq <- read.fasta(malMfile)
# DNA sequence is stored under the 
malMtest <- GetCodonPhase(as.character(malMseq[[1]]))
### Example using multiple sequences, and then creating a consensus alignment
fastaf <- system.file("sequences/Anouk.fasta", package = "seqinr")
sample.fasta <- read.alignment(file = system.file("sequences/Anouk.fasta", package = "seqinr"), format = "fasta")
# Get consensus
Anouk <- consensus(sample.fasta, method = "majority")
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.