Skip to content

Fix BDSC resolution normalization for resolver - #42

Open
ADiglet wants to merge 1 commit into
SciCrunch:masterfrom
ADiglet:fix-bdsc-resolution
Open

Fix BDSC resolution normalization for resolver#42
ADiglet wants to merge 1 commit into
SciCrunch:masterfrom
ADiglet:fix-bdsc-resolution

Conversation

@ADiglet

@ADiglet ADiglet commented Apr 15, 2026

Copy link
Copy Markdown

This PR fixes BDSC identifier normalization in SciBot resolver calls.

Previously, BDSC identifiers matched in the form BDSC:XXXX could be passed to the resolver as RRID:BDSC:XXXX, which led to unresolved results.

This change normalizes BDSC matches to RRID:BDSC_XXXX for resolver submission.

@tgbugs

tgbugs commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

This should already be handled in the code here

scibot/scibot/extract.py

Lines 328 to 335 in 45a4f51

# third round for BDSC
regex3 = '(.{0,32})(BDSC|BL|Bl|Bloomington)(\s?)(stock)?(\s)?(#|no|no\.)?(\s?)([0-9]{2,10})([^\w].{0,31})'
matches3 = re.findall(regex3, text)
for prefix, a, b, c, d, e, f, nums, suffix in matches3:
if nums in ['17', '21']:
# special case to avoid false positives
continue
yield prefix, f'RRID:BDSC_{nums.strip()}', f'{a}{b}{c}{d}{e}{f}{nums}', suffix
. That is where I would make the fix, the current location of the fix is bad and inserts specific logic in a place where there should not be any, it could cause any number of issues.

@tgbugs

tgbugs commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Looking at this again, the logic for switching (or not switching) the separator based on whether ag (the adgene separator pattern match) is present is bad. If the BDSC match is happening in that code and not in the third round then it needs a more extensive rework to handle the special cases where a double : is allowed for legacy reasons (e.g. IMSR_JAX:) and otherwise normalize to _, since iirc we already retain the exact original RRID ... we do need to track that these were normalized somewhere though ... I think it is the difference between the exact and the RRID: tag iirc in which case we should be ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants