Skip to content

Commit

Permalink
Handle EC.5.3.3.21 (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao authored Mar 7, 2022
1 parent 647e9dd commit 749c05c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions goatools/godag/obo_optional_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ def fnc_updaterec(rec, line):
if match:
s = match.group(1)
rec.xref.add(s.replace(" ", ""))
else: # occasionally just 'EC 2.7.1.190'
rec.xref.add(s.replace(" ", ":"))
else:
# occasionally just 'EC 2.7.1.190'
# or 'EC.5.3.3.21'
rec.xref.add(re.sub(r"^EC[ \.]", "EC:", s))

fnc_updaterec.cmpd = re.compile(r"^(\S+:\s*\S+)\b(.*)$")
return fnc_chkline, fnc_updaterec
Expand Down

0 comments on commit 749c05c

Please sign in to comment.