5
$\begingroup$

I want to convert a list of fasta ( protein sequences) in a .text file into corresponding nucleotide sequences. A Google search gives me result of DNA to protein conversion but not vice versa. Also, I came across How do I find the nucleotide sequence of a protein using Biopython?, but this is what I am not looking for. Is there any possible way to do it using python.Moreover, I would like to solve it using python programming. I am sure there must be some way to do it rather than writing a code from scratch. Thanks!

$\endgroup$
5
$\begingroup$

Although there is not a unique nucleotide sequence that translates to a given protein, one can list all the possible DNA sequences that do translate to that protein.

An online tool that does just that is Backtranambig, from EMBOSS. It produces a DNA sequence representing all the nucleotide sequences matching the input protein, using IUPAC ambiguity codes.

$\endgroup$
2
$\begingroup$

DNA Chisel (written in Python) can reverse translate a protein sequence:

import dnachisel
from dnachisel.biotools import reverse_translate

record = dnachisel.load_record("seq.fa")
reverse_translate(str(record.seq))
# GGTCATATTTTAAAAATGTTTCCT
$\endgroup$
1
$\begingroup$

You can't do this because there is redundancy in the genetic code and the same protein sequences can be encoded by different nucleotide sequences. There are 64 codons and ~20 amino acids, e.g. GCT, GCC, GCA and GCG all encode Alanine.

$\endgroup$
  • $\begingroup$ For the sake of the programming exercise, one could use IUPAC ambiguity codes to reflect the set of possible codons for a given amino-acid. $\endgroup$ – bli Feb 9 '20 at 10:33
  • $\begingroup$ @bli Agreed, one could even build a model to predict the underlying codons since there is codon usage bias. For practical purposes I'd do a TBLASTN against NT or similar $\endgroup$ – Chris_Rands Feb 9 '20 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.