\name{Translate} \alias{translate} \alias{strTranslate} \alias{showTable} \title{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{ \item{seqno}{Integer, sequence number (bufno)} \item{s}{Sequence as a character string} \item{from,to}{Begining and ending of sequence, can be vectors. 0 represent the last nucleotide and 1 the first one. } \item{strand}{0: forward, 1: reverse, can be a vector} \item{code}{One of the following standard code: \code{0}, standard genetic code; \code{1} Vertebrate Mitochondrial Code; \code{2} Yeast Mitochondrial Code; \code{3} Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code; \code{4} Invertebrate Mitochondrial Code} \item{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 \dots (for F F L L S S S). Use showTable to be sure! } } \value{ \item{strTranslate}{return a character string of the protein} \item{translate}{return a vector of character string of the protein} \item{showTable}{return the table of translation} All return -1 if error. } \note{Global value of strand has no effect on this function. (see \code{\link{globals}}, \code{\link{getParam}}, \code{\link{setStrand}})} \keyword{utilities} %\seealso{\code{\link{multiExtract}}} \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) }