base2codon | R Documentation |
This function split a DNA sequence into a codon sequence.
base2codon(x, ...)
## S4 method for signature 'character'
base2codon(x)
## S4 method for signature 'DNAStringSet'
base2codon(x)
## S4 method for signature 'DNAMultipleAlignment'
base2codon(x)
x |
A character string, |
... |
Not in use. |
It is expected that the provided DNA sequence is multiple of 3, otherwise gaps are added to the end of the sequence.
If the argument of 'x' is character string, then a character vector
of codons will returned. If the argument of 'x' is
DNAStringSet-class
or
DNAMultipleAlignment-class
object, then a matrix
of codons is returned.
Robersy Sanchez https://genomaths.com. 01/15/2022
## Gaps are added at the sequence end.
seq <- c("ACCT")
base2codon(x = seq)
## This DNA sequence is multiple of 3
seq <- c("ACCTCA")
base2codon(x = seq)
## Load a DNAStringSet. A matrix of codons is returned
data("aln", package = "GenomAutomorphism")
base2codon(x = aln)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.