[BioPython] Biopython added to course syllabus

KELLEY SCOTT T kelleys@ucsu.colorado.edu
Thu, 6 Dec 2001 09:45:39 -0700 (MST)


Hi Jeff and Brad,

Sorry for the delay - I wanted to get the error right. A friend of mine
gets the same error trying to parse different genbank files so I think it
a very general problem with the new Bio/Genbank/__init__.py

This is what he wrote me (BTW, the code I wrote to make a dictionary of
intron information, namely:

self.Intron_data[feature.qualifiers["gene"]] = intron_data

works just fine with the old __init__.py)

-------------------
Hi Scott,

1)  I only changed the __init__.py file, but not
the genbank_formater.py (I guess you meant genbank_format.py) file. Do I
have to change the genbank_format.py also? The file that gives error is
attached. The code used here works with the earlier version of __init__.py

And the error is:

(beagle)[2:16pm]myexamples>>python gb_int_ex_gc_content.py
short_test_file.gb
filename: short_test_file.gb
Traceback (most recent call last):
  File "gb_int_ex_gc_content.py", line 27, in ?
    intron_sequences = gb_parser.get_introns(filename)
  File "GenBank_Parser.py", line 106, in get_introns
    self.Intron_data[feature.qualifiers["gene"]] = intron_data
TypeError: unhashable type


[He also wanted to know if you know of any way to directly
reverse_complement sequences uing the seq objects with Biopython. It is
easy to write a script but if it is available...]

2) By the way, although I could use the my_seq.reverse() function to
reverse the orientation of a MutableSeq object, I could not find a
function to get complement (or better reverse_complement). May be you
know, else could you ask those guys?

----------------------

Thanks for any help you can send my way! -Scott

P.S. I love the idea of a generic application framework - I really wanted
something like this for python and biopython. I set my brother a goal of
creating one - he is a professional python programmer who works with a lot
of pyGTK GUI's. I am interested to see what your result is too!  Yes, a
very merry X-mas with all the Biopython presents!

On Thu, 6 Dec 2001, Brad Chapman wrote:

> Hi Scott and Jeff!
>
> Scott:
> > > I thought you might be interested to know about a course
> > > I am co-teaching in the Spring here at the University of
> > > Colorado that includes Biopython.
>
> Great! This is very exciting to hear. I for one found be very interested
> in hearing how this turns out. Hopefully biopython stands up okay!
>
> Scott:
> > > I've had trouble with the Genbank parser
> > > lately with certain Genbank files. I tried downloading
> > > fixes from the CVS but I get another error. After swapping
> > > the Genbank __init__.py and genbank_format.py I try to use
> > > it and get the error:  unhashable type. Has anyone else out
> > > there experienced the same problem?
>
> Hmmm, no. Do you get this on every record or just specific ones? As Jeff
> said, if you can send an example file that causes it, with the full
> python traceback, I may be able to fix the problem. I've done a lot of
> work on the GenBank parser since the last release, so I very well could
> have mucked something up. It's been known to happen :-)
>
> Jeff:
> > Thanks for reminding me -- it's probably time for a new
> > release.  So yes, there will definitely be a release before the end of
> > the year.
>
> Cool. I'm almost done with the semester (one more paper to write,
> whew!) and should have time to help with this after early next week.
> I've got some new things I'd like to try to get in -- the biggest one
> being a generic framework for running Applications, like I blathered
> about earlier. I'll try to get this together for submission next week so
> people can look at it.
>
> Man-this-grad-school-thing-really-gets-in-the-way-of-programming-ly
> yr's,
> Brad
>