[Biopython-dev] translate

Peter biopython-dev at maubp.freeserve.co.uk
Tue Oct 9 11:54:29 UTC 2007


mhobbs_of_lawson wrote:
> Hi,
> 
> Please can someone tell me what is wrong here.  I simply want to be able to translate ambiguous DNA which includes an 'NNN' triplet.

A very reasonable request.  I assume you expect just an X for an NNN codon?

I have the general impression that some of Biopython's handling of 
ambiguous sequences isn't all wonderful... something I have started to 
tackle in bug 2356:

http://bugzilla.open-bio.org/show_bug.cgi?id=2366

Obviously sequence manipulation is a core bit of functionality - and I 
would like at least one other person to comment on that code before I 
risk committing it ;)

Translation of ambiguous codons would be next on my hit list... as right 
now it doesn't seem to do what I would expect at all.

In the short term, manually adding additional mappings to the forward 
table (a python dictionary) would probably "fix" your specific issue.

While we are on this topic, we use "*" for stop codons and "X" for an 
ambiguous amino acid - but is anyone aware of a character convention for 
something that might be either a stop codon or an amino acid? (other 
than just using "X" for this too)?

Peter




More information about the Biopython-dev mailing list