tsdate icon indicating copy to clipboard operation
tsdate copied to clipboard

Add tutorial for reinferring tsinfer tree sequences using estimated dates

Open awohns opened this issue 4 years ago • 3 comments

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)

awohns avatar Nov 23 '21 17:11 awohns

Have we data to show that this improves the topological inference in a (very simple) simulated TS. I think we do, right?

hyanwong avatar Jan 10 '22 12:01 hyanwong

Yes, and I agree it would be a good idea to include it!

awohns avatar Jan 11 '22 01:01 awohns

This is probably something that we want to add to the JupyterBook tutorial.

awohns avatar Jan 12 '22 14:01 awohns