Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Keyword searches? #15

Open
lhannest opened this issue Aug 29, 2018 · 0 comments
Open

Keyword searches? #15

lhannest opened this issue Aug 29, 2018 · 0 comments

Comments

@lhannest
Copy link

lhannest commented Aug 29, 2018

It looks like there are a number of bioentities designated for names:
http://biothings.io/explorer/api/v2/metadata/bioentities

But if I try this: http://biothings.io/explorer/api/v2/crawler?input_type=disease-name&input_value=diabetes
I get an exception:

Traceback (most recent call last):
  File "/home/ubuntu/opt/devpy3/lib/python3.5/site-packages/tornado/web.py", line 1509, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/ubuntu/opt/biothings_explorer_web/src/handlers/entitycrawler.py", line 308, in get
    results = exploreinput(input_type, input_value)
  File "/home/ubuntu/opt/biothings_explorer_web/src/handlers/entitycrawler.py", line 160, in exploreinput
    synonyms = IDConverter().find_synonym(input_value, input_type)
  File "/home/ubuntu/opt/biothings_explorer_web/src/biothings_explorer/id_converter.py", line 89, in find_synonym
    return self.find_disease_synonym(input_value, input_type)
  File "/home/ubuntu/opt/biothings_explorer_web/src/biothings_explorer/id_converter.py", line 176, in find_disease_synonym
    params = self.mydisease_params_template.replace('{input_value}', str(input_value)).replace('{input_type}', MYDISEASE_URI2SCOPE[input_type])
KeyError: 'disease-name'

I haven't tried all the name and description bioentity types, but of all the ones I tried this error has been thrown.

The knowledge map has this entry:

{
   "subject":{
      "semantic_type":"disease",
      "prefix":"disease-name"
   },
   "endpoint":"https://pharos.nih.gov/idg/api/v1/diseases/search",
   "object":{
      "semantic_type":"disease",
      "prefix":"pharos.disease"
   },
   "predicate":"EquivalentAssociation"
}

When going to that endpoint I do get data back: https://pharos.nih.gov/idg/api/v1/diseases/search?q=diabetes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant