cBioPortal / cbioportal

cBioPortal for Cancer Genomics
https://cbioportal.org
GNU Affero General Public License v3.0
641 stars 497 forks source link

Cancer Summary Plot Y-Axis Value Absolute Count Not Working #3236

Closed tamaccount closed 7 years ago

tamaccount commented 7 years ago

When you customize the bar configuration so that the y-axis displays absolute counts, a few things on the chart mess up

image

In the above picture, the max of the "Min. # Altered Cases" slider is 1 when, it looks like it should be around ~1250 (according the chart). Also, the numbers in the table for the "Breast Cancer" tooltip are incorrect. Above the table, "Gene altered in 100% of 1 cases" is displayed; This sentence correlates to the other study in the chart, "Breast Sarcoma", so this is also incorrect. The tooltip for "Breast Sarcoma" (not shown in the picture) also displays incorrect information.

Query in the picture:

alisman commented 7 years ago

Problem is we're using totalAlterations. Total alterations could include more than one alteration per sample. That's why we can get above 100%. Say there are 10 samples, eight of them have both mutation and fusion. That means alterationTotal would be 16. But in fact, only 80% of total samples are altered. So we need to pass in a new value which is alteredSampleCount.