morrislab / TrackSig

A framework to infer mutational signatures in cancer over time
MIT License
53 stars 17 forks source link

Changing binsize to more than 100 #9

Closed MargoSambor closed 5 years ago

MargoSambor commented 5 years ago

I've been altering the bin size for the test example that is presented in the usage section of the README (not using simulated input). I changed 100 to a variable in the make_counts.sh, compute_mutational_signatures.R and helper_functions.R scripts but for bin sizes larger that 100 I am getting exposures larger than 100 (see plot attached, this is for bin size 150). Do you have any idea why this might be happening? exposure_binsize_150

YuliaRubanova commented 5 years ago

Hi, I have added the bin_size parameter to make_counts.sh and header.R. Please check out the latest version of the code.

To answer you question, I think the issue is in the call of plotting functions (plot_signatures or plot_signatures_real_scale in compute_mutational_signatures.R). Signature activities range between 0 and 1. For the sake of plotting, we covert them into a percentage by multiplying them by 100 plot_signatures(mixtures*100, ...).

Since bin size is also 100, you might have replaced the multiplication to plot_signatures(mixtures*bin_size, ...). Your issue should be resolved if you replace it by plot_signatures(mixtures*100, ...)

MargoSambor commented 5 years ago

Hey Yulia,

Thank you so much for the commit and for your help!

I've noticed that in the paper in bioarchive figure 1 x axis is "Cancer cell fraction" but in the test example which is on github the resulting pdf has an x axis "average numer of mutant alleles per cancer cell" (the pdf is called "LAML_example_onlyKnownSignatures.pdf" in results_signature_trajectories/LAML/example). And for the example in github the x axis values go from 2.1 (smth like that) to 0, not from 1 to 0 - so that means these are not corrected by copy number?

How could I generate a plot which is exactly like the figure 1 in the paper (with cancer cell fraction on the x axis)?

Thank you for your help. sorry for bothering you.

Best wishes, Margarita

вт, 9 июл. 2019 г. в 16:13, Yulia Rubanova notifications@github.com:

Closed #9 https://github.com/morrislab/TrackSig/issues/9.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/morrislab/TrackSig/issues/9?email_source=notifications&email_token=AHC2ETQYKYPRGV5KKKCSUXDP6STI7A5CNFSM4H6VJB32YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSM2SJPA#event-2469733564, or mute the thread https://github.com/notifications/unsubscribe-auth/AHC2ETVV3UJRA4QNHJSVI4TP6STI7ANCNFSM4H6VJB3Q .