phenoscape / phenoscape-kb-services

Web services application for the Phenoscape RDF knowledgebase.
https://kb.phenoscape.org/apidocs/#/
MIT License
1 stars 3 forks source link

/term/labels fails to produce label for (some?) post-composed terms #199

Open hlapp opened 4 years ago

hlapp commented 4 years ago

I thought in general /term/labels can now produce labels for pregenerated post-composed terms too? The following one (http://purl.org/phenoscape/expression?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0010709%3E) fails:

curl -X GET "https://kb.phenoscape.org/api/term/labels?iris=%5B%22http%3A%2F%2Fpurl.org%2Fphenoscape%2Fexpression%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0010709%253E%22%5D" -H "accept: application/json"

Same result with /term/label.

However, the /term/classification endpoint does produce a label:

curl -X GET "https://kb.phenoscape.org/api/term/classification?iri=http%3A%2F%2Fpurl.org%2Fphenoscape%2Fexpression%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0010709%253E" -H "accept: application/json"
{
  "label": "part of some pelvic complex",
  "subClassOf": [],
  "equivalentTo": [],
  "superClassOf": [
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0010742",
      "label": "bone of pelvic complex"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0001464",
      "label": "hip"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0005609",
      "label": "iliac artery"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0014792",
      "label": "musculature of pelvic complex"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0004709",
      "label": "pelvic appendage"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0001271",
      "label": "pelvic girdle region"
    },
    {
      "@id": "http://purl.obolibrary.org/obo/UBERON_0012476",
      "label": "skeleton of pelvic complex"
    }
  ],
  "@id": "http://purl.org/phenoscape/expression?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000050%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0010709%3E"
}
hlapp commented 4 years ago

This issue is true for the pre-generated phenotype post-compositions as well (and for which /term/classification also does produce a label).

Shalsh23 commented 4 years ago

Refer #196 for relevant discussion.