monarch-initiative / biolink-api

API for linked biological knowledge
https://api.monarchinitiative.org/api/
BSD 3-Clause "New" or "Revised" License
63 stars 25 forks source link

Only results for genes and diseases? #160

Open lhannest opened 6 years ago

lhannest commented 6 years ago

All categories other than gene and disease return empty for the /api/search/entity endpoint: https://api.monarchinitiative.org/api/search/entity/e?start=1&category=variant&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=biological process&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=case&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=anatomical entity&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=phenotype&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=model&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=pathway&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=genotype&rows=1 https://api.monarchinitiative.org/api/search/entity/e?start=1&category=publication&rows=1

Isn't there supposed to be data for all of these categories?

>>> from ontobio.golr.golr_query import GolrSearchQuery, GolrAssociationQuery, M
>>> g = GolrAssociationQuery(
...             q='*:*',
...             facet_fields=[M.OBJECT_CATEGORY, M.SUBJECT_CATEGORY],
...             rows=0
...     )
>>> 
>>> g.exec()
{'pagination': {}, 'associations': [], 'facet_counts': {'object_category': {'model': 28859, 'pathway': 379034, 'gene': 17229197, 'biological process': 923729, 'variant': 8187413, 'genotype': 1444514, 'anatomical entity': 1453041, 'case': 29565, 'disease': 395830, 'phenotype': 7431814}, 'subject_category': {'model': 788530, 'publication': 14666456, 'pathway': 1087232, 'variant': 6588713, 'genotype': 1652914, 'case': 21749, 'gene': 12433539, 'disease': 263863}}}
kshefchek commented 6 years ago

@cmungall is this only connected to the monarch search? Then this seems accurate: https://github.com/SciGraph/golr-loader/blob/master/src/main/java/org/monarch/golr/SimpleLoader.java#L52 I'm planning on doing a test to add all entities to our search core.