From c1eccb247af72d7ba4f448d15dbd8fff5aa8207f Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 8 Jan 2024 10:35:42 +0100 Subject: [PATCH] Improve complexportal xrefs --- src/pyobo/sources/complexportal.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pyobo/sources/complexportal.py b/src/pyobo/sources/complexportal.py index 0a6d71bb..8512a0eb 100644 --- a/src/pyobo/sources/complexportal.py +++ b/src/pyobo/sources/complexportal.py @@ -82,8 +82,15 @@ def _parse_xrefs(s) -> List[Tuple[Reference, str]]: logger.warning("xref missing (: %s", xref) continue note = note.rstrip(")") + note.replace("rhea:rhea ", "rhea:") + note.replace("rhea:Rhea ", "rhea:") + note.replace("eccode::", "eccode:") + note.replace("eccode:EC:", "eccode:") + note.replace("eccode:RHEA:", "rhea:") if note.lower().startswith("rhea "): note = note[len("Rhea ") :] + if note.lower().startswith("rhea:rhea "): + note = note[len("rhea:rhea ") :] if note.lower().startswith("EC:"): note = note[len("EC:") :] try: