xavierdidelot / TransPhylo

Reconstruction of transmission trees using genomic data
http://xavierdidelot.github.io/TransPhylo/
GNU General Public License v2.0
60 stars 22 forks source link

Samples dated earlier than actual sampling date in t-tree #20

Closed lborcard closed 2 years ago

lborcard commented 2 years ago

Dear All,

I am experiencing an issue with the transmission tree I generated. It appears to set the dates of certain samples (dated by sampling dates) earlier than the actual sampling date (e.g 2018 instead of 2021). The phylo tree was dated using bactdating and all samples are dated by sampling date. Is it normal behavior?

best regards,

Loïc

xavierdidelot commented 2 years ago

TransPhylo does not change the sampling dates compared to what they are in the input phylogenetic tree. Where do you see wrong sampling dates? Maybe you used plot(extractTTree(res)) If so note that this plots the transmission tree with each case aligned with its infection time, not sampling time.

lborcard commented 2 years ago

I see so it's trying to guess the infection time. Suprising that it thinks the person was infected 2 years prior to sampling. I am using it with sars cov2 data btw, so I am not sure if some parameters should be changed ? The transmission seems easier to read than the med tree. I wonder if I could export the med graph or ttree to add some metadata info for instance. thanks for the help.

xavierdidelot commented 2 years ago

You need to specify the parameters of the generation time distribution, cf other previous issues on this such as #8 and #12. This needs to be specified in the same time unit as was used to created the dated phylogeny. See also a description of how to use TransPhylo at https://currentprotocols.onlinelibrary.wiley.com/doi/full/10.1002/cpz1.60