Coder Social home page Coder Social logo

Comments (6)

GuangchuangYu avatar GuangchuangYu commented on May 30, 2024

can you send your tree file and script to me for testing?

from ggtree.

markb729 avatar markb729 commented on May 30, 2024

Hi Yu,

Thank you for taking a closer look. Using R 3.1.3 (gtree compiled from source)

library(ggtree)
library(ggplot2)

tree <-read.tree("test.tre")

#Phylogram
ggtree(tree) %>% hilight(node=134,fill="slategray2",alpha=0.6) %>% hilight(node=82,fill="chocolate2",alpha=0.6) %>% hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>% hilight(node=93,fill="mediumpurple2",alpha=0.6) %>% hilight(node=98,fill="olivedrab2",alpha=0.6) %>% hilight(node=104,fill="orange2",alpha=0.6) %>% hilight(node=110,fill="orangered3",alpha=0.6) %>% hilight(node=117,fill="rosybrown2",alpha=0.6) %>% hilight(node=141,fill="seagreen2",alpha=0.6) %>% hilight(node=145,fill="thistle2",alpha=0.6) %>% hilight(node=127,fill="tomato2",alpha=0.6) %>% hilight(node=125,fill="yellow3",alpha=0.6) %>% hilight(node=132,fill="steelblue2",alpha=0.6) + geom_text(aes(label=label), size=3, color="black", family="Calibri", hjust=-.2, na.rm = T)

#Circular
#Note: one clade fails to highlight
ggtree(tree, layout="circular") %>% hilight(node=134,fill="slategray2",alpha=0.6) %>% hilight(node=82,fill="chocolate2",alpha=0.6) %>% hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>% hilight(node=93,fill="mediumpurple2",alpha=0.6) %>% hilight(node=98,fill="olivedrab2",alpha=0.6) %>% hilight(node=104,fill="orange2",alpha=0.6) %>% hilight(node=110,fill="orangered3",alpha=0.6) %>% hilight(node=117,fill="rosybrown2",alpha=0.6) %>% hilight(node=141,fill="seagreen2",alpha=0.6) %>% hilight(node=145,fill="thistle2",alpha=0.6) %>% hilight(node=127,fill="tomato2",alpha=0.6) %>% hilight(node=125,fill="yellow3",alpha=0.6) %>% hilight(node=132,fill="steelblue2",alpha=0.6) + geom_text(aes(label=label,angle=angle+90), size=3, color="black", family="Calibri", hjust=-.2, na.rm = T)

Sincerely,

Mark

Mark E. Berres
Assistant Professor of Avian Biology
Department of Animal Sciences
University of Wisconsin - Madison
__

From: Guangchuang Yu <[email protected]mailto:[email protected]>
Reply-To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Date: Sunday, October 25, 2015 at 8:00 AM
To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Cc: Mark Berres <[email protected]mailto:[email protected]>
Subject: Re: [ggtree] Highlight clade function incomplete between tree types (#19)

can you send your tree file and script to memailto:[email protected] for testing?

Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-150920780.

from ggtree.

GuangchuangYu avatar GuangchuangYu commented on May 30, 2024

can u send the test.tre file?

On Mon, Oct 26, 2015 at 11:32 PM, markb729 [email protected] wrote:

Hi Yu,

Thank you for taking a closer look. Using R 3.1.3 (gtree compiled from
source)

library(ggtree)
library(ggplot2)

tree <-read.tree("test.tre")

#Phylogram
ggtree(tree) %>% hilight(node=134,fill="slategray2",alpha=0.6) %>%
hilight(node=82,fill="chocolate2",alpha=0.6) %>%
hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>%
hilight(node=93,fill="mediumpurple2",alpha=0.6) %>%
hilight(node=98,fill="olivedrab2",alpha=0.6) %>%
hilight(node=104,fill="orange2",alpha=0.6) %>%
hilight(node=110,fill="orangered3",alpha=0.6) %>%
hilight(node=117,fill="rosybrown2",alpha=0.6) %>%
hilight(node=141,fill="seagreen2",alpha=0.6) %>%
hilight(node=145,fill="thistle2",alpha=0.6) %>%
hilight(node=127,fill="tomato2",alpha=0.6) %>%
hilight(node=125,fill="yellow3",alpha=0.6) %>%
hilight(node=132,fill="steelblue2",alpha=0.6) + geom_text(aes(label=label),
size=3, color="black", family="Calibri", hjust=-.2, na.rm = T)

#Circular
#Note: one clade fails to highlight
ggtree(tree, layout="circular") %>%
hilight(node=134,fill="slategray2",alpha=0.6) %>%
hilight(node=82,fill="chocolate2",alpha=0.6) %>%
hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>%
hilight(node=93,fill="mediumpurple2",alpha=0.6) %>%
hilight(node=98,fill="olivedrab2",alpha=0.6) %>%
hilight(node=104,fill="orange2",alpha=0.6) %>%
hilight(node=110,fill="orangered3",alpha=0.6) %>%
hilight(node=117,fill="rosybrown2",alpha=0.6) %>%
hilight(node=141,fill="seagreen2",alpha=0.6) %>%
hilight(node=145,fill="thistle2",alpha=0.6) %>%
hilight(node=127,fill="tomato2",alpha=0.6) %>%
hilight(node=125,fill="yellow3",alpha=0.6) %>%
hilight(node=132,fill="steelblue2",alpha=0.6) +
geom_text(aes(label=label,angle=angle+90), size=3, color="black",
family="Calibri", hjust=-.2, na.rm = T)

Sincerely,

Mark

Mark E. Berres
Assistant Professor of Avian Biology
Department of Animal Sciences
University of Wisconsin - Madison
__

From: Guangchuang Yu <[email protected]<mailto:
[email protected]>>
Reply-To: GuangchuangYu/ggtree <[email protected]<mailto:
[email protected]>>
Date: Sunday, October 25, 2015 at 8:00 AM
To: GuangchuangYu/ggtree <[email protected]<mailto:
[email protected]>>
Cc: Mark Berres <[email protected]mailto:[email protected]>
Subject: Re: [ggtree] Highlight clade function incomplete between tree
types (#19)

can you send your tree file and script to memailto:[email protected] for
testing?

Reply to this email directly or view it on GitHub<
https://github.com/GuangchuangYu/ggtree/issues/19#issuecomment-150920780>.


Reply to this email directly or view it on GitHub
#19 (comment)
.

--------------------------------------------~
Guangchuang Yu, PhD Candidate
State Key Laboratory of Emerging Infectious Diseases
School of Public Health
The University of Hong Kong
Hong Kong SAR, China
www: http://ygc.name
-----------------------------------------~---

from ggtree.

markb729 avatar markb729 commented on May 30, 2024

Sorry! I thought it was attached. I have it pasted below too.

((((((A01:1.2840,(B01:0.3331,((B02:0.2161,(B03:0.1231,B04:0.0991)95:0.2284)47:0.0608,(B05:0.2091,(B06:0.1587,(B07:0.0959,(B08A:0.0001,B08B:0.0001)86:0.0151)84:0.0585)93:0.2869)37:0.0774)33:0.0067)100:1.1232)69:0.4447,(C01:0.2455,(C02:0.1734,C03:0.2711)64:0.0940)99:1.0389)15:0.1425,(D01:0.9817,(D02:0.7907,(D03:0.4758,(D04:0.2906,(D05A:0.0000,D05B:0.0000)100:0.3836)67:0.1387)89:0.3932)79:0.4496)16:0.1360)1:0.0372,(E01:1.1012,(E02:0.9621,(E03:0.2604,(E04:0.0570,E05:0.0539)94:0.2956)99:0.7910)53:0.3245)14:0.0245)1:0.2453,((F01:0.7814,F02:1.2187)48:0.5313,(G01:0.6308,(G02:0.1400,(G03:0.0540,G04:0.0570)66:0.0822)100:1.0825)27:0.3734)1:0.0000)1:0.0000,(((H01:1.1671,I01:1.5295)28:0.1903,((J01:0.9302,J02:0.8477)51:0.1445,((J03:0.0015,J04:0.1096)100:0.5521,(J05:0.0683,J06:0.1539)99:0.4479)94:0.6054)55:0.4646)4:0.0835,((L01:1.4064,M01:1.0383)30:0.3508,((K01:0.2515,K02:0.3041)99:0.9401,(K03:0.5899,(K04:0.6516,K05:0.6815)48:0.0771)88:0.5155)18:0.0862)1:0.0000)1:0.1520,((((N01:1.2574,(O01:0.5624,(O02:0.1395,O03:0.0824)100:0.7713)83:0.4854)43:0.2476,(P01:1.1707,(P02:0.3487,(P03:0.2068,P04:0.3480)57:0.0965)99:0.7227)30:0.2585)4:0.3478,((Q01:1.5261,(R01:0.3747,R02:0.2921)100:1.1402)16:0.2926,(S01:1.4894,(T01:1.2173,(T02:0.2179,(T03:0.3003,(T04:0.1644,(T05:0.1105,(T06:0.1765,T07:0.1570)49:0.1113)41:0.0951)41:0.0596)29:0.0289)99:0.5947)53:0.4755)4:0.0885)1:0.0000)1:0.0197,(((U01:0.2621,(U02:0.2073,U03:0.1261)91:0.2940)99:0.6785,(U04:0.5537,U05:0.5582)80:0.3706)61:0.7167,(V01:1.1947,((V02:0.7040,(V03:0.3501,(V04:0.1320,V05:0.0899)73:0.0946)59:0.1533)68:0.4249,(V06:0.7342,V07:0.7102)37:0.2328)33:0.3087)32:0.3350)8:0.0425)1:0.0506);

Mark

Mark E. Berres
Assistant Professor of Avian Biology
Department of Animal Sciences
University of Wisconsin - Madison
__

From: Guangchuang Yu <[email protected]mailto:[email protected]>
Reply-To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Date: Monday, October 26, 2015 at 11:24 AM
To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Cc: Mark Berres <[email protected]mailto:[email protected]>
Subject: Re: [ggtree] Highlight clade function incomplete between tree types (#19)

can u send the test.tre file?

On Mon, Oct 26, 2015 at 11:32 PM, markb729 <[email protected]mailto:[email protected]> wrote:

Hi Yu,

Thank you for taking a closer look. Using R 3.1.3 (gtree compiled from
source)

library(ggtree)
library(ggplot2)

tree <-read.tree("test.tre")

#Phylogram
ggtree(tree) %>% hilight(node=134,fill="slategray2",alpha=0.6) %>%
hilight(node=82,fill="chocolate2",alpha=0.6) %>%
hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>%
hilight(node=93,fill="mediumpurple2",alpha=0.6) %>%
hilight(node=98,fill="olivedrab2",alpha=0.6) %>%
hilight(node=104,fill="orange2",alpha=0.6) %>%
hilight(node=110,fill="orangered3",alpha=0.6) %>%
hilight(node=117,fill="rosybrown2",alpha=0.6) %>%
hilight(node=141,fill="seagreen2",alpha=0.6) %>%
hilight(node=145,fill="thistle2",alpha=0.6) %>%
hilight(node=127,fill="tomato2",alpha=0.6) %>%
hilight(node=125,fill="yellow3",alpha=0.6) %>%
hilight(node=132,fill="steelblue2",alpha=0.6) + geom_text(aes(label=label),
size=3, color="black", family="Calibri", hjust=-.2, na.rm = T)

#Circular
#Note: one clade fails to highlight
ggtree(tree, layout="circular") %>%
hilight(node=134,fill="slategray2",alpha=0.6) %>%
hilight(node=82,fill="chocolate2",alpha=0.6) %>%
hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>%
hilight(node=93,fill="mediumpurple2",alpha=0.6) %>%
hilight(node=98,fill="olivedrab2",alpha=0.6) %>%
hilight(node=104,fill="orange2",alpha=0.6) %>%
hilight(node=110,fill="orangered3",alpha=0.6) %>%
hilight(node=117,fill="rosybrown2",alpha=0.6) %>%
hilight(node=141,fill="seagreen2",alpha=0.6) %>%
hilight(node=145,fill="thistle2",alpha=0.6) %>%
hilight(node=127,fill="tomato2",alpha=0.6) %>%
hilight(node=125,fill="yellow3",alpha=0.6) %>%
hilight(node=132,fill="steelblue2",alpha=0.6) +
geom_text(aes(label=label,angle=angle+90), size=3, color="black",
family="Calibri", hjust=-.2, na.rm = T)

Sincerely,

Mark

Mark E. Berres
Assistant Professor of Avian Biology
Department of Animal Sciences
University of Wisconsin - Madison
__

From: Guangchuang Yu <[email protected]mailto:[email protected]<mailto:
[email protected]mailto:[email protected]>>
Reply-To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]<mailto:
[email protected]mailto:[email protected]>>
Date: Sunday, October 25, 2015 at 8:00 AM
To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]<mailto:
[email protected]mailto:[email protected]>>
Cc: Mark Berres <[email protected]mailto:[email protected]mailto:[email protected]>
Subject: Re: [ggtree] Highlight clade function incomplete between tree
types (#19)

can you send your tree file and script to memailto:[email protected] for
testing?

Reply to this email directly or view it on GitHub<
https://github.com/GuangchuangYu/ggtree/issues/19#issuecomment-150920780>.

Reply to this email directly or view it on GitHub
#19 (comment)
.

--------------------------------------------~
Guangchuang Yu, PhD Candidate
State Key Laboratory of Emerging Infectious Diseases
School of Public Health
The University of Hong Kong
Hong Kong SAR, China
www: http://ygc.name
-----------------------------------------~---

Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-151195949.

from ggtree.

GuangchuangYu avatar GuangchuangYu commented on May 30, 2024

it seems that it is an issue of ggplot2::annotate("rect", ...). You can draw the tree in phylogram and transform it to circular form using coord_polar() function.

I just commit to Bioconductor to add angle available for even rectangular layout, you may wait several days for Bioconductor website to update the tarball. With ggtree >= 1.2.3, you can use the following command:

#Phylogram
ggtree(tree) %>% hilight(node=134,fill="slategray2",alpha=0.6) %>% 
hilight(node=82,fill="chocolate2",alpha=0.6) %>% 
hilight(node=91,fill="darkgoldenrod2",alpha=0.6) %>% 
hilight(node=93,fill="mediumpurple2",alpha=0.6) %>% 
hilight(node=98,fill="olivedrab2",alpha=0.6) %>% 
hilight(node=104,fill="orange2",alpha=0.6) %>% 
hilight(node=110,fill="orangered3",alpha=0.6) %>% 
hilight(node=117,fill="rosybrown2",alpha=0.6) %>% 
hilight(node=141,fill="seagreen2",alpha=0.6) %>% 
hilight(node=145,fill="thistle2",alpha=0.6) %>% 
hilight(node=127,fill="tomato2",alpha=0.6) %>% 
hilight(node=125,fill="yellow3",alpha=0.6) %>% 
hilight(node=132,fill="steelblue2",alpha=0.6) + 
geom_text(aes(label=label, angle=angle), size=3, color="black", 
                  family="Calibri", hjust=-.2, na.rm = T) + 
coord_polar(theta='y')

screenshot 2015-10-27 10 10 38

from ggtree.

markb729 avatar markb729 commented on May 30, 2024

Excellent! Thank you very much.

Sincerely,
Mark

From: Guangchuang Yu <[email protected]mailto:[email protected]>
Reply-To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Date: Monday, October 26, 2015 at 9:17 PM
To: GuangchuangYu/ggtree <[email protected]mailto:[email protected]>
Cc: Mark Berres <[email protected]mailto:[email protected]>
Subject: Re: [ggtree] Highlight clade function incomplete between tree types (#19)

Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-151345004.

from ggtree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.