lh3 / psmc

Implementation of the Pairwise Sequentially Markovian Coalescent (PSMC) model
Other
152 stars 60 forks source link

scale x by generation? #16

Open davidaray opened 4 years ago

davidaray commented 4 years ago

I am comparing plots from multiple species with different generation times and am interested in having the x-axis scaled by generation number rather than by time. Is there a way to change the psmc_plot.pl invocation to make this happen?

Assuming a single mutation rate, would it be as simple as using the same generation time for all to simulate this result and make them comparable?

jckitch commented 4 years ago

Hi David, not sure if you've solved this problem yet. But I'd recommend using the data provided by the psmc2history.pl file, which gives you the unscaled times and population sizes. I believe psmc_plot.pl multiplies those times by 2N_0 (the estimated effective population size, the README has instructions on how to calculate that) and the generation time. In this case, just multiply by 2N_0 and you'll have times in terms of generations.