[Biopython-dev] Location Parser

Peter Cock p.j.a.cock at googlemail.com
Fri Dec 21 16:54:38 UTC 2012


On Fri, Dec 21, 2012 at 4:13 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> On Fri, Dec 21, 2012 at 3:53 PM, Matthias Bernt
> <bernt.matthias at gmail.com> wrote:
>> Dear Peter,
>>
>> its attached (from RefSeq39). For me parsing does not finish for this file
>> (biopython 1.6, python 2.7.3).
>>
>> Regards,
>> Matthias
>
> Got it, thanks. It also seems to get stuck for me too - there is a bug here :(
>
> See also: https://redmine.open-bio.org/issues/3197

The problem seems to be in the regular expression search itself getting stuck:

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.GenBank import _re_complex_compound
>>> _re_complex_compound.match("order(6867..6872,6882..6890,6906..6911,6918..6923,6930..6932,7002..7004,7047..7049,7056..7061,7068..7073,7077..7082,7086..7091,7098..7100,7119..7136,7146..7151,7158..7163,7170..7172,7179..7184,7212..7214,join(7224..7229,8194..8208),8218..8223,8245..8247,8401..8403)")
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyboardInterrupt

Odd.

Peter




More information about the Biopython-dev mailing list