branch line thickness

2,674 views
Skip to first unread message

cool_a...@web.de

unread,
Jan 2, 2017, 12:14:06 AM1/2/17
to ggtree
Is it possible to make branches thicker if the node is supported by a bootstrap value greather than x?

Yu, Guangchuang

unread,
Jan 2, 2017, 10:31:12 PM1/2/17
to cool_a...@web.de, ggtree
something like this:

ggtree(tr, aes(size=label > 80)) + scale_size_manual(values=c(1, .1))


On Mon, Jan 2, 2017 at 1:14 PM, <cool_a...@web.de> wrote:
Is it possible to make branches thicker if the node is supported by a bootstrap value greather than x?

--
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/d33a7292-906b-4c7b-8a96-e1ada96f3457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--~--~---------~--~----~------------~-------~--~----~
Guangchuang Yu, PhD Candidate
State Key Laboratory of Emerging Infectious Diseases
School of Public Health
The University of Hong Kong
Hong Kong SAR, China
-~----------~----~----~----~------~----~------~--~---

cool_a...@web.de

unread,
Jan 3, 2017, 4:09:52 PM1/3/17
to ggtree

Unfortunately the branch thickness stays at 1 until it either hits a tip node or another node with >70, even if the next split has only a bootstrap value of <70.




Am Dienstag, 3. Januar 2017 04:31:12 UTC+1 schrieb Yu, Guangchuang:
something like this:

ggtree(tr, aes(size=label > 80)) + scale_size_manual(values=c(1, .1))

On Mon, Jan 2, 2017 at 1:14 PM, <cool_a...@web.de> wrote:
Is it possible to make branches thicker if the node is supported by a bootstrap value greather than x?

--
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree...@googlegroups.com.

To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/d33a7292-906b-4c7b-8a96-e1ada96f3457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yu, Guangchuang

unread,
Jan 3, 2017, 11:33:30 PM1/3/17
to cool_a...@web.de, ggtree
This is complicated, since tips don't have bootstrap value, and we need to assign parent status to tips.


require(ggtree)
## you need github version of ggtree and treeio
## treeio::read.newick can parse node label as separated support value.
x = read.newick('RAxML_Zingiberaceae.tre', node.label='support')
edge = x@phylo$edge
edge = as.data.frame(edge)
edge = edge[edge[,2] <= Ntip(x), ]

df = x@data
merge(df, edge, by.x="node", by.y="V1", all.x=F, all.y=T) -> df2
df3= df2[, c(3, 2)]
colnames(df3) = colnames(df)
x@data = rbind(df3, df)

ggtree(x, aes(size=I(support/100)))




To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.

To post to this group, send email to bioc-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages