Skip to content

Commit

Permalink
Override MIRIAM OBI pattern (#143)
Browse files Browse the repository at this point in the history
There are OBI entries with 8 numbers - MIRIAM's regex is wrong.
  • Loading branch information
cthoyt authored Aug 14, 2023
1 parent 92ec677 commit c22fe46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/biomappings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def check_valid_prefix_id(prefix: str, identifier: str):
raise InvalidNormIdentifier(prefix, identifier, norm_id)
if prefix == "pr":
pattern = None # identifiers.org is broken for uniprot in PR
elif prefix == "obi":
pattern = re.compile(r"^OBI:\d{7,8}$") # identifiers.org is broken for OBI
else:
pattern = re.compile(resource.miriam["pattern"])

Expand Down

0 comments on commit c22fe46

Please sign in to comment.