ComparativeGenomicsToolkit / cactus

Official home of genome aligner based upon notion of Cactus graphs
Other
528 stars 111 forks source link

raise RuntimeError("Failed to parse newick tree: %s" % RuntimeError: Failed to parse newick tree #1375

Open Cholineborzoi opened 6 months ago

Cholineborzoi commented 6 months ago

Hi!

I am trying to learn how to use Cactus, and having problems with the phylogenetic tree. I want to run it for human and dog. How can I make a Newick tree of that?

I had a following one when getting the error in title: ((Human:0.0, Dog:0.052458):0.02)

I formed that from https://hgdownload.soe.ucsc.edu/goldenPath/hg38/multiz100way/ but I am not sure if that is even correct. Thank you!

glennhickey commented 6 months ago

The Newick format is defined here where it shows that it must end with a semicolon.

Cholineborzoi commented 6 months ago

I tried that with (Human:0.0, Dog:0.052458):0.02; but got a following error:

RuntimeError: Error parsing tree "((Human:0.0,Dog:0.052458)Anc1:0.02)Anc0;": Node Anc0 (parent of Anc1) has single descendant: Please remove all such nodes and try again.

diekhans commented 6 months ago

I would suggest visualizing your tree with FigTree or similar tool to make sure it is valid and what you expected.

While newick simplicity also means it is very easy to get it wrong.

Cholineborzoi @.***> writes:

I tried that with (Human:0.0, Dog:0.052458):0.02; but got a following error:

RuntimeError: Error parsing tree "((Human:0.0,Dog:0.052458)Anc1:0.02)Anc0;": Node Anc0 (parent of Anc1) has single descendant: Please remove all such nodes and try again.

-- Reply to this email directly or view it on GitHub: https://github.com/ComparativeGenomicsToolkit/cactus/issues/1375#issuecomment-2095320109 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

glennhickey commented 6 months ago

I tried that with (Human:0.0, Dog:0.052458):0.02; but got a following error:

This error is because you are adding a second node above the human/dog ancestor. If you only have two genomes to align, your tree should look like

(Human:0.0, Dog:0.052458);