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

tree: RAxML bootstrapping #1127

Merged
merged 6 commits into from
Jan 17, 2023
Merged

tree: RAxML bootstrapping #1127

merged 6 commits into from
Jan 17, 2023

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Jan 11, 2023

Description of proposed changes

Resolves several inter-related issues in augur tree --method raxml when a user-provided --tree-builder-args enables bootstrapping.

Related issue(s)

https://support.nextstrain.org/agent/nextstrain/nextstrain/tickets/details/668036000002953001

Testing

Manually tested various invocations of augur tree exercising the changes. (The existing augur tree tests seem focused on basic functionality.)

I also modified zika-tutorial with this patch to reproduce the problem reported via support:

diff --git a/Snakefile b/Snakefile
index 47b55a2..a60e8e9 100644
--- a/Snakefile
+++ b/Snakefile
@@ -88,7 +88,10 @@ rule tree:
         """
         augur tree \
             --alignment {input.alignment} \
-            --output {output.tree}
+            --output {output.tree} \
+            --method raxml \
+            --tree-builder-args '-m GTRCAT -p $RANDOM -f a -x $RANDOM -N 10' \
+            --override-default-args
         """
 
 rule refine:

and tested it completes successfully now with these changes by running:

nextstrain build --augur=augur/ zika-tutorial/ tree

It does.

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.

…tree builder

The default parameters actually used are in DEFAULT_ARGS and the
parameters actually used may be overridden by tree_builder_args.

More confusing than helpful to include these.
Instead of using variants like IQTREE or IQtree.  IQ-TREE is the form
used by the project itself.
Otherwise it's swallowed whole, never to be seen again.  This doesn't
print the exception's stack trace in order to keep error messaging more
readable for users, but we could consider printing that too when under
"debug mode" (e.g. AUGUR_DEBUG=1) or something.

Related-to: <https://support.nextstrain.org/agent/nextstrain/nextstrain/tickets/details/668036000002953001>
Use the output file which includes bootstrap support values when RAxML's
bootstrapping is enabled by user-provided --tree-builder-args.

This also avoids errors caused when trying to clean up RAxML output
files that aren't present when bootstrapping is enabled, such as
"RAxML_parsimonyTree" and "RAxML_result".

Related-to: <https://support.nextstrain.org/agent/nextstrain/nextstrain/tickets/details/668036000002953001>
@tsibley tsibley requested a review from a team January 11, 2023 23:17
@codecov
Copy link

codecov bot commented Jan 11, 2023

Codecov Report

Base: 67.98% // Head: 67.94% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (33d3bed) compared to base (1fff061).
Patch coverage: 16.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1127      +/-   ##
==========================================
- Coverage   67.98%   67.94%   -0.05%     
==========================================
  Files          57       57              
  Lines        6656     6663       +7     
  Branches     1637     1640       +3     
==========================================
+ Hits         4525     4527       +2     
- Misses       1825     1830       +5     
  Partials      306      306              
Impacted Files Coverage Δ
augur/tree.py 50.00% <16.66%> (-0.65%) ⬇️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

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

Didn't test, but looks good (with a changelog entry).

@tsibley tsibley merged commit be3e404 into master Jan 17, 2023
@tsibley tsibley deleted the tree/raxml-bootstrap branch January 17, 2023 22:15
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