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

(Treatment Response) Should we use color range from light to dark for oncoprint tracks where pivot threshold doesn't exist or pivot threshold out of range? #8004

Closed
dippindots opened this issue Oct 26, 2020 · 3 comments
Assignees

Comments

@dippindots
Copy link
Member

dippindots commented Oct 26, 2020

This is a follow up discussion of cBioPortal/cbioportal-frontend#3465.
Should we use color range from light to dark for oncoprint tracks where pivot threshold doesn't exist or pivot threshold out of range? Currently, we treat Treatment Response type as a special type and allow it use color range from dark to light, but is it possible or reasonable to merge this with other types?

For example, Treatment IC50 will be affected by this change, just curious that for this case (in the following screenshot), should we use color from light to dark for the range from 0 - 100?
image

In the above case, pivot threshold is set as 0.000001 and data range has not include this value, so this is a case which pivot threshold out of range. Currently, the color range for it is from dark to light.

For other cases which pivot threshold is valid and in data range, it will not change anything.

CC: @pvannierop please feel free to comment on this ticket.

@pvannierop
Copy link
Contributor

pvannierop commented Oct 27, 2020

@dippindots The value represented by the pivot threshold should be represented by white. The colors more extreme relative to the pivot threshold should be increasingly blue (below threshold) or red (above the threshold). I must say I do not understand the situation for the IC50. You say it has a pivot threshold of 0.000001? In that case it should show up as increasingly red (the blue color below 0.000001 is too small to be renderd on-screen). Are you sure you applied the pivot threshold here?

edit:
I remember that there is also a value_sort_order field in meta file that that determines this behavior.

When values are sorted based on the value_sort_order, data points at the start of the sequence are considered more significant than data points at the end.

This concept is used by the OncoPrint when aggregating generic assay data from multiple samples from a single patient. When value_sort_order is ASC the sample with the smallest response value will be shown for that patient. When value_sort_order is DESC the sample with the largest value will be shown for that patient.

This concept is also used to separate good vs less good response values in the Waterfall plot. When value_sort_order is ASC small values are represented as downward deflections from the pivot_threshold_value in the waterfall plot of Plots Tab.

Does this play a role here? What values for sort order do you use?

@dippindots
Copy link
Member Author

dippindots commented Oct 27, 2020

Hi @pvannierop, this is the profile data I found from database:

  {
    "molecularAlterationType": "GENERIC_ASSAY",
    "genericAssayType": "TREATMENT_RESPONSE",
    "datatype": "LIMIT-VALUE",
    "name": "Treatment response: IC50",
    "description": "IC50 values (in micromolar) of cell lines responding to various drug treatments. The IC50 values are intra-/extrapolated from a sigmoidal curve by fitting a mixed-effects model (Vis et al. 2016).",
    "showProfileInAnalysisTab": true,
    "pivotThreshold": 0.000001,
    "sortOrder": "ASC",
    "molecularProfileId": "ccle_broad_2019_CCLE_drug_treatment_IC50",
    "studyId": "ccle_broad_2019"
  },

I see, here is the original code (I didn't change anything since Treatment feature has been implemented), and I think the reason it shows blue color is because the pivotOutsideValueRange, the minimum value is not 0.000001, then it's considered that pivot is outside value range.
Ref: https://github.com/cBioPortal/cbioportal-frontend/blob/master/src/shared/components/oncoprint/OncoprintUtils.ts#L309-L360

@pvannierop
Copy link
Contributor

@dippindots Ah i see now, your change only affects the gradient when 1) there is no pivotThreshold or 2) the observed values are all beyond the pivot threshold. I think we should separate these conditions. So, when no pivot is defined I am fine with small->large values mapping to white->blue. However, when there is a pivotThreshold set (an opinion what is on what is good and what is bad) the color gradient should takes this into account. Can we discuss this in a call?

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

2 participants