Skip to content

Commit 302d7f7

Browse files
authored
Merge pull request #202 from Michael-C-Strobel/Massbank-Update
Allow lower case letters in Massbank identifiers.
2 parents 0355c37 + bd392cd commit 302d7f7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

metabolomics_spectrum_resolver/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def _parse_massbank(usi: str) -> Tuple[sus.MsmsSpectrum, str]:
416416
index = match.group(4)
417417
# Clean up the new MassBank accessions if necessary.
418418
massbank_accession = re.match(
419-
r"MSBNK-[A-Z0-9_]{1,32}-([A-Z0-9_]{1,64})", index
419+
r"MSBNK-[A-z0-9_]{1,32}-([A-Za-z0-9_]{1,64})", index
420420
)
421421
if massbank_accession is not None:
422422
index = massbank_accession.group(1)

test/usi_test_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"mzspec:GNPS:GNPS-LIBRARY:accession:CCMSLIB00005436077",
1111
"mzspec:MASSBANK::accession:SM858102",
1212
"mzspec:MASSBANK::accession:MSBNK-AAFC-AC000646",
13+
# New Massbank identifier with lowercase
14+
"mzspec:MASSBANK::accession:MSBNK-Athens_Univ-AU259904",
1315
"mzspec:MS2LDA:TASK-190:accession:270684",
1416
"mzspec:MOTIFDB::accession:171163",
1517
"mzspec:MSV000082791:(-)-epigallocatechin:scan:2",

0 commit comments

Comments
 (0)