Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dna2codon

Translate nucleic acid sequences into codons


Description

The function transforms dna2codon DNA sequences to codon sequences, codon2dna transform the other way.

Usage

dna2codon(x, codonstart = 1, code = 1, ambiguity = "---", ...)

codon2dna(x)

Arguments

x

An object containing sequences.

codonstart

an integer giving where to start the translation. This should be 1, 2, or 3, but larger values are accepted and have for effect to start the translation further within the sequence.

code

The ncbi genetic code number for translation (see details). By default the standard genetic code is used.

ambiguity

character for ambiguous character and no contrast is provided.

...

further arguments passed to or from other methods.

Details

The following genetic codes are described here. The number preceding each corresponds to the code argument.

1 standard
2 vertebrate.mitochondrial
3 yeast.mitochondrial
4 protozoan.mitochondrial+mycoplasma
5 invertebrate.mitochondrial
6 ciliate+dasycladaceal
9 echinoderm+flatworm.mitochondrial
10 euplotid
11 bacterial+plantplastid
12 alternativeyeast
13 ascidian.mitochondrial
14 alternativeflatworm.mitochondrial
15 blepharism
16 chlorophycean.mitochondrial
21 trematode.mitochondrial
22 scenedesmus.mitochondrial
23 thraustochytrium.mitochondria
24 Pterobranchia.mitochondrial
25 CandidateDivision.SR1+Gracilibacteria
26 Pachysolen.tannophilus

Alignment gaps are simply and base ambiguities are currently ignored and sites containing these are deleted.

Value

The functions return an object of class phyDat.

Author(s)

References

See Also

trans, phyDat and the chapter 4 in the vignette("phangorn-specials", package="phangorn")

Examples

data(Laurasiatherian)
class(Laurasiatherian)
Laurasiatherian
dna2codon(Laurasiatherian)

phangorn

Phylogenetic Reconstruction and Analysis

v2.7.0
GPL (>= 2)
Authors
Klaus Schliep [aut, cre] (<https://orcid.org/0000-0003-2941-0161>), Emmanuel Paradis [aut] (<https://orcid.org/0000-0003-3092-2199>), Leonardo de Oliveira Martins [aut] (<https://orcid.org/0000-0001-5247-1320>), Alastair Potts [aut], Tim W. White [aut], Cyrill Stachniss [ctb], Michelle Kendall [ctb], Keren Halabi [ctb], Richel Bilderbeek [ctb], Kristin Winchell [ctb], Liam Revell [ctb], Mike Gilchrist [ctb], Jeremy Beaulieu [ctb], Brian O'Meara [ctb], Long Qu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.