Closed igoldsteinh closed 2 years ago
That's interesting, everything you did looks good to me and I don't know why there is this time difference. I'll have to investigate this further when I'm back from holiday in two weeks.
Thanks @igoldsteinh and @xavierdidelot! @xavierdidelot, Isaac and I work together on this. We'll do some profiling in the meantime to see what functions become more time consuming after the change of the time scale.
Hi Isaac and Vladimir,
Thanks again for bringing this issue to my attention. There is a precision parameter called delta_t
in the calculation of the prior probability of a transmission tree. This represents the size of the discretisation grid and was previously set to 0.01 with no easy way to change it. I have now added this possibility as an optional parameter of inferTTree
. So when you run with months as your time unit, you can now set delta_t=0.01*12
and this should give you similar run time compared to when you run with years as your time unit. I'll close this issue for now, but don't hesitate to reopen if anything is unclear!
Best wishes, Xavier
Sorry for the late reply, that seems very clear. Thanks so much for looking into this.
Hi Xavier, I'm coming back to this now and realizing that we've actually mostly been using infer_multittree_share_param
rather than inferTTree
. Any chance that delta_t could be changed for that function as well? Thanks again.
Sure, I've just added the delta_t
parameter to infer_multittree_share_param
in the latest commit.
Thanks again!
Hi there. I've been using Transphylo on some simulations for a while and noticed something quite curious. In my experience Transphylo has much faster run times if the input tree is on the scale of years rather than months. In my own work, trees on the scale of months can take 10+ hours to run, while the same trees on the scale of years can take less than hour. My current understanding of the method is that time scale shouldn't impact the analysis particularly, and this discrepancy has me worried about my understanding of the methodology. Any insights are appreciated. Code example using the Transphylo tutorial below, where the original tree in years takes around 1.5 seconds to run, a rescaled version of the tree in months takes around 23 seconds to run on my computer.
Thank you for your time, Isaac Goldstein