Skip to content

Fix UniProt regular expression - #1943

Open
cthoyt wants to merge 2 commits into
mainfrom
uniprot-regex
Open

Fix UniProt regular expression#1943
cthoyt wants to merge 2 commits into
mainfrom
uniprot-regex

Conversation

@cthoyt

@cthoyt cthoyt commented May 5, 2026

Copy link
Copy Markdown
Member

Identifiers.org appeared to have added many extra parts to the uniprot namespace to cover uniprot.chain and uniprot.isoform - these are explicitly different semantic spaces, despite being "derived" from the parent protein's identifier, so they shouldn't validate under uniprot

@bgyori

bgyori commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

I think we should do this since the identifiers.org pattern is not valid in this setting. Worth noting that UniProt also declares their own "official" pattern at https://www.uniprot.org/help/accession_numbers which is currently showing

[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}

which I think we could adopt (adding ^ and $ which is not part of the original). The proposed pattern here has a few issues like [A-Z, 0-9] (has a literal comma and space character) should be [A-Z0-9], and we'd want to add one more set of parentheses around the pattern before adding the ^ and $ around it.

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