HI I have obtained a majority consensus tree output from MrBayes.
The I tried to root my tree but so far I have been unsuccessful.
I tried:
mbtree2<-ape::root(mbtree, outgroup = mbtree@phylo$tip.label[48], edgelabel = TRUE)
Error in `dplyr::inner_join()`:
! Can't join on `x$node` x `y$node` because of incompatible types.
ℹ `x$node` is of type <character>>.
ℹ `y$node` is of type <integer>>.
Traceback:
1. ape::root(mbtree, outgroup = mbtree@phylo$tip.label[48], edgelabel = TRUE)
2. root.treedata(mbtree, outgroup = mbtree@phylo$tip.label[48],
. edgelabel = TRUE)
3. update_data(phy@data, node_map)
4. dplyr::inner_join(data, node_map, by = c(node = "old")) %>% dplyr::select(c("new",
. cn)) %>% dplyr::rename(node = .data$new)
5. dplyr::rename(., node = .data$new)
6. dplyr::select(., c("new", cn))
7. dplyr::inner_join(data, node_map, by = c(node = "old"))
8. inner_join.data.frame(data, node_map, by = c(node = "old"))
9. join_mutate(x, y, by = by, type = "inner", suffix = suffix, na_matches = na_matches,
. keep = keep)
10. join_rows(x_key, y_key, type = type, na_equal = na_equal, error_call = error_call)
11. tryCatch(matches <- vec_match(x_key, y_split$key, na_equal = na_equal),
. vctrs_error_incompatible_type = function(cnd) {
. rx <- "^[^$]+[$]"
. x_name <- sub(rx, "", cnd$x_arg)
. y_name <- sub(rx, "", cnd$y_arg)
. bullets <- c(glue("Can't join on `x${x_name}` x `y${y_name}` because of incompatible types."),
. i = glue("`x${x_name}` is of type <{x_type}>>.",
. x_type = vec_ptype_full(cnd$x)), i = glue("`y${y_name}` is of type <{y_type}>>.",
. y_type = vec_ptype_full(cnd$y)))
. abort(bullets, call = error_call)
. })
12. tryCatchList(expr, classes, parentenv, handlers)
13. tryCatchOne(expr, names, parentenv, handlers[[1L]])
14. value[[3L]](cond)
15. abort(bullets, call = error_call)
16. signal_abort(cnd, .file)
mbtree2<-ape::root(mbtree, outgroup = c(48)) (same error as above)
mbtree2<-ape::root(mbtree, outgroup = c(45,46))
Error in root.phylo(tree, outgroup = outgroup, node = node, edgelabel = edgelabel, : the specified outgroup is not monophyletic
Traceback:
1. ape::root(mbtree, outgroup = c(45, 46))
2. root.treedata(mbtree, outgroup = c(45, 46))
3. root(tree, outgroup = outgroup, node = node, edgelabel = edgelabel,
. ...)
4. root.phylo(tree, outgroup = outgroup, node = node, edgelabel = edgelabel,
. ...)
5. stop("the specified outgroup is not monophyletic")
which(mbtree@phylo$tip.label =="Amphilectus_fucorum_coxIZMAPOR1981
But they are monophyletic I've open in figtree without changing the it and they are.
mbtree2<-ape::root(mbtree, outgroup = mbtree@phylo$tip.label[c(45,46)],edgelabel = TRUE) (same error as above)
Also:
ape::root.phylo(mbtree, outgroup = outgrp): object not of class "phylo"
Error in ape::root.phylo(mbtree, outgroup = outgrp): object not of class "phylo"
Traceback:
1. ape::root.phylo(mbtree, outgroup = outgrp)
2. stop("object not of class \"phylo\"")
ggtree::reroot
Error: 'reroot' is not an exported object from 'namespace:ggtree'
Traceback:
I'm at lost how to solve the issue and anyhelp will be welcome