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

Fix dev /phenotype/info endpoint entities #571

Closed johnbradley closed 2 years ago

johnbradley commented 2 years ago

The dev.phenoscape.org/api/v2-beta API is returning an empty array for eqs.entities. Example of the problem with the dev v2-beta:

$ curl -X GET "https://dev.phenoscape.org/api/v2-beta/phenotype/info?iri=http%3A%2F%2Fpurl.org%2Fphenoscape%2Fexpression%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000051%253E%2Bsome%2B%250A%2B%2B%2B%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FPATO_0000140%253E%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0000052%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_2001223%253E%2529%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0002503%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0011618%253E%2529%2529&annotated_states_only=false" -H "accept: application/json" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1604  100  1604    0     0  12173      0 --:--:-- --:--:-- --:--:-- 12832
{
...
  "eqs": {
    "entities": [],
...

Example with the expected behavior using kb v2-beta:

$ curl -X GET "https://kb.phenoscape.org/api/v2-beta/phenotype/info?iri=http%3A%2F%2Fpurl.org%2Fphenoscape%2Fexpression%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000051%253E%2Bsome%2B%250A%2B%2B%2B%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FPATO_0000140%253E%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0000052%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_2001223%253E%2529%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0002503%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0011618%253E%2529%2529&annotated_states_only=false" -H "accept: application/json" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1603  100  1603    0     0   4237      0 --:--:-- --:--:-- --:--:--  4309
{
...
  "eqs": {
    "entities": [
      "http://purl.obolibrary.org/obo/UBERON_2001223"
    ],
...
}

The IRI used as input for /phenotype/info was created by passing http://purl.obolibrary.org/obo/UBERON_0011618 to /phenotype/query.

balhoff commented 2 years ago

This is the inadvertent result of removing one of the dosdp patterns from the pipeline build. I've put it back: https://github.com/phenoscape/pipeline/pull/223/files/09a19d53e43470f9b032063cf6f830c80cefb816..6d784fcdd63d357fd2057151812bf40bdc6e4816

Fixing this is pending a rebuild of the database.

johnbradley commented 2 years ago

Thanks @balhoff

balhoff commented 2 years ago

Should be fixed now.