-
Notifications
You must be signed in to change notification settings - Fork 1
Mismatch between LUI pattern and URL pattern for MGI #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately, the "Prefix embedded in LUI" flag is quite confusing. Which is why we try not to use it when possible. It is mostly only used for validation. Internally, the rewritter still splits the id and the prefix. Is the prefix duplication happening to you? It doesn't seem to be the case for these two examples: |
Ah. We're not trying to use the API to resolve the identifier like that. Instead, the ID that we store in our database has the prefix attached, e.g. |
I see the issue. Unfortunately, it is how it is implemented and we are not able to put the time to work on this now. You will have to handle this on your side. I can leave this thread open to see how many would be interested in changing this behaviour. I remember this was brought up before. |
I understand. I'm not sure we need a change in behaviour though, just an update to the URL patterns for the MGD resource. For example, changing |
Then the resolved URL would be invalid. For example, http://identifiers.org/MGI:1858201 would resolve to http://www.informatics.jax.org/accession/1858201. |
OK, so the ID is taken as I'll mark this issue as closed but just to point out that it still feels like there's an inconsistency for MGI between the values of Thanks for your help. |
Just to be a bit more clear, only the numerical ID is taken when rewriting the URL to redirect the user. The prefix embedded in LUI only affects when verifying the request against the LUI pattern. This is likely to correct rewrite URLs for some namespaces. Although, I quickly looked but couldn't find an example for you. You are right, it's a weird inconsistency with HGNC.I would say I can't have both working in the same way since the prefix is optional for HGNC. What we should probably do HGNC is remove the prefix from the regex since it accepts URIs like http://identifiers.org/hgnc:hgnc:2674 but I don't know if the intention was to allow things like http://identifiers.org/hgnc:HGNC:2674; which is weird in of itself. |
There seems to be a mismatch between the LUI pattern for MGI (
^MGI:\d+$
) and the URL patterns (e.g.http://www.informatics.jax.org/accession/MGI:{$id}
) for the Mouse Genome Database resources.The LUI definition includes the prefix in the regex, and "Prefix embedded in LUI" is set to "yes", suggesting that IDs should contain the prefix, e.g.
MGI:1858201
. We're therefore storing the ID with the prefix attached but when we insert that into the URL pattern it causes a duplication of the prefix:http://www.informatics.jax.org/accession/MGI:MGI:1858201
.I think the URL patterns for the three MGD resources need to be updated to remove the prefix.
The text was updated successfully, but these errors were encountered: