monarch-initiative / phenogrid

The phenogrid widget
13 stars 14 forks source link

need to add the unmatched phenotypes #158

Closed davism84 closed 9 years ago

davism84 commented 9 years ago

unmatched list functionality needs restored in refact-md version

yuanzhou commented 9 years ago

Right now in the master and release branch (they have the same code base) the unmatched list only returns the phenotype IDs, sometimes monarch-app's phenotype_list.json doesn't return all the unmatched labels. So we are using chainable ajax aysnc calls for each phenotype to grab the label. This results many HTTP round-trips. Maybe we need to create a new API to accept a bunch of phenotypes in one ajax call and return all the labels.

yuanzhou commented 9 years ago

From Harry:

The real point is that we can do a single monarch-app call or a SciGraph call to get the label for a single phenotype, but we’d like to get multiple labels for phenogrid with only one call from the client.

There are at least two ways to do this: (a) to add a call to SciGraph, or (b) to add a call to monarch-app to do the loop call. The question really boils down to whether either would be preferred, or if some other option is better…

yuanzhou commented 9 years ago

See here for more discussions: https://github.com/monarch-initiative/monarch-app/issues/935

yuanzhou commented 9 years ago

Added unmatched sources, buggy, will also play with the display.

yuanzhou commented 9 years ago

@harryhoch @davism84 Question:

After some debugging with unmatched phenotypes, I still feel the async ajax calls to grab the labels are not solid, because even if we append those labels to html in the ajax callback, it still may take longer sometimes to show up those labels after users click the unmatched phenotypes button. Unless we show a loading spinner-like image to tell users to wait.

Would it be an alternative if we simply display all the unmatched phenotype IDs? I believe many times not everyone has a clear understanding of what those labels mean. They still need to click the ID link to look up more info. Similar to genes, those gene names/labels are not more meaningful than IDs.

harryhoch commented 9 years ago

@yuanzhou

  1. how long are we talking about?
  2. Are we getting the labels back from the original call? I had thought that Kent was adding this functionality back in?
  3. Would it be too hard to add a spinner?

I really don't like the idea of the IDs - too low-level and not particularly usable...

yuanzhou commented 9 years ago

Thanks @harryhoch Kent only added the labels back to phenotypes_list.json for monarch-app, when running phenogrid separately, we still need to go grab the labels. I've put the formatting labels in ajax callbacks, works better than the former version. Now I'll just wait until someone added those labels in the simsearch result.

yuanzhou commented 9 years ago

Added and merged Unmatched Phenotypes in PR #172

capture

capture2

Will make the "Unmatched Sources" wording configurable later. Will also create another new issue for possible bugs related unmatched phenotypes.