Learn R Programming

coil (version 1.2.4)

translate: Translate a coi5p sequence.

Description

Translate a coi5p sequence.

Usage

translate(x, ...)

# S3 method for coi5p translate(x, ..., trans_table = 0, frame_offset = 0)

Value

An object of class "coi5p"

Arguments

x

A coi5p class object for which frame() has been run.

...

Additional arguments to be passed between methods.

trans_table

The translation table to use for translating from nucleotides to amino acids. Default is 0, which indicates that censored translation should be performed. If the taxonomy of the sample is known, use the function which_trans_table() to determine the translation table to use.

frame_offset

The offset to the reading frame to be applied for translation. By default the offset is zero, so the first character in the framed sequence is considered the first nucleotide of the first codon. Passing frame_offset = 1 would offset the sequence by one and therefore make the second character in the framed sequence the first nucleotide of the first codon.

Details

The translate function allows for the translation of framed sequences from nucleotides to amino acids, both in instances when the correct genetic code corresponding to a sequence is known, and in instances when taxonomic information is unavailable or unreliable.

See Also

coi5p

frame

which_trans_table

Examples

Run this code
#previously run functions:
dat = coi5p(example_nt_string )
dat = frame(dat)
#translate when the translation table is not known:
dat = translate(dat)
#translate when the translation table is known:
dat = translate(dat, trans_table = 5)
#additional components in output coi5p object:
dat$aaSeq

Run the code above in your browser using DataLab