monarch-initiative / monarch-ui

The previous version of the Monarch Initiative website
https://previous.monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
17 stars 28 forks source link

Put a tally of zero where there is no available data #332

Closed jmcmurry closed 3 years ago

jmcmurry commented 4 years ago

Eg. for here https://beta.monarchinitiative.org/gene/HGNC:17158#phenotype

kshefchek commented 4 years ago

this will require some updates to biolink, since different types will have different tabs, ie a phenotype page should not have a phenotype tab (at least for now). @deepakunni3 your thoughts?

deepakunni3 commented 4 years ago

@kshefchek So the API should provide counts even for categories with no association? This ought to be easy to implement.

How is this being rendered on the UI? Does it check for a category in the counts from the API and if count is >1 then renders the div for that category with the counts?

kshefchek commented 4 years ago

It looks that way glancing at https://github.com/monarch-initiative/monarch-ui/blob/master/src/views/Node.vue#L10

There is a flag for showing empty cards or not, I can test this out but suspect we will end up with too many empty tabs

kshefchek commented 4 years ago

diving in, this might already be supported by the UI code (although I wonder if this should be API driven as it seems like business logic), I should test this out before punting up to biolink

kshefchek commented 4 years ago

I removed the if statement here

if (count > 0) {
  nonEmptyCards.push(cardType);
}

But it does not look great (and no scrolling), @jmcmurry @deepakunni3 see https://kshefchek.github.io/monarch-ui/ (edit: link is now outdated)

deepakunni3 commented 4 years ago

Okay, I'll get the API to send zero counts.

https://kshefchek.github.io/monarch-ui/gene/HGNC:17158

Thats a lot of tabs with zeros. Maybe this is not ideal. Is there a better way of representing this? Perhaps grouping the categories with zeros?

kshefchek commented 4 years ago

I agree, maybe it's only worth to show 0s for specific tabs? Or have a note on the overview tabs (there are no phenotypes annotated to this gene, but we have x ortholog phenotypes by breakdown). Also not the legacy app did not show 0s https://legacy.monarchinitiative.org/gene/HGNC:17158

deepakunni3 commented 4 years ago

Maybe this isn't such a big issue and we can just close this ticket. The whole reason why this ticket was raised was because there was confusion when there was no tab for a particular category, even when the user expected it to be.

monicacecilia commented 4 years ago

Dear @deepakunni3 I think that the issue is actually critical. However, the problem is not whether there is a count of '0' or not.

In my opinion, the problem is that, in the absence of data, the call either hangs (it did the last time I tried, but not today), or no results are shown on the 'results' view, and the user is left to wonder whether this was intentional or there was an error.

See the example initially listed on the ticket, Screen Shot 2020-05-23 at 2 00 52 PM

So, the way I see it, a problem we could focus on addressing here is "what can we do to alert the user that there are no data of [this] kind associated with [this] entity?"

kshefchek commented 4 years ago

do we expect many users will type '#phenotype' into their URL bar when the phenotype tab is absent?

jmcmurry commented 3 years ago

I would flag this as low priority. That said, I don't think we need ALL of the categories with zero results, but for phenotypes we should zeros that is our bread and butter and what people will expect to see. Also, in the fullness of time, we will want users to be able to suggest new sources of data (or papers or phenopackets etc) for the gaps.

jen-martin commented 3 years ago

Will this simple fix do the trick? For phenotypes only, I print out the number of associations when there are zero or greater number of associations.

Or, should there be an additional statement as Moni suggested, e.g., "There are no phenotypes associated with this [gene]."?

image

pnrobinson commented 3 years ago

Maybe this was just recently updated, but this gene has an association https://www.omim.org/entry/615698

I think it is fine to just show "0 phenotype associations", people will understand it.

monicacecilia commented 3 years ago

:bowtie: brilliant!