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

[Augur] Add augur tree iqtree model type to output #674

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

Michal-Babins
Copy link
Contributor

@Michal-Babins Michal-Babins commented Nov 12, 2024

This PR closes #665

🗑️ This dev branch should be deleted after merging to main.

🧠 Summary

Adds a condition to augur tree to extract the model type if method is iqtree and model type is "auto', else if model is provided for iqtree extract that user provided model, else return null. A new output iqtree_model_used has been added to augur.

⚡ Impacted Workflows/Tasks

Tasks:

  • task_augur_tree.wdl
    Workflows:
  • wf_augur.wdl
    This PR may lead to different results in pre-existing outputs: No

This PR uses an element that could cause duplicate runs to have different results: No

🛠️ Changes

A conditional statement has been added for task augur tree if the method is iqtree to either scrape the log file to extract the best fit model if substitution_model is auto, else for user provided or default GTR model assign that to the output, if iqtree is not used echo an empty string into the file. This output is captured by iqtree_model_used which is consistent with how snippy variant names the output.

Note: If method is iqtree and substitution model is auto, I am having to do an awkward work around to get where the log file containing the best fit model lives. Me and @kapsakcj took a look at how augur tree treats the execution directory and it seemed to be localizing data in and out from the alignment task. More detailed review of this can be done upon request.

⚙️ Algorithm

➡️ Inputs

⬅️ Outputs

Outputs added for the follwowing:

task_augur_tree.wdl:

  • String iqtree_model_used = read_string("FINAL_MODEL.txt")

wf_augur.wdl:

  • String iqtree_model_used = augur_tree.iqtree_model_used

🧪 Testing

The PR was tested against the vrdl_vpd_specimen_HAV_set using this Augur_PHB instance. The augur_tree.substitution_model was tested with model set to auto, with model manually set to TIM2, with model manually set to GTR, with model manually set to F81. The null object pattern was tested with augur_tree.substitution_model unset and augur_tree.method set to fasttree.

Suggested Scenarios for Reviewer to Test

Please test with this workflow configured here using the mb-augur-automodel-output-dev branch. Test with augur_tree.substitution_model set to auto and a few models manually set to your choosing from this set. Check to see iqtree_model_used on the set has been updated appropriately. Also please test without using iqtree as the augur_tree.method (fasttree or raxml). Check to see iqtree_model_used is null.

🔬 Final Developer Checklist

  • The workflow/task has been tested and results, including file contents, are as anticipated
  • The CI/CD has been adjusted and tests are passing (Theiagen developers)
  • Code changes follow the style guide
  • Documentation and/or workflow diagrams have been updated if applicable (Theiagen developers only)

🎯 Reviewer Checklist

  • All changed results have been confirmed
  • You have tested the PR appropriately (see the testing guide for more information)
  • All code adheres to the style guide
  • MD5 sums have been updated
  • The PR author has addressed all comments
  • The documentation has been updated

@Michal-Babins Michal-Babins marked this pull request as ready for review November 12, 2024 16:08
@Michal-Babins Michal-Babins requested a review from a team as a code owner November 12, 2024 16:08
…titution model and rename iqtree model variable for clarity
@sage-wright
Copy link
Member

sage-wright commented Nov 14, 2024

Copy link
Member

@sage-wright sage-wright left a comment

Choose a reason for hiding this comment

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

well done. ⭐

@sage-wright sage-wright merged commit ad49a36 into main Nov 14, 2024
5 checks passed
@kapsakcj kapsakcj mentioned this pull request Dec 9, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Augur] output results of ModelFinder when substitution_model = "auto"
2 participants