rmpiro / decompTumor2Sig

decompTumor2Sig - Decomposition of individual tumors into mutational signatures
1 stars 1 forks source link

Two new COSMIC v3.1 signatures don't pass isAlexandrovSet function. #3

Closed zhiiiyang closed 3 years ago

zhiiiyang commented 4 years ago

Hi, this is Zhi. I was trying to add your convertAlexandrov2Shiraishi to my Shiny app, iMutSig. It works fine with the COSMIC v2 and v3 signatures. By including the additional five new signatures that were recently released for the 3.1 version(see news here), I found out that two signatures (SBS89 and SBS90) didn't pass your isAlexandrovSet test. The primary reason is that the tolerance threshold (1e-05) is too stringent. Please let me know how you think of it. Thank you!

library(decompTumor2Sig)
download.file("https://cancer.sanger.ac.uk/signatures/COSMIC_Mutational_Signatures_v3.1.xlsx",
              "~/sig_v3.1.xlsx", mode = 'wb')
sig_file_v3 <- readxl::read_excel("~/sig_v3.1.xlsx") 
sig_full_v3 <- sig_file_v3[order(sig_file_v3[,1]),]
sig_full_v3 <- data.frame(sig_full_v3)
which(abs(colSums(sig_full_v3[, 3:74])-1)>1e-5)
#> SBS89 SBS90 
#>    71    72
rmpiro commented 3 years ago

Dear Zhi,

please excuse my late reply ... I again wasn't notified about the creation of your new ticket (I think I fixed that now, I hope it works next time).

Thanks a lot for noticing this problem!

I still wonder how they can even publish signatures which don't sum up to 1 ... these are meant to be probabilities; having a total probability of >100% (even if only by 3.79e-05) or <100%, makes little sense to me :-)

I will increase the tolerance range to 1e-04 with the next release, but that's a really ugly workaround and wouldn't be necessary at all if they paid more attention. What if in release 3.2 of the signatures they have even higher discrepancies? The we start all over again :-(

I could completely remove the check, but that would mean the user would be able to accidentially use basically anything as a signature, whether it makes sense or not ... so I'd prefer to have at least some minimum check.

For now I recommend to re-normalize the signatures manually to 1 by just dividing them by their sum.

zhiiiyang commented 3 years ago

@rmpiro, thank you for the thoughts. I think what you proposed by re-normalizing sounds good to me.

rmpiro commented 3 years ago

Dear Zhi,

I've decided to not change the threshold but instead change the function readAlexandrovSignatures such that it can directly handle the xlsx (Excel) file from version 3.1 of the signatures, roughly as you have described it above.

This should probably be available with the next Bioconductor release.

Thanks again for your suggestion!

Best, Rosario.