UMCUGenetics / MutationalPatterns

R package for extracting and visualizing mutational patterns in base substitution catalogues
MIT License
104 stars 45 forks source link

Why mut_mat + 0.0001? #53

Closed b-niu closed 4 years ago

b-niu commented 4 years ago

Dear authors, thanks for this awesome package!

I noticed that in the introduction PDF, the part of "4.1 De novo mutational signature extraction using NMF", it was described as:

First add a small psuedocount to your mutation count matrix:

mut_mat <- mut_mat + 0.0001

May I ask about why should we add 0.0001 to mut_mat?

And another question is: Should mut_mat + 0.0001 for "4.2 Find optimal contribution of known signatures"?

fit_res <- fit_to_signatures(mut_mat, cancer_signatures)

Thanks again!

sternp commented 4 years ago

NMF can't handle zeros, therefore a pseudocount is added

If you aren't using the NMF method then you don't need to add a pseudocount.

b-niu commented 4 years ago

Thanks @sternp ! It's clear!