[Biopython-dev] GenBank bug, oriT feature missing

Marc Colosimo mcolosimo at mitre.org
Sat Feb 28 22:03:08 EST 2004


Thanks, it works on that case now. I'll look to see where you added that 
so that if I run into another unknown tag I can add it.

raising an UnknownFeature exception would be nice. But from what little 
I know about how it parses, how could you re-enter parsing? Maybe 
creating a different FeatureParser to handle unknown features 
(WeakFeatureParser, maybe?)

Marc

Peter Bienstman wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>That would be a good solution. As a short term fix however, I've added the 
>oriT tag to genbank_format.py in CVS.
>
>Peter
>
>On Saturday 28 February 2004 00:55, Iddo Friedberg wrote:
>  
>
>>I agree that these things should be handeled better. How about raising
>>an UnknownFeature exception, which is not silenced by default. The user
>>can then decide whether the parser should trap & silence such an
>>exception when it occurs.
>>
>>./I
>>
>>Marc Colosimo wrote:
>>    
>>
>>>Hi,
>>>
>>>I've just spent a good part of a day trying to understand what was going
>>>wrong and I think I finally know. Here is the problem:
>>>
>>>I was getting this exception for reading in a GenBank file (from
>>>genbank):
>>>
>>>"/usr/lib/python2.2/site-packages/_xmlplus/sax/handler.py", line 38, in
>>>fatalError
>>>    raise exception
>>>Martel.Parser.ParserPositionException: error parsing at or beyond
>>>character 1981
>>>
>>>After digging into the GenBank code (__init.py__) and then into Martel's
>>>code. I found I could turn on debugging:
>>>
>>>GenBank.FeatureParser(debug_level=2)
>>>
>>>I finally see where things die (and what character 1981 means).
>>>
>>>for AE000070 there is a  feature tag "oriT", which seems to be missing
>>>from genbank_record.py and __init__.py
>>>
>>>     oriT            81..92
>>>                     /note="region including origin of transfer (oriT)
>>>almost
>>>                     identical to oriT regions of plasmids from the
>>>'Q-group'"
>>>                     /evidence=not_experimental
>>>
>>>This really isn't a pretty way of dealing with unknown features. Is
>>>there a way to get this to just pass unknown features?
>>>
>>>Thanks,
>>>
>>>Marc
>>>
>>>      
>>>





More information about the Biopython-dev mailing list