Problem with rooting tree when imputing missing data
0
0
Entering edit mode
3.3 years ago
1713895 • 0

Hi,

I am trying to impute missing values in a data set using the impute.phylo function in phytools.

tree1<-read.nexus("tree1.nex")
hominin_char<-read.csv("hominin_data.csv", header=T, row.names=1)
tree1<-root.phylo(tree1, outgroup = "G_gorilla")
X <- as.data.frame(hominin_char[1:2], row.names=rownames(tree1))
phylo.impute(tree1, X)

and I get the following error:

Error in ape::root.phylo(tree, outgroup = tip) : 
  specified outgroup not in labels of the tree

Below is the data set that I am using.

                         Brain_mass Body_mass
H_neanderthalenis            1353.00     72.20
H_heidelbergensis            1200.00     71.00
H_sapiens                    1450.00     70.60
H_antecessor                  972.00     56.61
H_naledi_195                  501.30     45.90
Asian_H_erectus_153           963.50     57.70
African_H_erectus_DAN5_P1     598.00        NA
African_H_erectus             829.90     64.30
Georgian_H_erectus            758.40     49.50
H_rudolfensis_97              559.20     55.20
H_habilis_106                 559.20     33.30
Au_sediba_93                  363.40     25.80
H_floresiensis_LB1            414.00     28.70
Au_africanus_59               455.30     34.00
P_aethiopicus_67              407.00     31.70
P_bosei_77                    482.70     41.30
P_robustus_89                 525.00     36.00
K_platyops                    407.00        NA
Au_ghari_63                   455.30     34.00
Au_afarensis                  384.70     27.80
Au_afarensis_36               441.70     37.70
Au_afarensis_37               514.30     44.50
Au_afarensis_38               393.10     29.30
Au_anamensis                  365.80     42.00
Ar_ramidus                    300.00     50.00
S_tchadensis                  378.00     40.00
P_troglodytes_4               378.00     50.57
P_troglodytes_5               405.80     58.24
P_troglodytes_6               368.10     42.91
G_gorilla                     454.55    105.00

Can anybody please help?

R software error impute.phylo phytools ape • 581 views
ADD COMMENT
0
Entering edit mode

A couple of points to note:

  1. Please keep the title brief. Specifying the error message in the title is not recommended.
  2. Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. If your code has long lines with a single command, break those lines into multiple lines with proper escape sequences so they're easier to read and still run when copy-pasted. I've done it for you this time.
    code_formatting
ADD REPLY

Login before adding your answer.

Traffic: 1556 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6