[Biopython-dev] SeqFeature's FeatureLocation for GenBank

Marc Colosimo mcolosimo at mitre.org
Wed Nov 2 14:01:49 EST 2005

I want to point out the very bizarre behavior of FeatureLocations when 
using GenBank.FeatureParser (well to me anyways).

  When I was testing out some code, I noticed that the start positions 
were 1 less that in the GenBank Record, but the end positions were 
correct. My first thought was that this must be a bug and such went 
looking for it. I soon gave up because I just don't have the time to 
understand all the code that is involved (I was going to file a bug 
report). So, I just added 1 to the start positions and went on to get 
the features from the DNA. Suddenly I now understand why the positions 
were like that: slicing!

Unless I missed something, I didn't see anything talking about this 
behavior. Is this consistent with other parsers? If so, I would suggest 
that this is included in the Cookbook and that the classes are modified 
so that when printed (__str__) reports 1 instead of 0 (basically +1). 
Also, it would be nice to be able to do things like location.start + 1 
instead of location.start.position + 1.


More information about the Biopython-dev mailing list