This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert tree into bifurcation table

Hi everyone,

I am looking for a way to count mutations along a tree I just made. I have a MSA, I used IQtree to build a phylogenetic tree with the ASR option to get the inferred sequence of each node.

So far , I already have a script that I made using a three column table of each bifurcation of my tree, which compares the Node1 in col1 (which is the ancestral node) to the Nodes 2 and 3 in column 2 and 3 (which are Nodes descending from the Node et col) and I do that for each bifurcation in my tree. I have to write this table by hand by referring to the tree.

This method works perfectly fine for a smaller tree but I am now working with over 500 sequences and it would take quite a while to write the three col table for all the bifurcations in my tree.

I am looking for a way to use a newick file and convert it into this 3 column, bifurcation table, the idea would be to have something like that :

Convert this tree: Node1(Node2(Node4,Node5),Node3(Node6,Node7));

Into a table as such:

Node1 Node2 Node3

Node2 Node4 Node5

Node3 Node6 Node7

I am quite new to phylogenetic analyses so any help will be greatly appreciated.

Thanks

Alex

tree newick asr mutation

0 answers

No answers yet.

Log in to answer this question.