[bip] Simple motif searching, and annotation visualization

Titus Brown titus at caltech.edu
Sat Dec 1 02:28:27 PST 2007


-> The stacking solution is done with pygr so it is quite fast and *should*
-> generalize to large sequences -- or at least large enough sequences that
-> you probably don't want to be motif searching them through the Web.  The
-> drawing code is also quite general and doesn't require you to be doing
-> motif searches; any sequence intervals can be displayed, in any color,
-> in either PNG or PDF form.  See code sample below, and attached files,
-> for another example.

So, speaking of pygr... this causes a segmentation fault:

---
from pygr import cnestedlist, seqdb

def create_annotation_map(annotations, sequence_db):
    map = cnestedlist.NLMSA('test', mode='memory', use_virtual_lpo=True)
    annotation_db = seqdb.AnnotationDB(annotations, sequence_db)

db = seqdb.BlastDB('example.fa')
create_annotation_map({}, db)
create_annotation_map({}, db)
---

Don't ask why I was trying to create empty annotation dbs... but
regardless it shouldn't core dump ;)

Also, is there any way to create an in-memory BlastDB equivalent?

Finally, I would appreciate comments from those who are algorithmically
inclined on the code to calculate annotation collisions, in

	pygr_draw/stack.py

from the .tar.gz file

        http://iorich.caltech.edu/~t/transfer/pygr-draw-dec1-2007.tar.gz

See 'test.py' for a few simple tests of its functionality.

thanks,
--titus



More information about the biology-in-python mailing list