[Biojava-l] Genbank parsing problem

Matthew Pocock matthew_pocock@yahoo.co.uk
Tue, 30 Apr 2002 16:11:09 +0100


Hi Simon,

I think I've been bitten by something like this in SwissProt files 
(initiation at 0?). I'll have a dig arround in the simple feature 
constructor and see if it is handling fuzzies correctly.

Matthew

Simon Foote wrote:
> I've recently run across a problem with parsing of Genbank files 
> containing unbounded locations.
> Anyone have any idea what's causing it.  I tried to trace it back 
> through but got lost.  But I think it has to do with the single <1 for 
> the -35_signal as shown in the example.
> 
> Thanks,
> Simon Foote
> 
> example:  accession M28521
> ...
> FEATURES             Location/Qualifiers
>     source          1..1136
>                     /organism="Staphylococcus aureus"
>                     /strain="RN4220"
>                     /db_xref="taxon:1280"
>     gene            <1..1126
>                     /gene="entD"
>     -35_signal      <1
>                     /gene="entD"
> ...
> 
> It throws the following errors:
> 
> java.lang.reflect.InvocationTargetException
>        at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown 
> Source)
>        at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
> 
>        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>        at 
> org.biojava.bio.seq.SimpleFeatureRealizer$TemplateImpl.realize(SimpleFeatureRealizer.java:138) 
> 
>        at 
> org.biojava.bio.seq.SimpleFeatureRealizer.realizeFeature(SimpleFeatureRealizer.java:94) 
> 
>        at 
> org.biojava.bio.seq.impl.SimpleSequence.realizeFeature(SimpleSequence.java:194) 
> 
>        at 
> org.biojava.bio.seq.impl.SimpleSequence.createFeature(SimpleSequence.java:200) 
> 
>        at 
> org.biojava.bio.seq.io.SequenceBuilderBase.makeSequence(SequenceBuilderBase.java:157) 
> 
>        at 
> org.biojava.bio.seq.io.SimpleSequenceBuilder.makeSequence(SimpleSequenceBuilder.java:83) 
> 
>        at 
> org.biojava.bio.seq.io.SequenceBuilderFilter.makeSequence(SequenceBuilderFilter.java:98) 
> 
>        at 
> org.biojava.bio.seq.io.StreamReader.nextSequence(StreamReader.java:101)
>        at GenbankToFaa.runProteinParser(GenbankToFaa.java:85)
>        at ParseGenbank.main(ParseGenbank.java:84)
> Caused by: java.lang.IllegalArgumentException: Location [<1] is outside 
> 1..1136
>        at 
> org.biojava.bio.seq.impl.SimpleFeature.<init>(SimpleFeature.java:282)
>        at 
> org.biojava.bio.seq.impl.SimpleStrandedFeature.<init>(SimpleStrandedFeature.java:73) 
> 
>        ... 13 more
> rethrown as org.biojava.bio.BioException: Couldn't realize feature
>        at 
> org.biojava.bio.seq.SimpleFeatureRealizer$TemplateImpl.realize(SimpleFeatureRealizer.java:140) 
> 
>        at 
> org.biojava.bio.seq.SimpleFeatureRealizer.realizeFeature(SimpleFeatureRealizer.java:94) 
> 
>        at 
> org.biojava.bio.seq.impl.SimpleSequence.realizeFeature(SimpleSequence.java:194) 
> 
>        at 
> org.biojava.bio.seq.impl.SimpleSequence.createFeature(SimpleSequence.java:200) 
> 
>        at 
> org.biojava.bio.seq.io.SequenceBuilderBase.makeSequence(SequenceBuilderBase.java:157) 
> 
> rethrown as org.biojava.bio.BioError: Couldn't create feature
>        at 
> org.biojava.bio.seq.io.SequenceBuilderBase.makeSequence(SequenceBuilderBase.java:163) 
> 
>        at 
> org.biojava.bio.seq.io.SimpleSequenceBuilder.makeSequence(SimpleSequenceBuilder.java:83) 
> 
>        at 
> org.biojava.bio.seq.io.SequenceBuilderFilter.makeSequence(SequenceBuilderFilter.java:98) 
> 
>        at 
> org.biojava.bio.seq.io.StreamReader.nextSequence(StreamReader.java:101)
>        at GenbankToFaa.runProteinParser(GenbankToFaa.java:85)
>        at ParseGenbank.main(ParseGenbank.java:84)
>