Hello,
I am trying to generate a skyline plot for a tree read from a file , but I get the following error:
> skyline(new_tree)
Error in coalescent.intervals.phylo(x) : object "x" is not a binary tree
Therefore I am trying to find a way in converting it into a binary tree using the ape package. This is how my tree looks like.
write.tree(new_tree)
[1] "(13.1:3.419372019,43.1:4.999255162,28.1:1.312062435,21.1:4.79710673,20.1:2.684386432,4.1:2.200648241,37.1:1.842346707,23.1:0.64305868,29.1:0.5388636841,15.1:2.634891758,36.1:1.237981993,40.1:3.525394923,26.1:1.064726807,16.1:0.5079536373,33.1:3.725563462,10.1:4.941130066,18.1:0.5457785237,6.1:4.091318485,11.1:0.1958651538,34.1:3.393013553,2.1:0.7575133257,38.1:3.214719145,35.1:0.176306339,8.1:0.3980455943,42.1:4.85883169,22.1:1.438767907,5.1:3.569074487,27.1:1.856116496,39.1:2.685387186,17.1:4.454120644,30.1:2.536021449,31.1:2.863102485,41.1:2.290262851,7.1:2.874266852,25.1:0.2412481245,3.1:2.35817861,12.1:3.307488272,14.1:3.553288149,1.1:0.2333991311,24.1:4.563503764,9.1:4.044738467,32.1:2.8040902,19.1:1.752629864);"
Any suggestions? Thanks!
@Botond Sipos- Actually my tree is a consensus re-branched tree. I had a nexus file with several trees, read it up, generated the consensus tree using the consensus function ...and afterwards I had to re-branch it since all the branches had the same length(using compute.brlen). That new_tree is the consensus rebranched one and I cannot use it as an input since it is not binary....I don't know where the problem is. For the birds.order data, I get the desired input..could it be that the nexus file I have been provided has some issues? Thank you!