cBioPortal / cbioportal

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

Mutational Signatures Improvements #10675

Closed inodb closed 4 months ago

inodb commented 8 months ago
tmazor commented 8 months ago

It sounds like we should be testing both data and the feature now? Below are some comments which I think mostly relate to the data:

1) What's the difference between contribution and counts profiles? And why do they have different sample counts (eg contribution SBS 2703 samples vs count SBS 2673 samples?

image

2) Mutation counts seem inconsistent. The summary tab for this samples say 219 mutations. The count above the plot says 259 SBS. And the tooltip says 3/50 mutations. I could understand how the summary tab might have a higher mutation count since it combines SBS, DBS, ID, but that's not what's happening here. These numbers just don't make sense to me.

image

https://private.cbioportal.mskcc.org/patient/mutationalSignatures?studyId=pancan_pcawg_2020&caseId=DO46424

Another example with 6 mutations in Summary tab, SBS:11 above the plot, and a tooltip showing 50 mutations:

image

https://private.cbioportal.mskcc.org/patient/mutationalSignatures?studyId=pancan_pcawg_2020&caseId=DO46745

3) If sample plot is showing count (not %), then the y-axis label for the Cosmic chart is slightly cut off:

image

4) I agree with Ino's comment above - I'm testing on a 13" laptop screen and it would be awesome if I could see the table on page load, rather than seeing lots of white space and having to scroll down to see the table.

5) In study view, if I'm adding a chart there's a nice description in the charts menu to say eg SBS2 (APOBEC)

image

But once the chart adds, there's no text to remind you which signature this is:

image
MatthijsPon commented 8 months ago

Hi @tmazor I can give some more info on two of the points: 1: We calculated the counts ourselves from the mutations, so there are as many samples with counts as there are with mutations. The actual mutational signatures scores come from literature. It definitely would be preferable if the counts could also be obtained from literature for other studies. I was not able to find them for pcawg

5: This is due to mutational signatures using the generic assay datatype, the description is always visible when selecting charts. I guess it would be possible to use another generic_entity_meta_properties field (@inodb)? Though it would go a bit against the structure of the generic assay datatype

TJMKuijpers commented 7 months ago

3) We could make the margin dynamic to add a bit of white space to the plot (when % is selected) 4) We can hide the chart element unless a signature is clicked. By hiding the element, the white space between the top of the figure and the table should be decreased. I believe we show text underneath the plot saying "Select a signature from the table to show the reference plot". Only have to make sure that users know that they can click the table to show the reference plot. 5) This is probably how the charts in study view are implemented. We did not touch upon it but maybe it is possible to conditionally add information?

inodb commented 7 months ago

@MatthijsPon

For 2: Could this be because the SBS count includes synonymous and noncoding variants? I.e. it is not a count of the mutations imported into cBioPortal but rather a total count of what's in the MAF?

MatthijsPon commented 7 months ago

@inodb Yes, that explains the difference between 259 and 219. I used the whole MAF without further filtering with SigProfilerMatrixGenerator to get the counts. It might be good to add a disclaimer of sorts to the total counts? The 9/50 I cannot explain, I think that is caused by the frontend. @TJMKuijpers Do you know?

tmazor commented 6 months ago

It seems that the tooltip is showing the percentage as a reduced fraction (eg 4% = 1/25 or 1% = 1/100) rather than the actual number of mutations. It should instead show the actual number of mutations.

For the difference in number of mutations between tabs, we can update the text here to note that other types of mutations are included, eg:

image

should be: Single Base Substitutions: 259 (i) where the (i) has a tooltip saying: Mutation count may include silent, noncoding and other types of mutations that may not be shown elsewhere in cBioPortal.

Also please don't forget about: Lot of whitespace initially between chart and interactable component. Maybe we can have some expand-like animation of the bottom chart, so the table controls are more visible on page load?

tmazor commented 6 months ago

New comment:

image

Remove the tooltip

Change 'Variant Class' to 'Mutational Signature Type'

Update the data so the text in the dropbox isn't dependent on the tooltip: eg Mutations Signatures SBS --> Single Base Substitutions (SBS), COSMIC

tmazor commented 6 months ago

Add the option to set the y-axis - default to 100% still good, but let the user change that if all percentages are small. Change axis on both charts so they always have the same axis scale

Ideally: if data extends above the new y-axis max, do like lollipop plot w/ >=xxx

image
inodb commented 5 months ago

@alisman offered to help with slider