legumeinfo / legumemine

An InterMine which contains multiple legumes
GNU Lesser General Public License v3.0
0 stars 0 forks source link

include organism.shortName as a search facet #19

Closed adf-ncgr closed 5 years ago

adf-ncgr commented 6 years ago

to be consistent with the other mines and enable inclusion in the cross-mine drupal search widget that Vivek is developing.

adf-ncgr commented 6 years ago

Hi again; something a little weird I just noticed related to this issue, though not sure if it is on legumemine end or with @vivekkrish code. The original issue was filed because when I searched for "circadian" using his widget, I got Gene results back from legumemine but the species from legumemine were not showing up in the organism.shortName facet; however, I just noticed that if I search for keyword gene and restrict to object type Gene, not only do I get all species represented, but the counts seem much larger than they ought to be (even considering that some species might be getting gene count x 2 due to representation from both legumemine and species-specific mine). Here's what I see in that case; maybe @vivekkrish will be able to reproduce on his end and say more about what could be causing it:

image

vivekkrish commented 6 years ago

Hi @adf-ncgr,

As a test, after running some queries against individual mines, it seems that the facet organism.shortName is associated with only a subset of feature types; e.g. "*Gene", "mRNA", "Protein", "TentativeConsensus" to name a few. Basically, any Class in the data model that has a direct reference to Organism, will/should have this facet.

However, it seems that this isn't consistent (e.g. Genes and QTL in LegumeMine have references to Organism, but does not appear in facets).

Now, regarding the "gene" query: what this seems to be doing is returning any feature that has the word gene in the description or feature type. Thus, in the case of any given mine, it will contain genes of the primary organism (e.g. SoyMine has Soybean genes) as well as those from related organisms (e.g. SoyMine has homologous genes in Medicago and other organisms).

This is the reason for the inflated feature counts!

sammyjava commented 6 years ago

@vivekkrish I don't get whether this is something I can fix under webapp, or whether this appears to be a bug in core InterMine. Point me in the right direction if you can! I've never dealt (knowingly) with the search results facets.

sammyjava commented 5 years ago

Is this still an issue? That can be fixed?

adf-ncgr commented 5 years ago

It looks like it is fixed, insofar as I actually remember what I thought the problem was at the time.