<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        <meta name="author" content="Guangchuang Yu">
        <link rel="canonical" href="https://guangchuangyu.github.io/ggtree/">
        <link rel="shortcut icon" href="./img/favicon.ico">

	<title>ggtree</title>

        <link href="./css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="./css/font-awesome-4.0.3.css" rel="stylesheet">
        <link rel="stylesheet" href="./css/highlight.css">
        <link href="./css/base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        
        <script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

            ga('create', 'UA-77901140-1', 'guangchuangyu.github.io');
            ga('send', 'pageview');
        </script>
        
    </head>

    <body>

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">

        <!-- Collapsed navigation -->
        <div class="navbar-header">
            <!-- Expander button -->
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <!-- Main title -->
            <a class="navbar-brand" href=".">ggtree</a>
        </div>

        <!-- Expanded navigation -->
        <div class="navbar-collapse collapse">
            <!-- Main navigation -->
            <ul class="nav navbar-nav">
            
            
                <li class="active">
                    <a href=".">Home</a>
                </li>
            
            
            
                <li >
                    <a href="documentation/">Documentation</a>
                </li>
            
            
            
                <li >
                    <a href="faq/">FAQ</a>
                </li>
            
            
            
                <li >
                    <a href="featuredArticles/">Featured Articles</a>
                </li>
            
            
            
                <li >
                    <a href="gallery/">Gallery</a>
                </li>
            
            
            
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">My Software <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    
                        
<li >
    <a href="ChIPseeker/">ChIPseeker</a>
</li>

                    
                        
<li >
    <a href="clusterProfiler/">clusterProfiler</a>
</li>

                    
                        
<li >
    <a href="DOSE/">DOSE</a>
</li>

                    
                        
<li >
    <a href="emojifont/">emojifont</a>
</li>

                    
                        
<li >
    <a href="ggtree/">ggtree</a>
</li>

                    
                        
<li >
    <a href="GOSemSim/">GOSemSim</a>
</li>

                    
                        
<li >
    <a href="meshes/">meshes</a>
</li>

                    
                        
<li >
    <a href="ReactomePA/">ReactomePA</a>
</li>

                    
                        
<li >
    <a href="treeio/">treeio</a>
</li>

                    
                    </ul>
                </li>
            
            
            </ul>

            <!-- Search, Navigation and Repo links -->
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
                        <i class="fa fa-search"></i> Search
                    </a>
                </li>
                <li class="disabled">
                    <a rel="next" >
                        <i class="fa fa-arrow-left"></i> Previous
                    </a>
                </li>
                <li >
                    <a rel="prev" href="documentation/">
                        Next <i class="fa fa-arrow-right"></i>
                    </a>
                </li>
                
                <li>
                    <a href="https://github.com/GuangchuangYu/ggtree">
                        
                            <i class="fa fa-github"></i>
                        
                        GitHub
                    </a>
                </li>
                
            </ul>
        </div>
    </div>
</div>

        <div class="container">
            <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
    <ul class="nav bs-sidenav">
    
        <li class="main active"><a href="#ggtree-an-r-package-for-visualization-and-annotation-of-phylogenetic-trees-with-their-covariates-and-other-associated-data">ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data</a></li>
        
            <li><a href="#authors"> Authors</a></li>
        
            <li><a href="#citation"> Citation</a></li>
        
            <li><a href="#featured-articles"> Featured Articles</a></li>
        
            <li><a href="#installation"> Installation</a></li>
        
            <li><a href="#overview"> Overview</a></li>
        
            <li><a href="#projects-that-depend-on-ggtree"> Projects that depend on ggtree</a></li>
        
            <li><a href="#feedback"> Feedback</a></li>
        
    
    </ul>
</div></div>
            <div class="col-md-9" role="main">

<h1 id="ggtree-an-r-package-for-visualization-and-annotation-of-phylogenetic-trees-with-their-covariates-and-other-associated-data">ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data</h1>
<!-- AddToAny BEGIN -->

<div class="a2a_kit a2a_kit_size_32 a2a_default_style">

<a class="a2a_dd" href="//www.addtoany.com/share"></a>
<a class="a2a_button_facebook"></a> <a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a>
<a class="a2a_button_pinterest"></a> <a class="a2a_button_reddit"></a>
<a class="a2a_button_sina_weibo"></a> <a class="a2a_button_wechat"></a>
<a class="a2a_button_douban"></a>

</div>

<script async src="//static.addtoany.com/menu/page.js"></script>

<!-- AddToAny END -->

<p><img src="https://raw.githubusercontent.com/jotsetung/BioC-stickers/master/ggtree/ggtree.png" height="128", align="right" /></p>
<p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css">
<link rel="stylesheet" href="https://guangchuangyu.github.io/css/academicons.min.css"></p>
<p><a href="https://bioconductor.org/packages/ggtree"><img alt="releaseVersion" src="https://img.shields.io/badge/release%20version-1.6.10-blue.svg?style=flat" /></a>
<a href="https://github.com/guangchuangyu/ggtree"><img alt="develVersion" src="https://img.shields.io/badge/devel%20version-1.7.9-blue.svg?style=flat" /></a>
<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="total" src="https://img.shields.io/badge/downloads-12364/total-blue.svg?style=flat" /></a>
<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="month" src="https://img.shields.io/badge/downloads-932/month-blue.svg?style=flat" /></a></p>
<p>The <code>ggtree</code> package extending the <em>ggplot2</em> package. It based on
grammar of graphics and takes all the good parts of <em>ggplot2</em>. <em>ggtree</em>
is designed for not only viewing phylogenetic tree but also displaying
annotation data on the tree. <em>ggtree</em> is released within the
<a href="https://bioconductor.org/packages/ggtree/">Bioconductor</a> project and
the source code is hosted on
<a href="https://github.com/GuangchuangYu/ggtree"><i class="fa fa-github fa-lg"></i>
GitHub</a>.</p>
<h2 id="authors"><i class="fa fa-user"></i> Authors</h2>
<p>Guangchuang Yu and Tommy Tsan-Yuk Lam, School of Public Health, The
University of Hong Kong.</p>
<p><a href="https://twitter.com/guangchuangyu"><i class="fa fa-twitter fa-3x"></i></a>
<a href="https://guangchuangyu.github.io/blog_images/biobabble.jpg"><i class="fa fa-wechat fa-3x"></i></a>
<a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Guangchuang+Yu[Author+-+Full]"><i class="ai ai-pubmed ai-3x"></i></a>
<a href="https://scholar.google.com.hk/citations?user=DO5oG40AAAAJ&hl=en"><i class="ai ai-google-scholar ai-3x"></i></a>
<a href="https://orcid.org/0000-0002-6485-8781"><i class="ai ai-orcid ai-3x"></i></a>
<a href="https://impactstory.org/u/0000-0002-6485-8781"><i class="ai ai-impactstory ai-3x"></i></a></p>
<h2 id="citation"><i class="fa fa-book"></i> Citation</h2>
<p>Please cite the following article when using <code>ggtree</code>:</p>
<p><a href="http://dx.doi.org/10.1111/2041-210X.12628"><img alt="doi" src="https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat" /></a>
<a href="https://scholar.google.com.hk/scholar?oi=bibs&amp;hl=en&amp;cites=7268358477862164627"><img alt="citation" src="https://img.shields.io/badge/cited%20by-8-blue.svg?style=flat" /></a>
<a href="https://www.altmetric.com/details/10533079"><img alt="Altmetric" src="https://img.shields.io/badge/Altmetric-352-blue.svg?style=flat" /></a></p>
<p><strong>G Yu</strong>, DK Smith, H Zhu, Y Guan, TTY Lam<sup>*</sup>. ggtree: an R
package for visualization and annotation of phylogenetic trees with
their covariates and other associated data. <strong><em>Methods in Ecology and
Evolution</em></strong>. 2017, 8(1):28-36.</p>
<h2 id="featured-articles"><i class="fa fa-pencil"></i> Featured Articles</h2>
<p><img alt="" src="https://guangchuangyu.github.io/featured_img/ggtree/2015_peiyu_1-s2.0-S1567134815300721-gr1.jpg" /></p>
<p><i class="fa fa-hand-o-right"></i> Find out more on
<i class="fa fa-pencil"></i> <a href="https://guangchuangyu.github.io/ggtree/featuredArticles/">Featured
Articles</a>.</p>
<h2 id="installation"><i class="fa fa-download"></i> Installation</h2>
<p>Install <code>ggtree</code> is easy, follow the guide on the <a href="https://bioconductor.org/packages/ggtree/">Bioconductor
page</a>:</p>
<pre><code class="r">## try http:// if https:// URLs are not supported
source(&quot;https://bioconductor.org/biocLite.R&quot;)
## biocLite(&quot;BiocUpgrade&quot;) ## you may need this
biocLite(&quot;ggtree&quot;)
</code></pre>

<p>If you have problems when installing some of the dependent packages,
please refer to the
<a href="https://github.com/GuangchuangYu/ggtree/wiki/ggtree-installation">ggtree-installation</a>
wiki page.</p>
<h2 id="overview"><i class="fa fa-cogs"></i> Overview</h2>
<h4 id="getting-tree-into-r"><i class="fa fa-angle-double-right"></i> Getting tree into R</h4>
<ul>
<li>tree parsers: bring evolution evidences to be used/analyzed in <code>R</code></li>
<li><code>merge_tree</code>: allows evolution evidences to be merged and compared</li>
<li><code>fortify</code> methods: convert tree objects into tidy data frame</li>
</ul>
<h4 id="tree-visualization-annotation"><i class="fa fa-angle-double-right"></i> Tree visualization &amp; annotation</h4>
<ul>
<li>parsing tree as a collection of nodes allows grammar of graphics to
    be supported</li>
<li><code>geom_tree</code>: extends <code>ggplot2</code> to support tree structure</li>
<li>several layers and functions for tree annotation</li>
<li>supports annotating phylogenetic trees with user's own data</li>
</ul>
<h4 id="tree-manipulation"><i class="fa fa-angle-double-right"></i> Tree manipulation</h4>
<ul>
<li>helper functions for tree manipulation, make it possible to explore
    the tree visually</li>
</ul>
<p><i class="fa fa-hand-o-right"></i> Find out details and examples on
<i class="fa fa-book"></i>
<a href="https://guangchuangyu.github.io/ggtree/documentation/">Documentation</a>.</p>
<h2 id="projects-that-depend-on-ggtree"><i class="fa fa-code-fork"></i> Projects that depend on <em>ggtree</em></h2>
<h4 id="cran-packages"><i class="fa fa-angle-double-right"></i> CRAN packages</h4>
<ul>
<li><a href="https://cran.r-project.org/package=harrietr">harrietr</a>: Wrangle
    Phylogenetic Distance Matrices and Other Utilities</li>
</ul>
<h4 id="bioconductor-packages"><i class="fa fa-angle-double-right"></i> Bioconductor packages</h4>
<ul>
<li><a href="https://www.bioconductor.org/packages/LINC">LINC</a>: co-expression of
    lincRNAs and protein-coding genes</li>
<li><a href="https://www.bioconductor.org/packages/philr">philr</a>: Phylogenetic
    partitioning based ILR transform for metagenomics data</li>
</ul>
<h4 id="other-applications"><i class="fa fa-angle-double-right"></i> Other applications</h4>
<ul>
<li><a href="https://bitbucket.org/biobakery/breadcrumbs">BreadCrumbs</a>:
    Collection of scripts for metagenomics analysis</li>
<li><a href="https://github.com/esnapd/DegeneratePrimerTools">DegeneratePrimerTools</a>:
    Utilities for Creating and Validating Degenerate primers</li>
<li><a href="https://github.com/olli0601/phyloscan">phyloscan</a>: scan phylogenies
    created along a genome for patterns</li>
</ul>
<h2 id="feedback"><i class="fa fa-comments"></i> Feedback</h2>
<ul class="fa-ul">
    <li><i class="fa-li fa fa-hand-o-right"></i> Please make sure you have followed <a href="https://guangchuangyu.github.io/2016/07/how-to-bug-author/"><strong>the important guide</strong></a> before posting any issue/question</li>
    <li><i class="fa-li fa fa-bug"></i> For bugs or feature requests, please post to <i class="fa fa-github-alt"></i> <a href="https://github.com/GuangchuangYu/ggtree/issues">github issue</a></li>
    <li><i class="fa-li fa fa-question"></i>  For user questions, please post to <i class="fa fa-google"></i> <a href="https://groups.google.com/forum/#!forum/bioc-ggtree">google group</a></li>
    <li><i class="fa-li fa fa-support"></i> We are also following every post tagged with <strong>ggtree</strong> on <a href="https://support.bioconductor.org">Bioconductor support site</a> and <a href="https://www.biostars.org">Biostars</a></li>
    <li><i class="fa-li fa fa-commenting"></i> Join the group chat on <a href="https://twitter.com/hashtag/ggtree"><i class="fa fa-twitter fa-lg"></i></a> and <a href="http://huati.weibo.com/k/ggtree"><i class="fa fa-weibo fa-lg"></i></a></li>

</ul></div>
        </div>

        <footer class="col-md-12">
            <hr>
            
                <center>Copyright &copy; 2016 <a href="https://guangchuangyu.github.io">Guangchuang Yu</a>.<div style="width:250px;margin:auto;"><script type="text/javascript" src="//rf.revolvermaps.com/0/0/7.js?i=5qpvv5zz7fp&amp;m=0&amp;c=ff0000&amp;cr1=ffffff&amp;sx=0" async="async"></script></div></center>
            
            <center>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</center>
        </footer>

        <script src="./js/jquery-1.10.2.min.js"></script>
        <script src="./js/bootstrap-3.0.3.min.js"></script>
        <script src="./js/highlight.pack.js"></script>
        <script>var base_url = '.';</script>
        <script data-main="./mkdocs/js/search.js" src="./mkdocs/js/require.js"></script>
        <script src="./js/base.js"></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="exampleModalLabel">Search</h4>
                    </div>
                    <div class="modal-body">
                        <p>
                            From here you can search these documents. Enter
                            your search terms below.
                        </p>
                        <form role="form">
                            <div class="form-group">
                                <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query">
                            </div>
                        </form>
                        <div id="mkdocs-search-results"></div>
                    </div>
                    <div class="modal-footer">
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>