progressiveCactus icon indicating copy to clipboard operation
progressiveCactus copied to clipboard

RuntimeError: Failed to parse newick tree

Open nt365 opened this issue 5 years ago • 5 comments

I keep receiving the error found in the "slurm.hal0082.131857976.err.txt" file. My newick tree is in the "drosophila.txt" file. I am unsure of what is incorrect about the tree.

Any feedback here would be appreciated.

drosophila.txt slurm.hal0082.131857976.err.txt

nt365 avatar Sep 30 '19 14:09 nt365

Hello! Did you managed to solve the problem? I'm getting the same error, and I already verified the correct structure of the newick tree using this tool: https://github.com/ila/Newick-validator

josuebarrera avatar Sep 13 '21 16:09 josuebarrera

Cactus only wants leaf names and branch lengths. It doesn't know how to correctly handle things like 0.51:0.01395

glennhickey avatar Sep 13 '21 17:09 glennhickey

Thank you for the quick reply. Unfortunately, I tried to run cactus using a simple newick tree with and without branch lengths. This is the error I got:

node525 2021-09-13 19:26:32,651 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'. node525 2021-09-13 19:26:32,652 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'. node525 2021-09-13 19:26:33,088 MainThread INFO toil.jobStores.abstractJobStore: The workflow ID is: '2810529a-4f66-4a33-b82d-908ef2d33d06' Traceback (most recent call last): File "/route/to/cactus/bin/cactus", line 11, in load_entry_point('progressiveCactus==1.0', 'console_scripts', 'cactus')() File "/route/to/cactus/lib/python2.7/site-packages/cactus/progressive/cactus_progressive.py", line 481, in main projWrapper = ProjectWrapper(options) File "/route/to/cactus/lib/python2.7/site-packages/cactus/progressive/projectWrapper.py", line 27, in init self.seqFile = SeqFile(options.seqFile) File "/route/to/cactus/lib/python2.7/site-packages/cactus/progressive/seqFile.py", line 65, in init self.parseFile(path) File "/route/to/cactus/lib/python2.7/site-packages/cactus/progressive/seqFile.py", line 86, in parseFile line) RuntimeError: Failed to parse newick tree: (((sp1,sp2),sp3),(sp4,sp5));

josuebarrera avatar Sep 13 '21 17:09 josuebarrera

Oops, didn't notice which repo this was in. Only this version of cactus is supported https://github.com/ComparativeGenomicsToolkit/cactus

glennhickey avatar Sep 13 '21 17:09 glennhickey

Hi everyone,

I am using TreeCluster.py program and i am getting this error. File "/usr/local/lib/python3.8/dist-packages/treeswift/Tree.py", line 1455, in read_tree_newick raise RuntimeError("Failed to parse string as Newick: %s"%ts)

How do I solve this problem?

ankeetkumar avatar Dec 13 '22 04:12 ankeetkumar