Translate {GeneR}R Documentation

Translation from DNA trinucleotides to proteine

Description

Translation tools from DNA trinucleotides to proteine

Usage

translate (seqno, from = 1, to = 0, strand = 0, code = 0,
charcode = "") 
strTranslate (s, code = 0, charcode = "") 
showTable (code = 0, charcode = "") 

Arguments

seqno

Integer, sequence number (bufno)

s

Sequence as a character string

from,to

Begining and ending of sequence, can be vectors. 0 represent the last nucleotide and 1 the first one.

strand

0: forward, 1: reverse, can be a vector

code

One of the following standard code: 0, standard genetic code; 1 Vertebrate Mitochondrial Code; 2 Yeast Mitochondrial Code; 3 Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code; 4 Invertebrate Mitochondrial Code

charcode

A character string of size 64, like "FFLLSSSSYY**CC*WLLLL\-PPPPHH\-Q\-QRRRRII\-IMTTTTNNKKSS\-RRVVVVAAAADDEEGGGG" for translation code to use, in the order: TTT TTC TTA TTG TCT TCC TCA ... (for F F L L S S S). Use showTable to be sure!

Value

strTranslate

return a character string of the protein

translate

return a vector of character string of the protein

showTable

return the table of translation

All return -1 if error.

Note

Global value of strand has no effect on this function. (see globals, getParam, setStrand)

Examples

s<-"gtcatgcatgctaggtgacagttaaaatgcgtctaggtgacagtctaacaa"

# Simple usage:
strTranslate(s)
#[1] "VMHAR*QLKCV*VTV*Q"


# with buffers
placeString(s)
translate()
# the same...
#[1] "VMHAR*QLKCV*VTV*Q"

# with 2 positions
translate (from=c(1,2),to=c(0,0))
#[1] "VMHAR*QLKCV*VTV*Q" "SCMLGDS*NASR*QSN" 

# with 2 strands
translate (from=c(1,2,1),to=c(0,0,0),strand=c(0,0,1))
#[1] "VMHAR*QLKCV*VTV*Q" "SCMLGDS*NASR*QSN"  "LLDCHLDAF*LSPSMHD"

# With Invertebrate Mitochondrial Code
translate(code=4)
#[1] "VMHASWQLKCV*VTV*Q"

# With a personal code
translate(charcode="FFLLxxxxYY**CCwwLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRuuuuAAAADDEEGGGG")
#[1] "uMHARwQLKCu*uTu*Q"

# Show what is this code...
showTable(charcode="FFLLxxxxYY**CCwwLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRuuuuAAAADDEEGGGG")
#      [,1]  [,2]
# [1,] "UUU" "F" 
# [2,] "UUC" "F" 
# [3,] "UUA" "L" 
# [4,] "UUG" "L" 
# [5,] "UCU" "x" 
# [6,] "UCC" "x" 
# [7,] "UCA" "x" 
# ...

# Show Standard table:
showTable()

# Show  Invertebrate Mitochondrial Code
showTable(code=4)



[Package GeneR version 2.24.0 Index]