monarch-initiative / phenogrid

The phenogrid widget
13 stars 14 forks source link

Handle the case when there are no matches #229

Closed jnguyenx closed 8 years ago

jnguyenx commented 8 years ago

Currently this phenotype is unknown from owlsim, thus there are no gene matches.

Phenogrid should display a message like "No gene matches this phenotype".

http://stage.monarchinitiative.org/gene/WormBase:WBGene00004898

yuanzhou commented 8 years ago

I went to beta and production server and tested this gene page. Both have the compare tab disabled by default.

http://beta.monarchinitiative.org/gene/WormBase:WBGene00004898

capture

While the staging server shows a different look of the page, the compare tab is enabled.

http://stage.monarchinitiative.org/gene/WormBase:WBGene00004898

capture2

jnguyenx commented 8 years ago

So I checked with Kent, and beta was pointing to the the production servers, that's why the behavior was different. He switched it to the beta servers to make things consistent.

Now we can see the same errors on both beta and stage.

yuanzhou commented 8 years ago

Thanks, I'll get this fixed and add some messages for users.

yuanzhou commented 8 years ago

@harryhoch just wanted to give you a heads up and also get your comments on this. After some digging, I realized that this issue brings up a good time to refactor the message reporting mechanism in Phenogrid. There are three types of message reporting:

  1. Regular simsearch. We need to notify the users if no matches found for each species. This is what this issue suggested and we don't have this implemented since we've always assumed that the regular simsearch will return some matches.
  2. Compare API. For example when we use analyze phenotypes to get matches with a list of phenotypes and a list of genes, I've added message reporting if there's no matches for that "compare" type (equivalent to a species name). And the reason I added this was because I noticed cases that no matches returned by providing random gene IDs.
  3. Genotype expansion. There are two types of message I added for this special usage. One for no associated genotypes since not every gene has its associated genotypes. The other for no matches between the genotype list and phenotype list. And both are presented via the jquery-ui dialog popup due to genotypes get expanded via the tooltip link, not the initial data loading phase.

Based on these three different types of messages, I think we should merge 1 and 2 to create a message array that contains no matches information for each species, including the "compare" mode. And display the message directly in SVG container (especially when multiple instances are rendered in on page). Type 3 will stay no change and message gets delivered via the popup dialog.

Please let me know if you have any concerns or suggestions.

harryhoch commented 8 years ago

@yuanzhou, Sounds good. Please try to make these messages as configurable as possible. Ideally, they should be taken from values in the configuration JSON whenever possible.

thanks.

yuanzhou commented 8 years ago

This issue has been addressed in PR #231 by adding a messaging reporting handling to Phenogrid.