[Biopython] Fwd: Error while parsing bgk file

ning luwen bioinformaticsing at gmail.com
Fri Jul 20 03:41:20 UTC 2012


---------- Forwarded message ----------
From: Lenna Peterson <lennalenna at gmail.com>
Date: Thu, Jul 19, 2012 at 12:51 PM
Subject: Re: [Biopython] Error while parsing bgk file
To: ning luwen <bioinformaticsing at gmail.com>


On Wed, Jul 18, 2012 at 11:36 PM, ning luwen
<bioinformaticsing at gmail.com> wrote:
> Hi everyone,
>
> A error encountered when i parse a gbk file.
>
> the error message as follow:
>
> Traceback (most recent call last):
>   File "stat_refseq_gbs.py", line 10, in <module>
>     for seq in f:
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/SeqIO/__init__.py",
> line 537, in parse
>     for r in i:
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/GenBank/Scanner.py",
> line 445, in parse_records
>     record = self.parse(handle, do_features)
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/GenBank/Scanner.py",
> line 428, in parse
>     if self.feed(handle, consumer, do_features):
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/GenBank/Scanner.py",
> line 400, in feed
>     self._feed_feature_table(consumer, self.parse_features(skip=False))
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/GenBank/Scanner.py",
> line 350, in _feed_feature_table
>     consumer.location(location_string)
>   File "/media/disk2/bio/bin/lib/python2.7/site-packages/Bio/GenBank/__init__.py",
> line 970, in location
>     int(e),
> ValueError: invalid literal for int() with base 10: '68452073^68452074'
>
> the file parsed is ref_GRCh37.p5, the biopython version is 1.60, the
> lines cause the error may be:
>
>      V_segment       complement(68451760..68452073^68452074)
>      CDS             complement(<68451760..68452072^68452073)
>
> --
> regards,
> luwen ning
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython


Hi Luwen,

Thanks for reporting this problem. I've submitted a patch that should fix it.

https://github.com/biopython/biopython/pull/54

Lenna


-- 
regards,
luwen ning



More information about the Biopython mailing list