Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose two additional options of TreeTime in augur refine #1203

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

rneher
Copy link
Member

@rneher rneher commented Apr 18, 2023

Expose two additional options of TreeTime in augur refine as commandline flags in augur refine.

  • --stochastic-resolve was added in TreeTime 0.9.6 (hence update to dependencies in setup.py) and uses a different algorithm for polytomy resolution in TreeTime. Instead of pulling successively merging the two branches the increase the likelihood most, this mode generates random coalescent trees. This is faster and leads to more typical resolutions.
  • --max-iter controls the number of iterations TreeTime uses to infer time trees. This was previously hard coded to 2.

This PR is completely backwards compatible in that without explicitly setting these flags, the behavior of refine does not change.

Testing

I ran the seasonal flu builds with these flags and they finished without problem.

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

flags in augur refine.
 * --stochastic-resolve was added in TreeTime 0.9.6 (hence update
   to dependencies in setup.py) and uses a different algorithm
   for polytomy resolution in TreeTime. Instead of pulling successively
   merging the two branches the increase the likelihood most, this
   mode generates random coalescent trees. This is faster and leads
   to more typical resolutions.
 * --max-iter controls the number of iterations TreeTime uses to infer
   time trees. This was previously hard coded to 2.
@rneher rneher marked this pull request as draft April 18, 2023 20:34
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (e6ff9ef) 68.37% compared to head (a30bc54) 68.38%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1203   +/-   ##
=======================================
  Coverage   68.37%   68.38%           
=======================================
  Files          64       64           
  Lines        6852     6854    +2     
  Branches     1662     1662           
=======================================
+ Hits         4685     4687    +2     
  Misses       1857     1857           
  Partials      310      310           
Impacted Files Coverage Δ
augur/refine.py 65.68% <100.00%> (+0.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rneher
Copy link
Member Author

rneher commented Apr 19, 2023

I ran this with a modified seasonal-flu workflow that sets --max-iter 4 and --stochastic-resolve. For the NA segment of the H3N2 2y titer workflow, the old result was

image

the new result is

image

overall, this looks like a more "natural" tree topology.

When not setting these flags, the behavior shouldn't have changed.

Copy link
Member

@tsibley tsibley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me!

@rneher
Copy link
Member Author

rneher commented Apr 26, 2023

thanks, Tom. I also discussed this with John while he was in Basel.

@rneher rneher merged commit 0050882 into master Apr 26, 2023
@rneher rneher deleted the feat/stochastic-polytomy-resolution branch April 26, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants