When making a consensus tree using ape::consensus the branch lengths are
lost. Is there a way to not lose the branch lengths? Or to add them somehow
to the consensus tree after making it.

library(ape)
> cat("owls(((Strix_aluco:4.2,Asio_otus:4.1):4.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);",
>      file = "ex1.tre", sep = "\n")> 
> cat("owls(((Strix_aluco:1.2,Asio_otus:4.5):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);",
>      file = "ex2.tre", sep = "\n")> 
> cat("owls(((Strix_aluco:3.2,Asio_otus:4.7):8.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);",
>      file = "ex3.tre", sep = "\n")> tree1 <- read.tree("ex1.tre")> tree2 <- 
> read.tree("ex2.tre")> tree3 <- read.tree("ex3.tre")> trees <- c(tree1, tree2, 
> tree3)> trees_con <- consensus(trees)> trees_con
Phylogenetic tree with 4 tips and 3 internal nodes.
Tip labels:[1] "Strix_aluco"   "Asio_otus"     "Athene_noctua" "Tyto_alba"
Rooted; no branch lengths.


Thanks, Scott Chamberlain

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to