question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Error building tree using example data

See original GitHub issue

Hi, I’m trying to run a SARS-CoV-2 analysis using the example data with 418 sequences using the default command snakemake --profile profiles/default. 48% of the steps finish successfully, however, I get an error in building the tree as follows: ERROR: b"ERROR: alignment.cpp:75: std::__cxx11::string& Alignment::getSeqName(int): Assertion `i >= 0 && i < (int)seq_names.size()’ failed.\nERROR: STACK TRACE FOR DEBUGGING:\nERROR: 1 funcAbort()\nERROR: 2 ()\nERROR: 3 gsignal()\nERROR: 4 abort()\nERROR: 5 ()\nERROR: 6 ()\nERROR: 7 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 8 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 9 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 10 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 11 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 12 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 13 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 14 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 15 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 16 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 17 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 18 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 19 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 20 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 21 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 22 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 23 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 24 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 25 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 26 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 27 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 28 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 29 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 30 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 31 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 32 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 33 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 34 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 35 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 36 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 37 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 38 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 39 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 40 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 41 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 42 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 43 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 44 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 45 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 46 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 47 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 48 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 49 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 50 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 51 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 52 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 53 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 54 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 55 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 56 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 57 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 58 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 59 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 60 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 61 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 62 PhyloTree::assignLeafNames(Node*, Node*)\nERROR: 63 PhyloTree::readTreeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)\nERROR: \nERROR: *** IQ-TREE CRASHES WITH SIGNAL ABORTED\nERROR: *** For bug report please send to developers:\nERROR: *** Log file: results/global/subsampled_alignment-delim.fasta.log\nERROR: *** Alignment files (if possible)\n/bin/bash: line 1: 5995 Aborted (core dumped) iqtree -ninit 2 -n 2 -me 0.05 -nt 2 -s results/global/subsampled_alignment-delim.fasta -m GTR -ninit 10 -n 4 > results/global/subsampled_alignment-delim.iqtree.log\n" shell exited 134 when running: iqtree -ninit 2 -n 2 -me 0.05 -nt 2 -s results/global/subsampled_alignment-delim.fasta -m GTR -ninit 10 -n 4 > results/global/subsampled_alignment-delim.iqtree.log

Building a tree via: iqtree -ninit 2 -n 2 -me 0.05 -nt 2 -s results/global/subsampled_alignment-delim.fasta -m GTR -ninit 10 -n 4 > results/global/subsampled_alignment-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: TREE BUILDING FAILED Please see the log file for more details: results/global/subsampled_alignment-delim.iqtree.log

Building original tree took 4.321278810501099 seconds [Mon Jun 8 02:37:36 2020] Error in rule tree: jobid: 15 output: results/global/tree_raw.nwk log: logs/tree_global.txt (check log file(s) for error message) shell:

    augur tree             --alignment results/global/subsampled_alignment.fasta             --tree-builder-args '-ninit 10 -n 4'             --output results/global/tree_raw.nwk             --nthreads 2 2>&1 | tee logs/tree_global.txt
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message Complete log: /home/vs/Downloads/COVID_Research/ncov/.snakemake/log/2020-06-08T023515.929219.snakemake.log

Could you help with this? I’ve not modified anything, I’m just using the files given and the default command.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pvanheuscommented, Feb 21, 2022

Hi there - I know this is a closed issued but I hit the same error. This post on the Iqtree forum discusses this issue. As Dr Bui states: “It means that you had a previous (unfinished) run and IQ-TREE loaded the checkpoint file. From what you wrote below, I’m guessing that you now change the alignment file (-s option). This causes incompability between the checkpoint and the alignment.”

This does, I think, describe the circumstances in which I encountered this: I had started a Nextstrain build, then terminated it for some reason, added some more sequences to the input data and re-started the build. I can imagine some “checkpoint” file being left behind in the results directory that contracted the alignment file. I subsequently deleted the results directory and re-started the build. It has now proceeded past the tree-building step with no errors.

I haven’t been able to prove that this is the source of the error but I’m just leaving this theory here for further investigation…

0reactions
trvrbcommented, Jan 21, 2021

I’m closing this issue now. @Addicted-to-coding please let us know if you’re still running into this problem with the latest version of ncov and we can reopen if it’s still a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git commit stopped working - Error building trees
This error means that you have a file with hash 13da9eeff5a9150cf2135aaed4d2e337f97b8114 , and this hash is not present in .git/objects/.
Read more >
git error: invalid object Error building trees | by Panjeh - Medium
in a git repository, I saw there was one untracked file which I had created already but had not been committed. Everything was...
Read more >
An automatically created novel bug dataset and its validation ...
We present the BugHunter Dataset: a novel kind of automatically constructed and freely available bug dataset containing code elements (files, classes, methods) ...
Read more >
Bugs in PHYLIP, known or recently fixed
The best we can suggest is that you either (1) use Dnaml or Proml together with the original sequence data and the input...
Read more >
Decision and Classification Trees, Clearly Explained!!!
Decision trees are part of the foundation for Machine Learning. ... 0:18 Basic decision tree concepts 3:16 Building a tree with Gini ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found