[bip] pygr: reload AnnotationDB

Brent Pedersen bpederse at gmail.com
Thu Mar 27 17:32:28 PDT 2008


ok. i'm almost to the point where i can do real work save a couple questions.
i want to have a gene's exons associated with the same name. i've
cribbed blindly from here:
http://bioinformatics.ucla.edu/forum/index.php?topic=67.0
to use PrefixUnionDict().
first, is this the recommended way to do this? guess i'll find out
soon enough if it scales large numbers of features....

second, at the end of the script linked below, the 2 last asserts fail
without a change to pygr source. in pygr/sequence.py
SeqPath.overlaps(), i had to comment out these lines:
        #if self.path is not p.path:
        #    return False
for the asserts to pass. but without that, features on different chrs
can overlap()

i also got it to pass with this, which at least checks that the chr's
are the same ...
   In [124]: b0.path.sequence.path is a3.path.sequence.path
   Out[124]: True
maybe this is because of the prefix dict and the solution is to do
something like
while hasattr(p, 'path'): p = p.path.sequence   ??

here's the pasted code.
http://pastebin.ca/960311

-brent



More information about the biology-in-python mailing list