Open ajo2995 opened 9 years ago
We can do homologs this way trivially using compara. We will need to await modifications to the gene collection for orthologs.
This is dependent on warelab/gramene-swagger#2
I think this doesn't require changes to gramene-swagger. see my comment on warelab/gramene-swagger#2
Solr's graph query parser plugin lets you expand the search results using a field. For example, this query for a TIM domain annotated on 290 genes can be expanded to all 583 genes with an id from the homologyall_orthologs field. http://devdata.gramene.org/v50/search?q={!graph+from=homology__all_orthologs+to=id+maxDepth=1}domainsancestors:4217 The maxDepth=1 parameter might not have any effect here because orthology relationships are symmetric, right?
We can add a filter query param to get the 293 orthologs without the domain of interest. http://devdata.gramene.org/v50/search?q={!graph+from=homology__all_orthologs+to=id+maxDepth=1}domains__ancestors:4217&fq=-domains__ancestors:4217
It will probably be necessary to combine all current filters defining the result set into a single query preserving all the boolean logic in order to make this work for more complex sets of filters.
A user should be able to convert a search for genes into a search for orthologs of a result set. This can be done by faceting on the epl_gene_tree field and then rewriting the query as a disjunction of the gene trees.