tsdate
tsdate copied to clipboard
Add tutorial for reinferring tsinfer tree sequences using estimated dates
The accuracy of tree sequences inferred with tsinfer can be improved by using tsdate estimated dates. This is very straightforward and should be added to the docs:
inferred_ts = tsinfer.infer(samples).simplify()
dated = tsdate.date(inferred_ts, mutation_rate=mutation_rate, Ne=Ne)
sites_time = tsdate.sites_time_from_ts(dated)
dated_samples = tsdate.add_sampledata_times(samples, sites_time)
reinferred_ts = tsinfer.infer(dated_samples).simplify()
dated_reinferred = tsdate.date(reinferred_ts, mutation_rate=mutation_rate, Ne=Ne, progress=True)
Have we data to show that this improves the topological inference in a (very simple) simulated TS. I think we do, right?
Yes, and I agree it would be a good idea to include it!
This is probably something that we want to add to the JupyterBook tutorial.