Hi All,
I am trying to do ancestral state reconstruction in R using the packages {ape}
and {phytools}, but these two packages do not seem to handle reconstruction to
include data at internal nodes. I am able to do a reconstruction (on a sample
tree, attached) using a tree with 6 terminal tips and 3 internal node names,
with corresponding data for each taxa. But, the reconstruction using {Phytools}
is not accurately representing internal node states, and {ape} will not run the
function. Do these packages not support this function? I have attached my
matrix and tree files for reference.
I have used the following script for {phytools}:
simmap <- make.simmap(phylo, matrix, nsim=100)
cols <- cols(“blue”, “red”); names(cols) <- c(“present”, “absent”)
plotSimmap(simmap[[1]], lwd=3, fsize=1, cols)
add.simmap.legend(leg=sort(unique(matrix)), colors=cols, fsize=1)
And the following for {ape}:
anc <- ace(matrix, phylo, type=“d”)
*Which gives an error of "length of phenotypic and phylogenetic data do not
match", that I am guessing is due to the data for the internal node taxa.
Any help with this would be greatly appreciated!
-Laura
,pelvic fin Gasterosteus_gymnurus,present Gasterosteus_wheatlandi,present Gasterosteus_aculeatus,present Pungitius_bussei,present Gasterosteus_islandicus,present Gasterosteus,present Pungitius_sternurus,present Pungitius,absent
mapping_tree.nex
Description: mapping_tree.nex
_______________________________________________ R-sig-phylo mailing list - [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/[email protected]/
