dna2codon | R Documentation |
Convert DNA to 3-base codons
dna2codon(x, ...)
x |
character vector assumed to contain DNA or RNA nucleotides |
... |
additional arguments are ignored. |
This function takes character string input, either as one large string or vector of strings such as those read from a FASTA file, and returns a vector of 3-base codons. The final codon must contain all three character values otherwise it is removed.
character vector where each element contains three characters,
e.g. all(nchar(dna2codon(x)) == 3)
.
Other jam codon usage functions:
codonUsage2df()
,
jamCai()
dna <- c("atgggattatag");
dna2codon(dna);
# example adding one extra base, which does not make a full codon
dnaext1 <- c("atgggattataga");
dna2codon(dnaext1);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.