[Biopython-dev] [Bug 2965] Updating Bio.Restriction with latest REBASE data

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Dec 8 17:02:42 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2965





------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2009-12-08 12:02 EST -------
To be more precise, running Bio/Restriction/Restriction.py in IDLE and looking
at the stack track, the regular expression failing is for enzyme CviKI-1,

(?P<CviKI-1>[AG]GC[CT])|(?P<CviKI-1_as>[AG]GC[CT])

The problem seems to be the hyphen/minus sign in the enzyme name which is
being used as a group name in the regular expression. I think this is the
only Enzyme with this name. Since it can't be used as a python name either,
we should probably map it to an underscore:

>>> import re
>>> re.compile('(?P<CviKI\-1>[AG]GC[CT])|(?P<CviKI\-1_as>[AG]GC[CT])')
...
error: bad character in group name
>>> re.compile('(?P<CviKI_1>[AG]GC[CT])|(?P<CviKI_1_as>[AG]GC[CT])')
<_sre.SRE_Pattern object at 0xe8d700>


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list