Open cmungall opened 6 years ago
I favor option 1. Lends itself better to asyn calls to populate different parts of page etc
for /$type/
@kshefchek Do you mean something like this:
{
"taxon":{
"id":"NCBITaxon:9606",
"label":"Homo sapiens"
},
"xrefs":null,
"description":null,
"categories":[
"gene",
"sequence feature"
],
"types":null,
"synonyms":null,
"deprecated":null,
"replaced_by":null,
"consider":null,
"id":"HGNC:18603",
"label":"COL25A1".
"association_stats":{
"genotype_associations":0,
"phenotype_associations":10,
"interaction_associations":0,
"disease_associations":4,
"homology_associations":10,
}
}
yes exactly, we may also consider associations over homology (disease, phenotype) as well, but would require more computation. There might be a trade off on performance and comprehensiveness.
Even if its association stats, the number of queries to SciGraph and/or Solr remains the same. The difference is only in the way the results are parsed and sent back.
API is not consistent at the moment
Option 1
/$type/<id>
returns basic node properties (and potentially HAL-type links to other API calls)/$type/<id>/all
can be used to to fetch node + assocs if requiredOption 2
/$type/<id>
returns node + assocs/$type/<id>/info
returns basic node properties