Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Cool Results Page #63

Merged
merged 59 commits into from
Mar 2, 2021
Merged

WIP: Cool Results Page #63

merged 59 commits into from
Mar 2, 2021

Conversation

dhakim87
Copy link
Contributor

@dhakim87 dhakim87 commented Dec 9, 2020

Work In Progress, don't merge this yet!

Skeleton for new results page with events linked, showing where to fire off ajax requests and what to call to update controls. I need to know what words to put on each of the four tabs, what kind of plot(s) to show in that tab, and what urls to hit on public api to grab the data for that tab.

@dhakim87
Copy link
Contributor Author

dhakim87 commented Dec 9, 2020

Screen Shot 2020-12-08 at 7 31 26 PM

@wasade
Copy link
Member

wasade commented Dec 9, 2020

Thanks, @dhakim87! This is looking pretty good. I had some follow up with our comms team, and they were suggesting opening with some fairly high level text like the stuff below. Some of which may require some additional bits on the public API (cc @gwarmstrong), like the rare/unique bit, which is part of what I'm trying to knock out this week.

I'll email the mockups of the other pages, which are at the moment mostly just the content from the current results page with the exception of taxa ranks and some more user-guided bits on the existing alpha diversity plot.

@gwarmstrong, with the nearest neighbors piece, I think right now we could do some basic text stuff like this (i.e., the person you're most similar to is XXX years old, and eats sugary sweets with YYY frequency) but I think under the diversity similarities section. I'll summarize a bit more on slack today. It would be advantageous for the nearest neighbors bits to be dataset aware, so that we could (for example) depict what mammal someone is most similar too.

{% if has_unique_genera %}
Your {{ SAMPLE_TYPE }} sample was _super_ interesting! Out of {{ LARGE_NUMBER_OF_PEOPLE }} people we’ve sequenced in the {{ COUNTRY_OF_RESIDENCE }}, you’re the only one with {{ UNIQUE_GENERA }} microbes!” 
{% else %}
Your {{ SAMPLE_TYPE }} sample was _super_ interesting! Out of {{ LARGE_NUMBER_OF_PEOPLE }} people we’ve sequenced in the {COUNTRY_OF_RESIDENCE}, you’re one of only {{ PEOPLE_WITH_GENERA }} people with {{ RARE_GENERA}} microbes!” 
{% endif %}

Research has shown microbiomes are more unique than our genomes — if you an identical twin, you do not have an identical microbiome [HREF -> LEY TWINS WORK]! Your sample is helping us to unravel this enormous diversity, and to better understand what it means in relation to health and lifestyle factors. 

For your results, we’ve compiled information about how diverse your sample is [LINK TO YOUR SAMPLE DIVERSITY], and ways you can compare yourself to others. We’ve also assessed how similar your microbiome is to {{ TOTAL_NUMBER_OF_SAMPLES }} other samples, which you can explore interactively [LINK Diversity similarities]. And last, but not least, we’ve applied cutting edge computational algorithms to assess what types of microbes are on your sample [LINK TO TAXONOMY]. 

Have fun exploring, and please make sure to check back as we’re continuing to expand on what we can say about your sample!


init = function(){
// TODO: Should data type options be determined by ajax call or
// passed into jinja2 template?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably ajax as this is coming from the public api. If a sample was only subject to one data type, then the pulldown shouldn't be selected

"16s"
);

// TODO: Should dataset options be determined by ajax call or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably ajax as this information is coming from the public api

@gwarmstrong
Copy link
Member

nearest neighbors bits to be dataset aware

AFAIK the neighbors endpoint is dataset aware GET ​/dataset​/{dataset}​/diversity​/beta​/{beta_metric}​/nearest

so that we could (for example) depict what mammal someone is most similar to

This seems like a slightly different problem than the neighbors endpoint supports. The neighbors endpoint currently supports "get the k most similar samples to a given sample in a given dataset", which is just a sort on the distance matrix column/row.

For the mammals bit, it seems we may want an additional feature that supports "get the k most similar samples in this dataset that meet a certain criteria", which is different because it would also involve searching for samples that meet the criteria.

@wasade
Copy link
Member

wasade commented Dec 9, 2020

Correct, although it doesn't need to be expressed as a search but instead a filter prior to sorting. We need to expand slightly to support overall nearest neighbors, and a restricted nearest neighbors

@gwarmstrong
Copy link
Member

Correct, although it doesn't need to be expressed as a search but instead a filter prior to sorting. We need to expand slightly to support overall nearest neighbors, and a restricted nearest neighbors

Moved to new issue: biocore/microsetta-public-api#74

@wasade
Copy link
Member

wasade commented Dec 9, 2020 via email

dhakim87 and others added 21 commits December 9, 2020 13:56
…:none to display:block. We now trigger a resize event on the window when the emperor tab is selected, which emperor links to determine canvas sizing in openGL.
… Fixed missing column headers on taxonomy table
…unds for jquery event handling while Emperor is loading in
WIP: How you compare tab of cool results
dhakim87 and others added 29 commits January 4, 2021 17:35
… then prevented emperor from being reloaded later
…ould also show a tooltip saying why, but waiting on popper inclusion in another branch
@wasade wasade merged commit c5780d3 into master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants