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

Creating the mutation frequency heatmap for the query review screen #89

Open
dhimmel opened this issue May 26, 2017 · 1 comment
Open

Comments

@dhimmel
Copy link
Member

dhimmel commented May 26, 2017

For the query review screen, we'd like to have a heatmap showing the frequency of each mutation for each disease type. You can see what these heatmaps will look like in this notebook.

@bdolly so you can get started implementing this, you will need the following two things:

  1. the vega-lite specification here. You will override the data attribute for the query specific data.
  2. the input data for vega-lite. You can see an example here. This data should must be passed to the vega-lite spec. Ultimately the frontend will compute these mutation frequencies based on the selected mutations and disease types.

This example here corresponds to many genes and disease types. I'd expect most heatmaps to be smaller (have fewer rows & columns).

@dhimmel
Copy link
Member Author

dhimmel commented May 30, 2017

where is this data getting generated from? Is there a core-services endpoint that will deliver that to the front-end?

In the example above, the notebook generated that JSON. However, the goal is to generate this data in the frontend (or if neccessary via the backend). The idea is that the vega-lite specification will stay the same, but the frontend will update the data whenever the user selection changes.

I believe the frontend has all the necessary info to calculate these frequencies. For example:

"data": {
  "values": [
  {
    "disease": "adrenocortical cancer",
    "frequency": 0.01282051282051282,
    "gene_symbol": "AJUBA"
  },

To calculate the above value, the frontend would have to know all the sample_ids with adrenocortical cancer and all the sample_ids with AJUBA mutations. Then frequency equals the number of sample_ids with adrenocortical cancer and AJUBA mutation divided by the number of sample_ids with adrenocortical cancer.

@bdolly what is your opinion on whether this calculation should be done in the front or backend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants