identifiers-org / identifiers-org.github.io

MIT License
8 stars 1 forks source link

Description of CABRI prefix to be corrected #162

Closed pdmr closed 1 year ago

pdmr commented 3 years ago

Hello.

I'm writing you with reference to the record related to the CABRI system in Identifiers.org. I'm in charge of the maintainance of the CABRI system since 2000, now under responsibility of the Ospedale Policlinico San Martino of Genoa, Italy.

I noticed that the redirection does not work. However, the link that is returned as failing is correct: if you copy and paste it, it works. Please, get in touch with me in order to resolve this issue.

Also, the description of the CABRI system is partially wrong. Please let me know how I can amend it. The ROR id of the Hospital is https://ror.org/04d7es448 (already included in Identifiers.org for the cldb prefix).

Many anticipated thanks. Paolo Romano

hHermjakob commented 3 years ago

I suspect the problem is due to the complex identifier pattern. TBD.

mbdebian commented 3 years ago

As @hHermjakob mentioned, this error is probably due to the blank space present in the CABRI accession, e.g. 'dsmz_mutz-id:ACC 291'.

Accessions are usually not allowed to use characters like blank spaces, we try to avoid dependencies with URL encoding mechanisms, as they open the door to any kind of arbitrary information to be encoded in the accession, making their interoperable URLs to complex to deal with, and more opaque to the users.

In this case, when requesting the resolution to identifiers.org API curl -i 'https://resolver.api.identifiers.org/cabri:dsmz_mutz-id:ACC%20291' I had to encode the blank space, and the response from the resolution service is correct, almost completely:

{
  "apiVersion": "1.0",
  "errorMessage": null,
  "payload": {
    "resolvedResources": [{
      "id": 769,
      "mirId": "MIR:00100334",
      "providerCode": "CURATOR_REVIEW",
      "compactIdentifierResolvedUrl": "http://www.cabri.org/CABRI/srs-bin/wgetz?-e+-page+EntryPage+[dsmz_mutz-id:ACC 291]",
      "description": "CABRI Cell Lines catalogue in Genova (SRS)",
      "institution": {
        "id": 768,
        "name": "National Cancer Research Institute of Genova, Genova",
        "homeUrl": "CURATOR_REVIEW",
        "description": "CURATOR_REVIEW",
        "location": {
          "countryCode": "IT",
          "countryName": "Italy"
        }
      },
      "location": {
        "countryCode": "IT",
        "countryName": "Italy"
      },
      "official": true,
      "resourceHomeUrl": "http://www.cabri.org/",
      "recommendation": {
        "recommendationIndex": 65,
        "recommendationExplanation": "Function based recommendation"
      },
      "namespacePrefix": "cabri",
      "deprecatedNamespace": false,
      "namespaceDeprecationDate": null,
      "deprecatedResource": false,
      "resourceDeprecationDate": null
    }, {
      "id": 771,
      "mirId": "MIR:00100335",
      "providerCode": "CURATOR_REVIEW",
      "compactIdentifierResolvedUrl": "http://www.be.cabri.org/CABRI/srs-bin/wgetz?-e+-page+EntryPage+[dsmz_mutz-id:ACC 291]",
      "description": "CABRI Cell Lines catalogue in Brussels (SRS)",
      "institution": {
        "id": 770,
        "name": "BCCM",
        "homeUrl": "http://bccm.belspo.be/",
        "description": "he BCCM consortium has grown to become one of the most important culture collections in the world, both in terms of the size and quality of the collections (bacteria, yeasts, moulds, plasmids, diatoms, DNA libraries) and its expertise. Not only does the consortium keep more than 200,000 quality controlled, characterised and documented units of biological material, but it also offers its expertise through services and partnership projects.",
        "location": {
          "countryCode": "BE",
          "countryName": "Belgium"
        }
      },
      "location": {
        "countryCode": "BE",
        "countryName": "Belgium"
      },
      "official": false,
      "resourceHomeUrl": "http://www.be.cabri.org/",
      "recommendation": {
        "recommendationIndex": 5,
        "recommendationExplanation": "Function based recommendation"
      },
      "namespacePrefix": "cabri",
      "deprecatedNamespace": false,
      "namespaceDeprecationDate": null,
      "deprecatedResource": false,
      "resourceDeprecationDate": null
    }],
    "parsedCompactIdentifier": {
      "providerCode": null,
      "namespace": "cabri",
      "localId": "dsmz_mutz-id:ACC 291",
      "rawRequest": "cabri:dsmz_mutz-id:ACC 291",
      "namespaceEmbeddedInLui": false,
      "deprecatedNamespace": false,
      "namespaceDeprecationDate": null
    }
  }
}

It has been recognized as a compact identifier, and correctly split between the prefix and the locally unique identifier (accession).

But, when the resolver at https://identifiers.org reads the information, selects the appropriate provider, and prepares the redirection response (HTTP 302), it flags an error when setting the location URL 'http://www.cabri.org/CABRI/srs-bin/wgetz?-e+-page+EntryPage+[dsmz_mutz-id:ACC 291]', because special characters like the blank space, are not expected, and the URL is not being encoded before being set in the response to the client.

I suggest a review of the backend side for the resolution services web fronted at this repository for a possible fix.

Kind regards, Manuel