[Biopython-dev] [Bug 2381] translate and transcibe methods for the Seq object (in Bio.Seq)

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Oct 19 16:02:55 UTC 2008


------- Comment #19 from mmokrejs at ribosome.natur.cuni.cz  2008-10-19 12:02 EST -------
(In reply to comment #18)

> e.g. As I wrote in comment 17,
> > I'm thinking we could also support "start" and "end" optional arguments 
> > (named
> > after those used in the python string methods, and behaving in the same way)
> > for specifying a sub-sequence to be translated.  Using start=0, 1 or 2 would
> > give the three forward reading frames.
> This would give an alternative to:
> my_seq[i:j].translate(table)
> as:
> my_seq.translate(table, start=i, end=j)
> As with the python string methods, potentially the implementation could be
> slightly faster as a new Seq object doesn't need to be created for the slice. 
> On the other hand, it does then offer two ways of doing the same thing.

The second approach would be I think often handy.

> > An optional boolean argument could enable treating the sequence as a CDS -
> > verifying it starts with a start codon (which would always be translated as M)
> > and verifying it ends with a stop codon (with no other stop codons in frame),
> > which would not be translated.  Following BioPerl, this argument could be
> > called "complete".

The "complete" is a cryptic naming, I wouldn't be fond of it. I think everybody
would rather him/herself rather check is a.startswith('M') and a.endswith('*')
instead. But, what would be useful is a.find_orf(offset=0).

> Related to this, it would be useful to have a boolean option to stop
> translation at the first in frame stop codon (possible argument names for this
> include "stop" if not used as above, "to_stop", "auto_stop", "terminate" etc).

Yes, find_orf(offset) with default offset=0.

I hope there always will be a way to get translate whole NA sequence into prot
residues in a desired frame so one could inspect the positions of various STOP
codons, etc.

Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the Biopython-dev mailing list