varfish-org / viguno

Versatile Interface for Genetics Utilization of Nice Ontologies
Apache License 2.0
0 stars 0 forks source link

omim text-search always returns empty results #160

Closed stolpeo closed 2 months ago

stolpeo commented 3 months ago

Describe the bug It appears that the search for OMIM terms can be performed by name, but it returns an empty list although a result is to be expected.

To Reproduce

curl "localhost:8000/proxy/varfish/viguno/hpo/omims?omim_id=616145"
{
  "version": {
    "hpo": "2023-06-06",
    "viguno": "0.2.1"
  },
  "query": {
    "omim_id": "616145",
    "name": null,
    "match_": null,
    "max_results": 100,
    "hpo_terms": false
  },
  "result": [
    {
      "omim_id": "OMIM:616145",
      "name": "Catel-Manzke syndrome"
    }
  ]
}
curl "localhost:8000/proxy/varfish/viguno/hpo/omims?name=catel"
{
  "version": {
    "hpo": "2023-06-06",
    "viguno": "0.2.1"
  },
  "query": {
    "omim_id": null,
    "name": "catel",
    "match_": null,
    "max_results": 100,
    "hpo_terms": false
  },
  "result": []
}

Expected behavior The full-text search for omim names should return a result if available, in the example above the Catel-Manzke Syndrome.

stolpeo commented 3 months ago

Parameter match= can be used with options prefix|suffix|exact. Search is case-sensitive. Full-text HPO search on the other hand does not require a match= parameter and is case-insensitive.

curl "localhost:8000/proxy/varfish/viguno/hpo/omims?name=Catel&match=prefix"
{
  "version": {
    "hpo": "2023-06-06",
    "viguno": "0.2.1"
  },
  "query": {
    "omim_id": null,
    "name": "Catel",
    "match_": "prefix",
    "max_results": 100,
    "hpo_terms": false
  },
  "result": [
    {
      "omim_id": "OMIM:616145",
      "name": "Catel-Manzke syndrome"
    }
  ]
}
holtgrewe commented 2 months ago

Will be fixed by #172 which allows case insensitive search:

image