Learn R Programming

coil (version 1.0.0)

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)

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 the first nucleotide of the first codon.

Value

an object of class "coi5p"

See Also

coi5p

frame

which_trans_table

Examples

Run this code
# NOT RUN {
#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