Chris et al.,

I'd like to add a generic way to retrieve specific translated frames
from DNA sequence objects.  A rough prototype is available here:

http://github.com/ctb/pygr/commit/6968e89657b5a0980b0cb1c67bb01cadea3bdef9

which lets you do this:

---
import pygr

from pygr.seqdb import SequenceFileDB
db = SequenceFileDB('tests/data/gapping.fa')

seq = db['gapped']
print repr(seq)
print repr(seq.translation(1)), seq.translation(1)
print repr(seq.translation(1)), seq.translation(1)
print repr(seq.translation(2)), seq.translation(2)
print repr(seq.translation(3)), seq.translation(3)
---

which prints out

---
gapped[0:74]
annot0[0:24] MVHLTDAEKAAVSDAPVGKGELR*
annot0[0:24] MVHLTDAEKAAVSDAPVGKGELR*
annot1[0:23] WCT*LMLRRLLSLMRLWGKVNSD
annot2[0:23] GAPD*C*EGCCL*CACGER*TPM
---

Does this seem like a good addition?  It will dramatically simplify some
things for me in blast.py, which is the main reason I'm thinking of it
now.

Note that the prototype code doesn't handle negative frames or slices
properly.  Help with the latter would be appreciated ;)

thanks,
--titus
-- 
C. Titus Brown, [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to