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

ENH: Error or deduplicate alignment in augur tree in iqtree mode, to avoid IQtree error #1340

Open
corneliusroemer opened this issue Nov 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@corneliusroemer
Copy link
Member

Context

IQtree errors when the input alignment contains duplicate sequence names. We could validate this in augur tree before calling iqtree. This would save time and allow us to present a nicer error to the user.

Alternatively, we could deduplicate sequences by name to avoid the error.

Description

This is the somewhat cryptic error you get if you have duplicated sequence names right now:

        augur tree             --alignment results/lineage-b.1/masked.fasta             --output results/lineage-b.1/tree_raw.nwk             --nthreads 3             --tree-builder-args '-czb -redo'
        
Building a tree via:
        iqtree2 -ntmax 3 -s results/lineage-b.1/masked-delim.fasta -m GTR -ninit 2 -n 2 -me 0.05 -nt AUTO -redo -czb -redo > results/lineage-b.1/masked-delim.iqtree.log
        Nguyen et al: IQ-TREE: A fast and effective stochastic algorithm for estimating maximum likelihood phylogenies.
        Mol. Biol. Evol., 32:268-274. https://doi.org/10.1093/molbev/msu300


ERROR: Shell exited 2 when running: iqtree2 -ntmax 3 -s results/lineage-b.1/masked-delim.fasta -m GTR -ninit 2 -n 2 -me 0.05 -nt AUTO -redo -czb -redo > results/lineage-b.1/masked-delim.iqtree.log
Command output was:
  OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
  ERROR: Please rename sequences listed above!

ERROR: TREE BUILDING FAILED
ERROR: Command '['/bin/bash', '-c', 'set -euo pipefail; iqtree2 -ntmax 3 -s results/lineage-b.1/masked-delim.fasta -m GTR -ninit 2 -n 2 -me 0.05 -nt AUTO -redo -czb -redo > results/lineage-b.1/masked-delim.iqtree.log']' returned non-zero exit status 2.
Please see the log file for more details: results/lineage-b.1/masked-delim.iqtree.log

Building original tree took 7.012127876281738 seconds

Only the logs tell the user which sequence is duplicated, which isn't super user friendly.

@corneliusroemer corneliusroemer added the enhancement New feature or request label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant