Start Codon in Translate() in R
1
0
Entering edit mode
5.7 years ago

Hi all, I wanted to use function translate() in R to translate a DNA to a protein. what I wrote is this :

DNA <- DNAString(dna_temp)
protein <- translate(DNA)

but in this code start codon is not defined, so it will start from the first letter and doesn't check if it is start codon or not. what should I do for checking this?

Thanks

R gene • 1.6k views
ADD COMMENT
0
Entering edit mode

Please provide minimal dataset for reproducibility please.

ADD REPLY
0
Entering edit mode
5.7 years ago

Try following, assuming that you know where start codon starts from @ khatami.mahshid

> library(Biostrings)
> seq.n=sample(DNA_BASES, 999, replace = TRUE, prob = c(0.4,0.1,0.1,0.4))
> test=DNAString("GATG")
> translate(test)
  1-letter "AAString" instance
seq: D
Warning message:
In .Call2("DNAStringSet_translate", x, skip_code, dna_codes[codon_alphabet],  :
  last base was ignored
> translate(subseq(test,2,))
  1-letter "AAString" instance
seq: M
>

in CATGstring, start codon ATG starts from 2nd letter, hence translate(subseq(test,2,))

ADD COMMENT

Login before adding your answer.

Traffic: 1733 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6