Drop tips

69 views
Skip to first unread message

Guanyang Zhang

unread,
Jan 19, 2017, 12:17:32 PM1/19/17
to ggtree
How do I drop certain tips from a tree? Didn't find any info about this. A RAxML tree file is attached. I would like to drop the following tips. Thanks!

Gluconobacter_donii_Alphabacteria_AB178405.1
Pseudomonas_aeruginosa_AB037545.1
Paucibacter_toxinivorans_KX085481.1
RAxML_bipartitionsBranchLabels.result

bena...@gmail.com

unread,
Jan 19, 2017, 1:09:15 PM1/19/17
to ggtree
I usually do it with the ape package first:

library(ape)
library(ggtree)

tree <- read.tree(treefile.tre)
tree <- drop.tip(tree, c("Gluconobacter_donii_Alphabacteria_AB178405.1", "Pseudomonas_aeruginosa_AB037545.1", "Paucibacter_toxinivorans_KX085481.1")) #you need to make a vector for the tips to be dropped

ggtree(tree)
Reply all
Reply to author
Forward
0 new messages