kgori / sigfit

Flexible Bayesian inference of mutational signatures
GNU General Public License v3.0
33 stars 8 forks source link

Refitting after signature selection #44

Closed arpoe closed 4 years ago

arpoe commented 5 years ago

Hi, As recommended in the Vignette, I would like to repeat the fitting after determining, which signatures are active in each sample. Is this implemented already somehow? Thank you very much for your help with this. It is an excellent tool by the way!

Best, Anna

baezortega commented 5 years ago

Hi Anna,

Thanks for getting in touch. We haven't implemented this automatically, because we think the user should be responsible for deciding which signatures they believe are present. If you have figured this out already from the output of plot_exposures(), then you can refit the chosen signatures with this code:

selected_signatures <- c(1, 3, 4, 6)   ## example indices of your chosen signatures
refitting <- fit_signatures(counts, signatures[selected_signatures, ], iter = 5000)

Many thanks for the kind words and for using sigfit! We are glad you like it! (Also, we recently released version 1.3 with same models but much better plots.)

Best, Adrian