<!DOCTYPE html> <html class="no-js"> <head lang="en-us"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=10" /> <title>Documentation - ggtree</title> <meta name="generator" content="Hugo 0.30.2" /> <meta name="description" content="Visualization and annotation of phylogenetic trees."> <link rel="canonical" href="https://guangchuangyu.github.io/ggtree/documentation/"> <meta name="author" content="Guangchuang Yu"> <meta property="og:url" content="https://guangchuangyu.github.io/ggtree/documentation/"> <meta property="og:title" content="ggtree"> <meta property="og:image" content="https://guangchuangyu.github.io/ggtree/images/gc.png"> <meta name="apple-mobile-web-app-title" content="ggtree"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <link rel="shortcut icon" type="image/x-icon" href="https://guangchuangyu.github.io/ggtree/images/favicon.ico"> <link rel="icon" type="image/x-icon" href="https://guangchuangyu.github.io/ggtree/images/favicon.ico"> <style> @font-face { font-family: 'Icon'; src: url('https://guangchuangyu.github.io/ggtree/fonts/icon.eot'); src: url('https://guangchuangyu.github.io/ggtree/fonts/icon.eot') format('embedded-opentype'), url('https://guangchuangyu.github.io/ggtree/fonts/icon.woff') format('woff'), url('https://guangchuangyu.github.io/ggtree/fonts/icon.ttf') format('truetype'), url('https://guangchuangyu.github.io/ggtree/fonts/icon.svg') format('svg'); font-weight: normal; font-style: normal; } </style> <link rel="stylesheet" href="https://guangchuangyu.github.io/ggtree/stylesheets/application.css"> <link rel="stylesheet" href="https://guangchuangyu.github.io/ggtree/stylesheets/temporary.css"> <link rel="stylesheet" href="https://guangchuangyu.github.io/ggtree/stylesheets/palettes.css"> <link rel="stylesheet" href="https://guangchuangyu.github.io/ggtree/stylesheets/highlight/highlight.css"> <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Ubuntu:400,700|Ubuntu+Mono"> <style> body, input { font-family: 'Ubuntu', Helvetica, Arial, sans-serif; } pre, code { font-family: 'Ubuntu Mono', 'Courier New', 'Courier', monospace; } </style> <script src="https://guangchuangyu.github.io/ggtree/javascripts/modernizr.js"></script> </head> <body class="palette-primary-teal palette-accent-teal"> <div class="backdrop"> <div class="backdrop-paper"></div> </div> <input class="toggle" type="checkbox" id="toggle-drawer"> <input class="toggle" type="checkbox" id="toggle-search"> <label class="toggle-button overlay" for="toggle-drawer"></label> <header class="header"> <nav aria-label="Header"> <div class="bar default"> <div class="button button-menu" role="button" aria-label="Menu"> <label class="toggle-button icon icon-menu" for="toggle-drawer"> <span></span> </label> </div> <div class="stretch"> <div class="title"> Documentation </div> </div> <div class="button button-twitter" role="button" aria-label="Twitter"> <a href="https://twitter.com/guangchuangyu" title="@guangchuangyu on Twitter" target="_blank" class="toggle-button icon icon-twitter"></a> </div> <div class="button button-github" role="button" aria-label="GitHub"> <a href="https://github.com/GuangchuangYu" title="@GuangchuangYu on GitHub" target="_blank" class="toggle-button icon icon-github"></a> </div> </div> <div class="bar search"> <div class="button button-close" role="button" aria-label="Close"> <label class="toggle-button icon icon-back" for="toggle-search"></label> </div> <div class="stretch"> <div class="field"> <input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck> </div> </div> <div class="button button-reset" role="button" aria-label="Search"> <button class="toggle-button icon icon-close" id="reset-search"></button> </div> </div> </nav> </header> <main class="main"> <div class="drawer"> <nav aria-label="Navigation"> <a href="https://github.com/GuangchuangYu/ggtree" class="project"> <div class="banner"> <div class="logo"> <img src="https://guangchuangyu.github.io/ggtree/images/gc.png"> </div> <div class="name"> <strong>ggtree </strong> <br> GuangchuangYu/ggtree </div> </div> </a> <div class="scrollable"> <div class="wrapper"> <ul class="repo"> <li class="repo-download"> <a href="https://github.com/GuangchuangYu/ggtree/archive/master.zip" target="_blank" title="Download" data-action="download"> <i class="icon icon-download"></i> Download </a> </li> <li class="repo-stars"> <a href="https://github.com/GuangchuangYu/ggtree/stargazers" target="_blank" title="Stargazers" data-action="star"> <i class="icon icon-star"></i> Stars <span class="count">–</span> </a> </li> </ul> <hr> <div class="toc"> <ul> <li> <a title="ggtree" href="../"> ggtree </a> </li> <li> <a class="current" title="Documentation" href="../documentation/"> Documentation </a> <ul id="scrollspy"> </ul> </li> <li> <a title="FAQ" href="../faq/"> FAQ </a> </li> <li> <a title="Featured Articles" href="../featured-articles/"> Featured Articles </a> </li> <li> <a title="Gallery" href="../gallery/"> Gallery </a> </li> <li> <a title="Tweets" href="../tweets/"> Tweets </a> </li> </ul> <hr> <span class="section">The author</span> <ul> <li> <a href="https://twitter.com/guangchuangyu" target="_blank" title="@guangchuangyu on Twitter"> @guangchuangyu on Twitter </a> </li> <li> <a href="https://github.com/GuangchuangYu" target="_blank" title="@GuangchuangYu on GitHub"> @GuangchuangYu on GitHub </a> </li> <li> <a href="https://guangchuangyu.github.io/blog_images/biobabble.jpg" title="关注公众号: biobabble"> @biobabble on WeChat </a> </li> <li> <a href="mailto:guangchuangyu@gmail.com" title="Email of guangchuangyu@gmail.com"> Contact via email </a> </li> </ul> <center><span class="zaln"><a href="https://guangchuangyu.github.io/2017/11/bmc-journal-protects-paper-of-plagiarism/" class="zb">Plea to against BMC</a></span></center> <center><span class="zaln"><a href="https://mp.weixin.qq.com/s?__biz=MzI5NjUyNzkxMg==&mid=2247484170&idx=1&sn=ce5f7eb6df66d79661276a64bf25b4bc&chksm=ec43b24ddb343b5b2877574153aeccd049a6824716063883edb35c2338bd32c067caf3885f53#rd" class="zb">赞赏</a></span></center> <div style="width:250px;margin:auto;"><script type="text/javascript" src="//rf.revolvermaps.com/0/0/7.js?i=5qpvv5zz7fp&m=0&c=ff0000&cr1=ffffff&sx=0" async="async"></script></div> </div> </div> </div> </nav> </div> <article class="article"> <div class="wrapper"> <h1>Documentation </h1> <p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css"></p> <div id="vignettes" class="section level2"> <h2><i class="fa fa-book"></i> Vignettes</h2> <ul> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/ggtree.html">ggtree</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/treeImport.html">Tree Data Import</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/treeVisualization.html">Tree Visualization</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/treeAnnotation.html">Tree Annotation</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/treeManipulation.html">Tree Manipulation</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/advanceTreeAnnotation.html">Advance Tree Annotation</a></li> <li><a href="https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/ggtreeUtilities.html">ggtree utilities</a></li> <li><a href="https://cran.r-project.org/web/packages/emojifont/vignettes/phylomoji.html">Phylomoji</a></li> </ul> </div> <div id="blog-posts" class="section level2"> <h2><i class="fa fa-wordpress"></i> Blog posts</h2> <div id="news-and-updates" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> News and updates</h3> <ul> <li><a href="https://guangchuangyu.github.io/2014/12/viewing-and-annotating-phylogenetic-tree-with-ggtree">viewing and annotating phylogenetic tree with ggtree</a></li> <li><a href="https://guangchuangyu.github.io/2015/01/ggtree-in-bioconductor-3.1">ggtree in Bioconductor 3.1</a></li> <li><a href="https://guangchuangyu.github.io/2015/04/bioc-31-news-of-my-bioc-packages">BioC 3.1: NEWS of my BioC packages</a></li> <li><a href="https://guangchuangyu.github.io/2015/10/bioc-32-news-of-my-bioc-packages">BioC 3.2: NEWS of my BioC packages</a></li> <li><a href="https://guangchuangyu.github.io/2015/12/news-of-ggtree">News of ggtree</a></li> <li><a href="https://guangchuangyu.github.io/2016/05/bioc-33-news-of-my-bioc-packages/">BioC 3.3: NEWS of my BioC packages</a></li> <li><a href="https://guangchuangyu.github.io/2016/10/bioc-34-news-of-my-bioc-packages">BioC 3.4: NEWS of my BioC packages</a></li> <li><a href="https://guangchuangyu.github.io/2016/08/ggtree-paper-published">ggtree paper published</a></li> </ul> </div> <div id="data-manipulation" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Data manipulation</h3> <ul> <li><a href="https://guangchuangyu.github.io/2015/09/subsetting-data-in-ggtree">subsetting data in ggtree</a></li> <li><a href="https://guangchuangyu.github.io/2016/01/ggtree-supports-phylip-tree-format">ggtree supports phylip tree format</a></li> <li><a href="http://guangchuangyu.github.io/2017/01/convert-graphic-object-to-tree-object-using-treeio/">convert graphic object to tree object using treeio</a></li> </ul> </div> <div id="tree-visualization" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Tree visualization</h3> <ul> <li><a href="https://guangchuangyu.github.io/2015/02/ggtree---updating-a-tree-view/">ggtree - updating a tree view</a></li> <li><a href="https://guangchuangyu.github.io/2015/04/an-example-of-drawing-beast-tree-using-ggtree">an example of drawing beast tree using ggtree</a></li> <li><a href="http://www.molecularecologist.com/2017/02/phylogenetic-trees-in-r-using-ggtree/">Phylogenetic trees in R using ggtree</a></li> <li><a href="https://phe-bioinformatics.github.io/blog/2017/06/14/ggtree_exploration">Growing a ggtree</a></li> <li><a href="https://phe-bioinformatics.github.io/blog/2017/07/07/ggtree_part2">Growing a ggtree - part 2, adding tip shapes</a></li> <li><a href="https://aschuerch.github.io/posts/2017-04-24-blog-post-1">Drawing a tree with colored tips in R (ggtree)</a></li> </ul> </div> <div id="tree-annotation" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Tree annotation</h3> <ul> <li><a href="https://guangchuangyu.github.io/2016/01/label-edge-number-in-ggtree">label edge number in ggtree</a></li> <li><a href="http://guangchuangyu.github.io/2016/12/edge-coloring-with-user-data/">Edge coloring with user data</a></li> <li><a href="https://guangchuangyu.github.io/2015/08/subview">subview</a></li> <li><a href="https://guangchuangyu.github.io/2016/01/annotate-a-phylogenetic-tree-with-insets">Annotate a phylogenetic tree with insets</a></li> <li><a href="https://guangchuangyu.github.io/2015/08/ggtree-annotate-phylogenetic-tree-with-local-images">ggtree annotate phylogenetic tree with local images</a></li> <li><a href="https://guangchuangyu.github.io/2016/03/embed-images-in-ggplot2-via-subview-and-annotate-a-phylogenetic-tree-with-images-using-inset-function">embed images in ggplot2 via subview and annotate a phylogenetic tree with images using inset function</a></li> <li><a href="https://guangchuangyu.github.io/2016/06/identify-method-for-ggtree">identify method for ggtree</a></li> <li><a href="https://guangchuangyu.github.io/2016/10/facet_plot-a-general-solution-to-associate-data-with-phylogenetic-tree/">facet_plot: a general solution to associate data with phylogenetic tree</a></li> <li><a href="https://guangchuangyu.github.io/2016/11/align-genomic-features-with-phylogenetic-tree/">align genomic features with phylogenetic tree</a></li> <li><a href="https://stackoverflow.com/questions/45384281/ggjoy-facet-with-ggtree">ggjoy facet with ggtree</a></li> <li><a href="https://guangchuangyu.github.io/2016/10/xlim_tree-set-x-axis-limits-for-only-tree-panel/">xlim_tree: set x axis limits for only Tree panel</a></li> <li><a href="https://guangchuangyu.github.io/2016/12/add-layer-to-specific-panel-of-facet_plot-output/">add layer to specific panel of facet_plot output</a></li> <li><a href="https://rgriff23.github.io/2017/05/11/primate-phylogeny-ggtree.html">Enhanced annotation of a primate phylogeny with ggtree</a></li> </ul> </div> <div id="tree-manipulation" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Tree manipulation</h3> <ul> <li><a href="https://guangchuangyu.github.io/2015/07/flip-and-rotate-branches-in-ggtree">flip and rotate branches in ggtree</a></li> <li><a href="https://jean.manguy.eu/post/subtrees-as-triangles-with-ggtree/">Subtrees as triangles with ggtree</a></li> </ul> </div> <div id="application" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Application</h3> <ul> <li><a href="https://guangchuangyu.github.io/2016/09/ggtree-for-microbiome-data/">ggtree for microbiome data</a></li> <li><a href="https://guangchuangyu.github.io/2016/09/ggtree-for-outbreak-data/">ggtree for outbreak data</a></li> <li><a href="http://guangchuangyu.github.io/2016/12/ggtree-version-of-plottree/">ggtree version of plotTree</a></li> <li><a href="https://guangchuangyu.github.io/2016/10/reproducible-logo-generated-by-ggtree">reproducible logo generated by ggtree</a></li> </ul> </div> <div id="funny-stuff" class="section level3"> <h3><i class="fa fa-angle-double-right"></i> Funny stuff</h3> <ul> <li><a href="https://guangchuangyu.github.io/2015/06/ggtree-with-funny-fonts">ggtree with funny fonts</a></li> <li><a href="https://guangchuangyu.github.io/2015/09/comic-phylogenetic-tree-with-ggtree-and-comicr">comic phylogenetic tree with ggtree and comicR</a></li> <li><a href="https://guangchuangyu.github.io/2015/12/use-emoji-font-in-r">use emoji font in R</a></li> </ul> </div> </div> <div id="slides" class="section level2"> <h2><i class="fa fa-slideshare"></i> Slides</h2> <ul> <li><a href="https://guangchuangyu.github.io/presentation/2014-ggplot2/">Generating publication quality figures using R & ggplot2</a></li> <li><a href="https://guangchuangyu.github.io/presentation/2016-ggtree-chinar/">ggtree for visualization and annotation of phylogenetic trees</a></li> </ul> </div> <div id="video" class="section level2"> <h2><i class="fa fa-youtube-play"></i> Video</h2> <ul> <li><a href="https://www.youtube.com/watch?v=KcF8Ec38mzI">interactive clade highlighting</a></li> <li><a href="https://www.youtube.com/watch?v=lKNn4QlPO0E">interactive rotating clades</a></li> <li><a href="https://www.youtube.com/watch?v=SmcceRD_jxg">interactive clade labeling</a></li> <li><a href="https://youtu.be/tqspAXM0UQE">R语言包ggtree 进化树绘图</a></li> </ul> </div> <div id="workflow" class="section level2"> <h2><i class="fa fa-gift"></i> Workflow</h2> <ul> <li><a href="https://rpubs.com/gutijosh9430/124817">recreate a tree from a publication (<strong>Bloom</strong> <em>et al</em>, <strong><em>Science</em></strong> 2010)</a></li> </ul> </div> <div id="workshop" class="section level2"> <h2><i class="fa fa-users"></i> Workshop</h2> <ul> <li><a href="https://4va.github.io/biodatasci/r-ggtree.html">Visualizing and Annotating Phylogenetic Trees with R+ggtree</a></li> </ul> </div> <aside class="copyright" role="note"> © 2017 Released under the Artistic-2.0 license – Documentation built with <a href="https://www.gohugo.io" target="_blank">Hugo</a> using the <a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme. </aside> <footer class="footer"> <nav class="pagination" aria-label="Footer"> <div class="previous"> <a href="https://guangchuangyu.github.io/ggtree/" title="ggtree: visualization and annotation of phylogenetic trees"> <span class="direction"> Previous </span> <div class="page"> <div class="button button-previous" role="button" aria-label="Previous"> <i class="icon icon-back"></i> </div> <div class="stretch"> <div class="title"> ggtree: visualization and annotation of phylogenetic trees </div> </div> </div> </a> </div> <div class="next"> <a href="https://guangchuangyu.github.io/ggtree/faq/" title="FAQ"> <span class="direction"> Next </span> <div class="page"> <div class="stretch"> <div class="title"> FAQ </div> </div> <div class="button button-next" role="button" aria-label="Next"> <i class="icon icon-forward"></i> </div> </div> </a> </div> </nav> </footer> </div> </article> <div class="results" role="status" aria-live="polite"> <div class="scrollable"> <div class="wrapper"> <div class="meta"></div> <div class="list"></div> </div> </div> </div> </main> <script> var base_url = 'https:\/\/guangchuangyu.github.io\/ggtree\/'; var repo_id = 'GuangchuangYu\/ggtree'; </script> <script src="https://guangchuangyu.github.io/ggtree/javascripts/application.js"></script> <script> /* Add headers to scrollspy */ var headers = document.getElementsByTagName("h2"); var scrollspy = document.getElementById('scrollspy'); if(scrollspy) { if(headers.length > 0) { for(var i = 0; i < headers.length; i++) { var li = document.createElement("li"); li.setAttribute("class", "anchor"); var a = document.createElement("a"); a.setAttribute("href", "#" + headers[i].id); a.setAttribute("title", headers[i].innerHTML); a.innerHTML = headers[i].innerHTML; li.appendChild(a) scrollspy.appendChild(li); } } else { scrollspy.parentElement.removeChild(scrollspy) } /* Add permanent link next to the headers */ var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6"); for(var i = 0; i < headers.length; i++) { var a = document.createElement("a"); a.setAttribute("class", "headerlink"); a.setAttribute("href", "#" + headers[i].id); a.setAttribute("title", "Permanent link") a.innerHTML = " "; headers[i].appendChild(a); } } </script> <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', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); var buttons = document.querySelectorAll('a'); Array.prototype.map.call(buttons, function(item) { if (item.host != document.location.host) { item.addEventListener('click', function() { var action = item.getAttribute('data-action') || 'follow'; ga('send', 'event', 'outbound', action, item.href); }); } }); var query = document.querySelector('.query'); query.addEventListener('blur', function() { if (this.value) { var path = document.location.pathname; ga('send', 'pageview', path + '?q=' + this.value); } }); </script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> </body> </html>