translation: Translation of DNA/RNA sequences

translationR Documentation

Translation of DNA/RNA sequences

Description

This function extends translate function to include letters that are frequently found in the DNA sequence databases to indicate missing information and are not part of the the DNA/RNA alphabet. Also, it is able to process sequences as just simple 'character' objects.

Usage

translation(x, ...)

## S4 method for signature 'character'
translation(
  x,
  genetic.code = getGeneticCode("1"),
  no.init.codon = FALSE,
  if.fuzzy.codon = "error"
)

## S4 method for signature 'BioString'
translation(
  x,
  genetic.code = getGeneticCode("1"),
  no.init.codon = FALSE,
  if.fuzzy.codon = "error"
)

Arguments

x

A character string or the same arguments given to function translate.

...

Not in use yet.

genetic.code

The same as in translate

no.init.codon, if.fuzzy.codon

Used only if 'x' is not a 'character' object. The same as in translate.

Details

If argument 'x' belong to any of the classes admitted by function translate, then this function is called to make the translation.

Value

The translated amino acid sequence.

Author(s)

Robersy Sanchez https://genomaths.com

See Also

translate

Examples

## Load a small DNA sequence alingment 
data("aln", package = "GenomAutomorphism")

translation(aln)

## Load a pairwise DNA sequence alingment of COVID-19 genomes
data("covid_aln", package = "GenomAutomorphism")

translation(covid_aln)

genomaths/GenomAutomorphism documentation built on Dec. 12, 2024, 2:12 p.m.