Hi All,

I'm encountering some unexpected results when using the trim.internal=FALSE
argument in the drop.tip function in ape 3.1-1.  Basically, I take a tree
and drop the tips for a clade while preserving internal branches (as I'd
like to retain all info up to the MRCA).  It is dropping all the taxa in
the clade of interest, but the branch length leading up to the MRCA of the
clade I just dropped doesn't seem correct.  I've provided an example below.
 Essentially, I'd expect the cut to be made at 1.14… (depth of node 21 in
the original tree, the MRCA of the clade of interest), but instead, the
depth is different (1.06…, a depth corresponding with that of node 23 in
the original tree).  Am I misunderstanding things, or overlooking something
obvious?  Thanks for any help,

-Matt

test.tree<-read.tree(text=
"(((t4:0.7304771217,t5:0.7304771217):0.3471362426,t1:1.077613364):0.1974721889,((((t11:0.1192444999,t12:0.1192444999):0.6281874858,t3:0.7474319857):0.1048044294,t2:0.8522364151):0.05863278219,(t6:0.3575242818,(((t9:0.1323304724,t10:0.1323304724):0.06068353401,t8:0.1930140064):0.01819581885,t7:0.2112098252):0.1463144566):0.5533449155):0.3642163558);"
)


depths<-node.depth.edgelength(test.tree)

depths


#assign taxa to clade of interest

taxa<-c("t7","t8","t10","t9")


#get node that is mrca of clade

clade.mrca<-getMRCA(test.tree,taxa)


#depth of clade of interest...1.063876

depths[clade.mrca]


#drop clade of interest from starting tree and do NOT trim internal branches

tree.wo.clade<-drop.tip(test.tree,taxa,trim.internal=FALSE)


#now take a look at can see depth where cut was made...can see cut (node 9
in new tree) was made at 1.1427551 instead of at 1.063876 (depth of node 23
in test.tree)...

node.depth.edgelength(tree.wo.clade)

        [[alternative HTML version deleted]]

_______________________________________________
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]/

Reply via email to