Browse code

colouring edges by user data

guangchuang yu authored on 05/10/2016 03:56:49
Showing10 changed files

... ...
@@ -2,7 +2,7 @@ PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
2 2
 PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
3 3
 PKGSRC  := $(shell basename `pwd`)
4 4
 
5
-all: alldocs check clean
5
+all: rd readme check clean
6 6
 
7 7
 alldocs: rd readme mkdocs
8 8
 
... ...
@@ -36,6 +36,8 @@ clean:
36 36
 	cd ..;\
37 37
 	$(RM) -r $(PKGNAME).Rcheck/
38 38
 
39
+site: mkdocs
40
+
39 41
 mkdocs: mdfiles
40 42
 	cd mkdocs;\
41 43
 	mkdocs build;\
... ...
@@ -185,6 +185,11 @@
185 185
             <li><a href="#inherit-aes"> inherit aes</a></li>
186 186
         
187 187
     
188
+        <li class="main "><a href="#annotation"> Annotation</a></li>
189
+        
190
+            <li><a href="#colouring-edges-by-user-data"> colouring edges by user data</a></li>
191
+        
192
+    
188 193
     </ul>
189 194
 </div></div>
190 195
             <div class="col-md-9" role="main">
... ...
@@ -210,14 +215,14 @@
210 215
 <p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css"></p>
211 216
 <h1 id="installation"><i class="fa fa-download"></i> Installation</h1>
212 217
 <h2 id="could-not-find-function"><i class="fa fa-angle-double-right"></i> Could not find function</h2>
213
-<p>If you got <a href="https://github.com/GuangchuangYu/ggtree/issues/12">this error</a>, please make sure you are using the latest R and <code>ggtree</code>. </p>
218
+<p>If you got <a href="https://github.com/GuangchuangYu/ggtree/issues/12">this error</a>, please make sure you are using the latest R and <code>ggtree</code>.</p>
214 219
 <p>Packages in Bioconductor, like <code>ggtree</code>, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to <code>devel</code> branch.</p>
215 220
 <p>Sometimes I may write blog post to introduce new functions which is not available in <code>release</code> branch, you need to install the <code>devel</code> version of <code>ggtree</code> in order to use these new functions.</p>
216 221
 <p>You can download the <code>devel</code> version of <code>ggtree</code> from <a href="http://bioconductor.org/packages/devel/bioc/html/ggtree.html">http://bioconductor.org/packages/devel/bioc/html/ggtree.html</a> and install it, or install the github version of <code>ggtree</code>.</p>
217 222
 <p>This also applied to other of my packages, including <code>GOSemSim</code>, <code>DOSE</code>, <code>clusterProfiler</code>, <code>ReactomePA</code> and <code>ChIPseeker</code>. If you got the <code>could not find function</code> error, upgrade your installation to latest release. If the error still exists after upgrading to latest release, you need to install the devel version.</p>
218 223
 <h1 id="text-label"><i class="fa fa-text-height"></i> Text &amp; Label</h1>
219 224
 <h2 id="tip-label-truncated"><i class="fa fa-angle-double-right"></i> Tip label truncated</h2>
220
-<p>ggplot2 can't auto adjust xlim based on added text. </p>
225
+<p>ggplot2 can't auto adjust xlim based on added text.</p>
221 226
 <pre><code class="r">library(ggtree)
222 227
 ## example tree from https://support.bioconductor.org/p/72398/
223 228
 tree&lt;-read.tree(text=&quot;(Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469);&quot;)
... ...
@@ -250,15 +255,18 @@ ggtree(raxml) + geom_label_repel(aes(label=bootstrap, fill=bootstrap))
250 255
 <pre><code class="r">ggtree(rtree(30)) + geom_point()
251 256
 </code></pre>
252 257
 
253
-<p>For example, we can add symbolic points to nodes with <code>geom_point()</code> directly. 
254
-The magic here is we don't need to map <code>x</code> and <code>y</code> position of the points by providing <code>aes(x, y)</code> to <code>geom_point()</code> since it was already mapped by <code>ggtree</code> function and it serves as a global mapping for all layers. </p>
255
-<p>But what if we provide a <code>dataset</code> in a layer and the <code>dataset</code> doesn't contain column of <code>x</code> and/or <code>y</code>, 
256
-the layer function also try to map <code>x</code> and <code>y</code> and also others if you map them in <code>ggtree</code> function. 
258
+<p>For example, we can add symbolic points to nodes with <code>geom_point()</code> directly.
259
+The magic here is we don't need to map <code>x</code> and <code>y</code> position of the points by providing <code>aes(x, y)</code> to <code>geom_point()</code> since it was already mapped by <code>ggtree</code> function and it serves as a global mapping for all layers.</p>
260
+<p>But what if we provide a <code>dataset</code> in a layer and the <code>dataset</code> doesn't contain column of <code>x</code> and/or <code>y</code>,
261
+the layer function also try to map <code>x</code> and <code>y</code> and also others if you map them in <code>ggtree</code> function.
257 262
 As these variable is not available in your <code>dataset</code>, you will get the following error:</p>
258 263
 <pre><code>Error in eval(expr, envir, enclos) : object 'x' not found
259 264
 </code></pre>
260 265
 
261
-<p>This can be fixed by using parameter <code>inherit.aes=FALSE</code> which will disable inheriting mapping from <code>ggtree</code> function.</p></div>
266
+<p>This can be fixed by using parameter <code>inherit.aes=FALSE</code> which will disable inheriting mapping from <code>ggtree</code> function.</p>
267
+<h1 id="annotation"><i class="fa fa-tree"></i> Annotation</h1>
268
+<h2 id="colouring-edges-by-user-data"><i class="fa fa-angle-double-right"></i> colouring edges by user data</h2>
269
+<p>see my answer on <a href="https://github.com/GuangchuangYu/ggtree/issues/76">https://github.com/GuangchuangYu/ggtree/issues/76</a>.</p></div>
262 270
         </div>
263 271
 
264 272
         <footer class="col-md-12">
... ...
@@ -211,11 +211,11 @@
211 211
   }  
212 212
   </style>
213 213
 
214
-<div id = 'chart6cf324371a9' class = 'rChart morris'></div>
214
+<div id = 'chartb34e67b891da' class = 'rChart morris'></div>
215 215
 
216 216
 <script type='text/javascript'>
217 217
     var chartParams = {
218
- "element": "chart6cf324371a9",
218
+ "element": "chartb34e67b891da",
219 219
 "width":            800,
220 220
 "height":            400,
221 221
 "xkey": "year",
... ...
@@ -229,7 +229,7 @@
229 229
 "pubid": "HtEfBTGE9r8C" 
230 230
 } 
231 231
 ],
232
-"id": "chart6cf324371a9",
232
+"id": "chartb34e67b891da",
233 233
 "labels": "cites" 
234 234
 },
235 235
       chartType = "Bar"
... ...
@@ -222,8 +222,8 @@
222 222
 <p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css"></p>
223 223
 <p><a href="https://bioconductor.org/packages/ggtree"><img alt="releaseVersion" src="https://img.shields.io/badge/release%20version-1.4.20-blue.svg?style=flat" /></a>
224 224
 <a href="https://github.com/GuangchuangYu/ggtree"><img alt="develVersion" src="https://img.shields.io/badge/devel%20version-1.5.14-blue.svg?style=flat" /></a>
225
-<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="total" src="https://img.shields.io/badge/downloads-13863/total-blue.svg?style=flat" /></a>
226
-<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="month" src="https://img.shields.io/badge/downloads-1122/month-blue.svg?style=flat" /></a></p>
225
+<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="total" src="https://img.shields.io/badge/downloads-14686/total-blue.svg?style=flat" /></a>
226
+<a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img alt="month" src="https://img.shields.io/badge/downloads-1678/month-blue.svg?style=flat" /></a></p>
227 227
 <p>The <code>ggtree</code> package extending the <code>ggplot2</code> package. It based on grammar of graphics and takes all the good parts of <code>ggplot2</code>.  <code>ggtree</code> is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree.
228 228
 <code>ggtree</code> 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>
229 229
 <h2 id="authors"><i class="fa fa-user"></i> Authors</h2>
... ...
@@ -232,7 +232,7 @@
232 232
 <p>Please cite the following article when using <code>ggtree</code>:</p>
233 233
 <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>
234 234
 <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-1-blue.svg?style=flat" /></a>
235
-<a href="https://www.altmetric.com/details/10533079"><img alt="Altmetric" src="https://img.shields.io/badge/Altmetric-167-blue.svg?style=flat" /></a></p>
235
+<a href="https://www.altmetric.com/details/10533079"><img alt="Altmetric" src="https://img.shields.io/badge/Altmetric-168-blue.svg?style=flat" /></a></p>
236 236
 <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>. <em>accepted</em>.</p>
237 237
 <h2 id="featured-articles"><i class="fa fa-pencil"></i> Featured Articles</h2>
238 238
 <p><img alt="" src="./featured_img/2015_peiyu_1-s2.0-S1567134815300721-gr1.jpg" /></p>
... ...
@@ -268,7 +268,7 @@ biocLite(&quot;ggtree&quot;)
268 268
 <h2 id="projects-that-depend-on-ggtree"><i class="fa fa-code-fork"></i> Projects that depend on <em>ggtree</em></h2>
269 269
 <h4 id="bioconductor-packages"><i class="fa fa-angle-double-right"></i> Bioconductor packages</h4>
270 270
 <ul>
271
-<li><a href="https://www.bioconductor.org/packages/LINC">LINC</a>: annotation of noncoding RNAs and coexpressed genes</li>
271
+<li><a href="https://www.bioconductor.org/packages/LINC">LINC</a>: co-expression of lincRNAs and protein-coding genes</li>
272 272
 <li><a href="https://www.bioconductor.org/packages/philr">philr</a>: Phylogenetic paritioning based ILR transform for metagenomics data</li>
273 273
 </ul>
274 274
 <h4 id="other-applications"><i class="fa fa-angle-double-right"></i> Other applications</h4>
... ...
@@ -2,7 +2,7 @@
2 2
     "docs": [
3 3
         {
4 4
             "location": "/", 
5
-            "text": "The \nggtree\n package extending the \nggplot2\n package. It based on grammar of graphics and takes all the good parts of \nggplot2\n.  \nggtree\n is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree.\n\nggtree\n is released within the \nBioconductor\n project and the source code is hosted on \n GitHub\n.\n\n\n Authors\n\n\nGuangchuang Yu and Tommy Tsan-Yuk Lam, School of Public Health, The University of Hong Kong.\n\n\n Citation\n\n\nPlease cite the following article when using \nggtree\n:\n\n\n\n\n\n\n\n\nG Yu\n, DK Smith, H Zhu, Y Guan, TTY Lam\n*\n. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. \nMethods in Ecology and Evolution\n. \naccepted\n.\n\n\n Featured Articles\n\n\n\n\n Find out more on \n \nFeatured Articles\n.\n\n\n Installation\n\n\nInstall \nggtree\n is easy, follow the guide on the \nBioconductor page\n:\n\n\n## try http:// if https:// URLs are not supported\nsource(\nhttps://bioconductor.org/biocLite.R\n)\n## biocLite(\nBiocUpgrade\n) ## you may need this\nbiocLite(\nggtree\n)\n\n\n\n\nIf you have problems when installing some of the dependent packages, please refer to the \nggtree-installation\n wiki page.\n\n\n Overview\n\n\n Getting tree into R\n\n\n\n\ntree parsers: bring evolution evidences to be used/analyzed in \nR\n\n\nmerge_tree\n: allows evolution evidences to be merged and compared\n\n\nfortify\n methods: convert tree objects into tidy data frame\n\n\n\n\n Tree visualization \n annotation\n\n\n\n\nparsing tree as a collection of nodes allows grammar of graphics to be supported\n\n\ngeom_tree\n: extends \nggplot2\n to support tree structure\n\n\nseveral layers and functions for tree annotation\n\n\nsupports annotating phylogenetic trees with user's own data\n\n\n\n\n Tree manipulation\n\n\n\n\nhelper functions for tree manipulation, make it possible to explore the tree visually\n\n\n\n\n Find out details and examples on \n \nDocumentation\n.\n\n\n Projects that depend on \nggtree\n\n\n Bioconductor packages\n\n\n\n\nLINC\n: annotation of noncoding RNAs and coexpressed genes\n\n\nphilr\n: Phylogenetic paritioning based ILR transform for metagenomics data\n\n\n\n\n Other applications\n\n\n\n\nBreadCrumbs\n: Collection of scripts for metagenomics analysis\n\n\nDegeneratePrimerTools\n: Utilities for Creating and Validating Degenerate primers\n\n\nphyloscan\n: scan phylogenies created along a genome for patterns\n\n\n\n\n Feedback\n\n\n\n    \n Please make sure you \nfollow the guide\n before posting any issue/question\n\n    \n For bugs or feature requests, please post to \n \ngithub issue\n\n    \n  For user questions, please post to \n \ngoogle group\n\n    \n We are also following every post tagged with \nggtree\n on \nBioconductor support site\n and \nBiostars\n\n    \n Join the group chat on \n and", 
5
+            "text": "The \nggtree\n package extending the \nggplot2\n package. It based on grammar of graphics and takes all the good parts of \nggplot2\n.  \nggtree\n is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree.\n\nggtree\n is released within the \nBioconductor\n project and the source code is hosted on \n GitHub\n.\n\n\n Authors\n\n\nGuangchuang Yu and Tommy Tsan-Yuk Lam, School of Public Health, The University of Hong Kong.\n\n\n Citation\n\n\nPlease cite the following article when using \nggtree\n:\n\n\n\n\n\n\n\n\nG Yu\n, DK Smith, H Zhu, Y Guan, TTY Lam\n*\n. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. \nMethods in Ecology and Evolution\n. \naccepted\n.\n\n\n Featured Articles\n\n\n\n\n Find out more on \n \nFeatured Articles\n.\n\n\n Installation\n\n\nInstall \nggtree\n is easy, follow the guide on the \nBioconductor page\n:\n\n\n## try http:// if https:// URLs are not supported\nsource(\nhttps://bioconductor.org/biocLite.R\n)\n## biocLite(\nBiocUpgrade\n) ## you may need this\nbiocLite(\nggtree\n)\n\n\n\n\nIf you have problems when installing some of the dependent packages, please refer to the \nggtree-installation\n wiki page.\n\n\n Overview\n\n\n Getting tree into R\n\n\n\n\ntree parsers: bring evolution evidences to be used/analyzed in \nR\n\n\nmerge_tree\n: allows evolution evidences to be merged and compared\n\n\nfortify\n methods: convert tree objects into tidy data frame\n\n\n\n\n Tree visualization \n annotation\n\n\n\n\nparsing tree as a collection of nodes allows grammar of graphics to be supported\n\n\ngeom_tree\n: extends \nggplot2\n to support tree structure\n\n\nseveral layers and functions for tree annotation\n\n\nsupports annotating phylogenetic trees with user's own data\n\n\n\n\n Tree manipulation\n\n\n\n\nhelper functions for tree manipulation, make it possible to explore the tree visually\n\n\n\n\n Find out details and examples on \n \nDocumentation\n.\n\n\n Projects that depend on \nggtree\n\n\n Bioconductor packages\n\n\n\n\nLINC\n: co-expression of lincRNAs and protein-coding genes\n\n\nphilr\n: Phylogenetic paritioning based ILR transform for metagenomics data\n\n\n\n\n Other applications\n\n\n\n\nBreadCrumbs\n: Collection of scripts for metagenomics analysis\n\n\nDegeneratePrimerTools\n: Utilities for Creating and Validating Degenerate primers\n\n\nphyloscan\n: scan phylogenies created along a genome for patterns\n\n\n\n\n Feedback\n\n\n\n    \n Please make sure you \nfollow the guide\n before posting any issue/question\n\n    \n For bugs or feature requests, please post to \n \ngithub issue\n\n    \n  For user questions, please post to \n \ngoogle group\n\n    \n We are also following every post tagged with \nggtree\n on \nBioconductor support site\n and \nBiostars\n\n    \n Join the group chat on \n and", 
6 6
             "title": "Home"
7 7
         }, 
8 8
         {
... ...
@@ -52,7 +52,7 @@
52 52
         }, 
53 53
         {
54 54
             "location": "/#bioconductor-packages", 
55
-            "text": "LINC : annotation of noncoding RNAs and coexpressed genes  philr : Phylogenetic paritioning based ILR transform for metagenomics data", 
55
+            "text": "LINC : co-expression of lincRNAs and protein-coding genes  philr : Phylogenetic paritioning based ILR transform for metagenomics data", 
56 56
             "title": " Bioconductor packages"
57 57
         }, 
58 58
         {
... ...
@@ -137,7 +137,7 @@
137 137
         }, 
138 138
         {
139 139
             "location": "/faq/", 
140
-            "text": "Installation\n\n\n Could not find function\n\n\nIf you got \nthis error\n, please make sure you are using the latest R and \nggtree\n. \n\n\nPackages in Bioconductor, like \nggtree\n, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to \ndevel\n branch.\n\n\nSometimes I may write blog post to introduce new functions which is not available in \nrelease\n branch, you need to install the \ndevel\n version of \nggtree\n in order to use these new functions.\n\n\nYou can download the \ndevel\n version of \nggtree\n from \nhttp://bioconductor.org/packages/devel/bioc/html/ggtree.html\n and install it, or install the github version of \nggtree\n.\n\n\nThis also applied to other of my packages, including \nGOSemSim\n, \nDOSE\n, \nclusterProfiler\n, \nReactomePA\n and \nChIPseeker\n. If you got the \ncould not find function\n error, upgrade your installation to latest release. If the error still exists after upgrading to latest release, you need to install the devel version.\n\n\n Text \n Label\n\n\n Tip label truncated\n\n\nggplot2 can't auto adjust xlim based on added text. \n\n\nlibrary(ggtree)\n## example tree from https://support.bioconductor.org/p/72398/\ntree\n-read.tree(text=\n(Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469);\n)\nggtree(tree) + geom_tiplab()\n\n\n\n\nThis is because the units are in two different spaces (data and pixel). Users can use xlim to allocate more space for tip label.\n\n\nggtree(tree) + geom_tiplab() + xlim(0, 0.06)\n\n\n\n\n Formatting (tip) labels\n\n\nIf you want to format labels, you need to set \nparse=TRUE\n in \ngeom_text\n/\ngeom_tiplab\n and the \nlabel\n should be string that can be parsed into expression and displayed as described in \n?plotmath\n.\n\n\nFor example, the tiplabels contains two parts, species name and accession number and we want to display species name in \nitalic\n, we can use command like this:\n\n\nggtree(rtree(30)) + geom_tiplab(aes(subset=node==35), label='paste(italic(\nspecies name\n), \naccession number\n)', parse=T)\n\n\n\n\n Avoid overlapping text labels\n\n\nUser can use \nggrepel\n package to repel overlapping text labels.\n\n\nFor example:\n\n\nlibrary(ggrepel)\nlibrary(ggtree)\nraxml_file \n- system.file(\nextdata/RAxML\n, \nRAxML_bipartitionsBranchLabels.H3\n, package=\nggtree\n)\nraxml \n- read.raxml(raxml_file)\nggtree(raxml) + geom_label_repel(aes(label=bootstrap, fill=bootstrap))\n\n\n\n\nFor details, please refer to \nggrepel usage examples\n.\n\n\n \naesthetic\n mapping\n\n\n inherit \naes\n\n\nggtree(rtree(30)) + geom_point()\n\n\n\n\nFor example, we can add symbolic points to nodes with \ngeom_point()\n directly. \nThe magic here is we don't need to map \nx\n and \ny\n position of the points by providing \naes(x, y)\n to \ngeom_point()\n since it was already mapped by \nggtree\n function and it serves as a global mapping for all layers. \n\n\nBut what if we provide a \ndataset\n in a layer and the \ndataset\n doesn't contain column of \nx\n and/or \ny\n, \nthe layer function also try to map \nx\n and \ny\n and also others if you map them in \nggtree\n function. \nAs these variable is not available in your \ndataset\n, you will get the following error:\n\n\nError in eval(expr, envir, enclos) : object 'x' not found\n\n\n\n\nThis can be fixed by using parameter \ninherit.aes=FALSE\n which will disable inheriting mapping from \nggtree\n function.", 
140
+            "text": "Installation\n\n\n Could not find function\n\n\nIf you got \nthis error\n, please make sure you are using the latest R and \nggtree\n.\n\n\nPackages in Bioconductor, like \nggtree\n, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to \ndevel\n branch.\n\n\nSometimes I may write blog post to introduce new functions which is not available in \nrelease\n branch, you need to install the \ndevel\n version of \nggtree\n in order to use these new functions.\n\n\nYou can download the \ndevel\n version of \nggtree\n from \nhttp://bioconductor.org/packages/devel/bioc/html/ggtree.html\n and install it, or install the github version of \nggtree\n.\n\n\nThis also applied to other of my packages, including \nGOSemSim\n, \nDOSE\n, \nclusterProfiler\n, \nReactomePA\n and \nChIPseeker\n. If you got the \ncould not find function\n error, upgrade your installation to latest release. If the error still exists after upgrading to latest release, you need to install the devel version.\n\n\n Text \n Label\n\n\n Tip label truncated\n\n\nggplot2 can't auto adjust xlim based on added text.\n\n\nlibrary(ggtree)\n## example tree from https://support.bioconductor.org/p/72398/\ntree\n-read.tree(text=\n(Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469);\n)\nggtree(tree) + geom_tiplab()\n\n\n\n\nThis is because the units are in two different spaces (data and pixel). Users can use xlim to allocate more space for tip label.\n\n\nggtree(tree) + geom_tiplab() + xlim(0, 0.06)\n\n\n\n\n Formatting (tip) labels\n\n\nIf you want to format labels, you need to set \nparse=TRUE\n in \ngeom_text\n/\ngeom_tiplab\n and the \nlabel\n should be string that can be parsed into expression and displayed as described in \n?plotmath\n.\n\n\nFor example, the tiplabels contains two parts, species name and accession number and we want to display species name in \nitalic\n, we can use command like this:\n\n\nggtree(rtree(30)) + geom_tiplab(aes(subset=node==35), label='paste(italic(\nspecies name\n), \naccession number\n)', parse=T)\n\n\n\n\n Avoid overlapping text labels\n\n\nUser can use \nggrepel\n package to repel overlapping text labels.\n\n\nFor example:\n\n\nlibrary(ggrepel)\nlibrary(ggtree)\nraxml_file \n- system.file(\nextdata/RAxML\n, \nRAxML_bipartitionsBranchLabels.H3\n, package=\nggtree\n)\nraxml \n- read.raxml(raxml_file)\nggtree(raxml) + geom_label_repel(aes(label=bootstrap, fill=bootstrap))\n\n\n\n\nFor details, please refer to \nggrepel usage examples\n.\n\n\n \naesthetic\n mapping\n\n\n inherit \naes\n\n\nggtree(rtree(30)) + geom_point()\n\n\n\n\nFor example, we can add symbolic points to nodes with \ngeom_point()\n directly.\nThe magic here is we don't need to map \nx\n and \ny\n position of the points by providing \naes(x, y)\n to \ngeom_point()\n since it was already mapped by \nggtree\n function and it serves as a global mapping for all layers.\n\n\nBut what if we provide a \ndataset\n in a layer and the \ndataset\n doesn't contain column of \nx\n and/or \ny\n,\nthe layer function also try to map \nx\n and \ny\n and also others if you map them in \nggtree\n function.\nAs these variable is not available in your \ndataset\n, you will get the following error:\n\n\nError in eval(expr, envir, enclos) : object 'x' not found\n\n\n\n\nThis can be fixed by using parameter \ninherit.aes=FALSE\n which will disable inheriting mapping from \nggtree\n function.\n\n\n Annotation\n\n\n colouring edges by user data\n\n\nsee my answer on \nhttps://github.com/GuangchuangYu/ggtree/issues/76\n.", 
141 141
             "title": "FAQ"
142 142
         }, 
143 143
         {
... ...
@@ -147,7 +147,7 @@
147 147
         }, 
148 148
         {
149 149
             "location": "/faq/#could-not-find-function", 
150
-            "text": "If you got  this error , please make sure you are using the latest R and  ggtree .   Packages in Bioconductor, like  ggtree , have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to  devel  branch.  Sometimes I may write blog post to introduce new functions which is not available in  release  branch, you need to install the  devel  version of  ggtree  in order to use these new functions.  You can download the  devel  version of  ggtree  from  http://bioconductor.org/packages/devel/bioc/html/ggtree.html  and install it, or install the github version of  ggtree .  This also applied to other of my packages, including  GOSemSim ,  DOSE ,  clusterProfiler ,  ReactomePA  and  ChIPseeker . If you got the  could not find function  error, upgrade your installation to latest release. If the error still exists after upgrading to latest release, you need to install the devel version.", 
150
+            "text": "If you got  this error , please make sure you are using the latest R and  ggtree .  Packages in Bioconductor, like  ggtree , have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to  devel  branch.  Sometimes I may write blog post to introduce new functions which is not available in  release  branch, you need to install the  devel  version of  ggtree  in order to use these new functions.  You can download the  devel  version of  ggtree  from  http://bioconductor.org/packages/devel/bioc/html/ggtree.html  and install it, or install the github version of  ggtree .  This also applied to other of my packages, including  GOSemSim ,  DOSE ,  clusterProfiler ,  ReactomePA  and  ChIPseeker . If you got the  could not find function  error, upgrade your installation to latest release. If the error still exists after upgrading to latest release, you need to install the devel version.", 
151 151
             "title": " Could not find function"
152 152
         }, 
153 153
         {
... ...
@@ -157,7 +157,7 @@
157 157
         }, 
158 158
         {
159 159
             "location": "/faq/#tip-label-truncated", 
160
-            "text": "ggplot2 can't auto adjust xlim based on added text.   library(ggtree)\n## example tree from https://support.bioconductor.org/p/72398/\ntree -read.tree(text= (Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469); )\nggtree(tree) + geom_tiplab()  This is because the units are in two different spaces (data and pixel). Users can use xlim to allocate more space for tip label.  ggtree(tree) + geom_tiplab() + xlim(0, 0.06)", 
160
+            "text": "ggplot2 can't auto adjust xlim based on added text.  library(ggtree)\n## example tree from https://support.bioconductor.org/p/72398/\ntree -read.tree(text= (Organism1.006G249400.1:0.03977,(Organism2.022118m:0.01337,(Organism3.J34265.1:0.00284,Organism4.G02633.1:0.00468)0.51:0.0104):0.02469); )\nggtree(tree) + geom_tiplab()  This is because the units are in two different spaces (data and pixel). Users can use xlim to allocate more space for tip label.  ggtree(tree) + geom_tiplab() + xlim(0, 0.06)", 
161 161
             "title": " Tip label truncated"
162 162
         }, 
163 163
         {
... ...
@@ -177,12 +177,22 @@
177 177
         }, 
178 178
         {
179 179
             "location": "/faq/#inherit-aes", 
180
-            "text": "ggtree(rtree(30)) + geom_point()  For example, we can add symbolic points to nodes with  geom_point()  directly. \nThe magic here is we don't need to map  x  and  y  position of the points by providing  aes(x, y)  to  geom_point()  since it was already mapped by  ggtree  function and it serves as a global mapping for all layers.   But what if we provide a  dataset  in a layer and the  dataset  doesn't contain column of  x  and/or  y , \nthe layer function also try to map  x  and  y  and also others if you map them in  ggtree  function. \nAs these variable is not available in your  dataset , you will get the following error:  Error in eval(expr, envir, enclos) : object 'x' not found  This can be fixed by using parameter  inherit.aes=FALSE  which will disable inheriting mapping from  ggtree  function.", 
180
+            "text": "ggtree(rtree(30)) + geom_point()  For example, we can add symbolic points to nodes with  geom_point()  directly.\nThe magic here is we don't need to map  x  and  y  position of the points by providing  aes(x, y)  to  geom_point()  since it was already mapped by  ggtree  function and it serves as a global mapping for all layers.  But what if we provide a  dataset  in a layer and the  dataset  doesn't contain column of  x  and/or  y ,\nthe layer function also try to map  x  and  y  and also others if you map them in  ggtree  function.\nAs these variable is not available in your  dataset , you will get the following error:  Error in eval(expr, envir, enclos) : object 'x' not found  This can be fixed by using parameter  inherit.aes=FALSE  which will disable inheriting mapping from  ggtree  function.", 
181 181
             "title": " inherit aes"
182 182
         }, 
183
+        {
184
+            "location": "/faq/#annotation", 
185
+            "text": "", 
186
+            "title": " Annotation"
187
+        }, 
188
+        {
189
+            "location": "/faq/#colouring-edges-by-user-data", 
190
+            "text": "see my answer on  https://github.com/GuangchuangYu/ggtree/issues/76 .", 
191
+            "title": " colouring edges by user data"
192
+        }, 
183 193
         {
184 194
             "location": "/featuredArticles/", 
185
-            "text": "Let us know if you have published using \nggtree\n and your publication will be featured here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n  .rChart {\n    display: block;\n    margin-left: auto; \n    margin-right: auto;\n    width: 800px;\n    height: 300px;\n  }  \n  \n\n\n\n\n\n\n\n    var chartParams = {\n \"element\": \"chart6cf324371a9\",\n\"width\":            800,\n\"height\":            400,\n\"xkey\": \"year\",\n\"ykeys\": [\n \"cites\" \n],\n\"data\": [\n {\n \"year\": 2016,\n\"cites\":              1,\n\"pubid\": \"HtEfBTGE9r8C\" \n} \n],\n\"id\": \"chart6cf324371a9\",\n\"labels\": \"cites\" \n},\n      chartType = \"Bar\"\n    new Morris[chartType](chartParams)\n\n\n\n\n 2016\n\n\nLack of GLYCOLATE OXIDASE 1, but not GLYCOLATE OXIDASE 2, attenuates the photorespiratory phenotype of CATALASE2-deficient \nArabidopsis\n\n\nPlant Physiology\n May. 2016 \n\n\n\n\nRange overlap drives chromosome inversion fixation in passerine birds\n\n\nbioRxiv\n May. 2016 \nhttp://dx.doi.org/10.1101/053371\n\n\n\n\nPhenotypic and Genotypic Characteristics of Shiga Toxin-Producing Escherichia coli Isolated from Surface Waters and Sediments in a Canadian Urban-Agricultural Landscape \n\n\nFront. Cell. Infect. Microbiol.\n Apr. 2016 \nhttp://dx.doi.org/10.3389%2Ffcimb.2016.00036\n\n\n\n\nWs-2\n Introgression in a Proportion of \nArabidopsis thaliana Col-0\n Stock Seed Produces Specific Phenotypes and Highlights the Importance of Routine Genetic Verification\n\n\nPlant Cell\n Mar. 2016 \nhttp://dx.doi.org/10.1105/tpc.16.00053\n\n\n\n\n 2015\n\n\nThe population genetics of drug resistance evolution in natural populations of viral, bacterial and eukaryotic pathogens \n\n\nMolecuar Ecology\n Dec. 2015 \nhttp://dx.doi.org/10.1111/mec.13474\n\n\n\n\nGenetic characterization of highly pathogenic H5 influenza viruses from poultry in Taiwan, 2015 \n\n\nInfection, Genetics and Evolution\n Dec. 2015 \nhttp://dx.doi.org/10.1016/j.meegid.2015.12.006\n\n\n\n\nTrans-species polymorphism at antimicrobial innate immunity cathelicidin genes of Atlantic cod and related species \n\n\nPeerJ\n May 2015 \nhttps://doi.org/10.7717/peerj.976", 
195
+            "text": "Let us know if you have published using \nggtree\n and your publication will be featured here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n  .rChart {\n    display: block;\n    margin-left: auto; \n    margin-right: auto;\n    width: 800px;\n    height: 300px;\n  }  \n  \n\n\n\n\n\n\n\n    var chartParams = {\n \"element\": \"chartb34e67b891da\",\n\"width\":            800,\n\"height\":            400,\n\"xkey\": \"year\",\n\"ykeys\": [\n \"cites\" \n],\n\"data\": [\n {\n \"year\": 2016,\n\"cites\":              1,\n\"pubid\": \"HtEfBTGE9r8C\" \n} \n],\n\"id\": \"chartb34e67b891da\",\n\"labels\": \"cites\" \n},\n      chartType = \"Bar\"\n    new Morris[chartType](chartParams)\n\n\n\n\n 2016\n\n\nLack of GLYCOLATE OXIDASE 1, but not GLYCOLATE OXIDASE 2, attenuates the photorespiratory phenotype of CATALASE2-deficient \nArabidopsis\n\n\nPlant Physiology\n May. 2016 \n\n\n\n\nRange overlap drives chromosome inversion fixation in passerine birds\n\n\nbioRxiv\n May. 2016 \nhttp://dx.doi.org/10.1101/053371\n\n\n\n\nPhenotypic and Genotypic Characteristics of Shiga Toxin-Producing Escherichia coli Isolated from Surface Waters and Sediments in a Canadian Urban-Agricultural Landscape \n\n\nFront. Cell. Infect. Microbiol.\n Apr. 2016 \nhttp://dx.doi.org/10.3389%2Ffcimb.2016.00036\n\n\n\n\nWs-2\n Introgression in a Proportion of \nArabidopsis thaliana Col-0\n Stock Seed Produces Specific Phenotypes and Highlights the Importance of Routine Genetic Verification\n\n\nPlant Cell\n Mar. 2016 \nhttp://dx.doi.org/10.1105/tpc.16.00053\n\n\n\n\n 2015\n\n\nThe population genetics of drug resistance evolution in natural populations of viral, bacterial and eukaryotic pathogens \n\n\nMolecuar Ecology\n Dec. 2015 \nhttp://dx.doi.org/10.1111/mec.13474\n\n\n\n\nGenetic characterization of highly pathogenic H5 influenza viruses from poultry in Taiwan, 2015 \n\n\nInfection, Genetics and Evolution\n Dec. 2015 \nhttp://dx.doi.org/10.1016/j.meegid.2015.12.006\n\n\n\n\nTrans-species polymorphism at antimicrobial innate immunity cathelicidin genes of Atlantic cod and related species \n\n\nPeerJ\n May 2015 \nhttps://doi.org/10.7717/peerj.976", 
186 196
             "title": "Featured Articles"
187 197
         }, 
188 198
         {
... ...
@@ -4,7 +4,7 @@
4 4
     
5 5
     <url>
6 6
      <loc>https://guangchuangyu.github.io/ggtree/</loc>
7
-     <lastmod>2016-09-29</lastmod>
7
+     <lastmod>2016-10-05</lastmod>
8 8
      <changefreq>daily</changefreq>
9 9
     </url>
10 10
     
... ...
@@ -12,7 +12,7 @@
12 12
     
13 13
     <url>
14 14
      <loc>https://guangchuangyu.github.io/ggtree/documentation/</loc>
15
-     <lastmod>2016-09-29</lastmod>
15
+     <lastmod>2016-10-05</lastmod>
16 16
      <changefreq>daily</changefreq>
17 17
     </url>
18 18
     
... ...
@@ -20,7 +20,7 @@
20 20
     
21 21
     <url>
22 22
      <loc>https://guangchuangyu.github.io/ggtree/faq/</loc>
23
-     <lastmod>2016-09-29</lastmod>
23
+     <lastmod>2016-10-05</lastmod>
24 24
      <changefreq>daily</changefreq>
25 25
     </url>
26 26
     
... ...
@@ -28,7 +28,7 @@
28 28
     
29 29
     <url>
30 30
      <loc>https://guangchuangyu.github.io/ggtree/featuredArticles/</loc>
31
-     <lastmod>2016-09-29</lastmod>
31
+     <lastmod>2016-10-05</lastmod>
32 32
      <changefreq>daily</changefreq>
33 33
     </url>
34 34
     
... ...
@@ -37,37 +37,37 @@
37 37
         
38 38
     <url>
39 39
      <loc>https://guangchuangyu.github.io/ggtree/ChIPseeker/</loc>
40
-     <lastmod>2016-09-29</lastmod>
40
+     <lastmod>2016-10-05</lastmod>
41 41
      <changefreq>daily</changefreq>
42 42
     </url>
43 43
         
44 44
     <url>
45 45
      <loc>https://guangchuangyu.github.io/ggtree/clusterProfiler/</loc>
46
-     <lastmod>2016-09-29</lastmod>
46
+     <lastmod>2016-10-05</lastmod>
47 47
      <changefreq>daily</changefreq>
48 48
     </url>
49 49
         
50 50
     <url>
51 51
      <loc>https://guangchuangyu.github.io/ggtree/DOSE/</loc>
52
-     <lastmod>2016-09-29</lastmod>
52
+     <lastmod>2016-10-05</lastmod>
53 53
      <changefreq>daily</changefreq>
54 54
     </url>
55 55
         
56 56
     <url>
57 57
      <loc>https://guangchuangyu.github.io/ggtree/ggtree/</loc>
58
-     <lastmod>2016-09-29</lastmod>
58
+     <lastmod>2016-10-05</lastmod>
59 59
      <changefreq>daily</changefreq>
60 60
     </url>
61 61
         
62 62
     <url>
63 63
      <loc>https://guangchuangyu.github.io/ggtree/GOSemSim/</loc>
64
-     <lastmod>2016-09-29</lastmod>
64
+     <lastmod>2016-10-05</lastmod>
65 65
      <changefreq>daily</changefreq>
66 66
     </url>
67 67
         
68 68
     <url>
69 69
      <loc>https://guangchuangyu.github.io/ggtree/ReactomePA/</loc>
70
-     <lastmod>2016-09-29</lastmod>
70
+     <lastmod>2016-10-05</lastmod>
71 71
      <changefreq>daily</changefreq>
72 72
     </url>
73 73
         
... ...
@@ -18,9 +18,9 @@
18 18
 
19 19
 # <i class="fa fa-download"></i> Installation
20 20
 
21
-## <i class="fa fa-angle-double-right"></i> Could not find function 
21
+## <i class="fa fa-angle-double-right"></i> Could not find function
22 22
 
23
-If you got [this error](https://github.com/GuangchuangYu/ggtree/issues/12), please make sure you are using the latest R and `ggtree`. 
23
+If you got [this error](https://github.com/GuangchuangYu/ggtree/issues/12), please make sure you are using the latest R and `ggtree`.
24 24
 
25 25
 Packages in Bioconductor, like `ggtree`, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to `devel` branch.
26 26
 
... ...
@@ -35,7 +35,7 @@ This also applied to other of my packages, including `GOSemSim`, `DOSE`, `cluste
35 35
 
36 36
 ## <i class="fa fa-angle-double-right"></i> Tip label truncated
37 37
 
38
-ggplot2 can't auto adjust xlim based on added text. 
38
+ggplot2 can't auto adjust xlim based on added text.
39 39
 
40 40
 ```r
41 41
 library(ggtree)
... ...
@@ -85,13 +85,13 @@ For details, please refer to [ggrepel usage examples](https://cran.r-project.org
85 85
 ggtree(rtree(30)) + geom_point()
86 86
 ```
87 87
 
88
-For example, we can add symbolic points to nodes with `geom_point()` directly. 
89
-The magic here is we don't need to map `x` and `y` position of the points by providing `aes(x, y)` to `geom_point()` since it was already mapped by `ggtree` function and it serves as a global mapping for all layers. 
88
+For example, we can add symbolic points to nodes with `geom_point()` directly.
89
+The magic here is we don't need to map `x` and `y` position of the points by providing `aes(x, y)` to `geom_point()` since it was already mapped by `ggtree` function and it serves as a global mapping for all layers.
90 90
 
91
-But what if we provide a `dataset` in a layer and the `dataset` doesn't contain column of `x` and/or `y`, 
92
-the layer function also try to map `x` and `y` and also others if you map them in `ggtree` function. 
91
+But what if we provide a `dataset` in a layer and the `dataset` doesn't contain column of `x` and/or `y`,
92
+the layer function also try to map `x` and `y` and also others if you map them in `ggtree` function.
93 93
 As these variable is not available in your `dataset`, you will get the following error:
94
- 
94
+
95 95
 ```
96 96
 Error in eval(expr, envir, enclos) : object 'x' not found
97 97
 ```
... ...
@@ -99,3 +99,8 @@ Error in eval(expr, envir, enclos) : object 'x' not found
99 99
 This can be fixed by using parameter `inherit.aes=FALSE` which will disable inheriting mapping from `ggtree` function.
100 100
 
101 101
 
102
+# <i class="fa fa-tree"></i> Annotation
103
+
104
+## <i class="fa fa-angle-double-right"></i> colouring edges by user data
105
+
106
+see my answer on <https://github.com/GuangchuangYu/ggtree/issues/76>.
... ...
@@ -36,10 +36,10 @@ Let us know if you have published using `ggtree` and your publication will be fe
36 36
   }  
37 37
   </style>
38 38
 
39
-<div id = 'chart6cf324371a9' class = 'rChart morris'></div>
39
+<div id = 'chartb34e67b891da' class = 'rChart morris'></div>
40 40
 <script type='text/javascript'>
41 41
     var chartParams = {
42
- "element": "chart6cf324371a9",
42
+ "element": "chartb34e67b891da",
43 43
 "width":            800,
44 44
 "height":            400,
45 45
 "xkey": "year",
... ...
@@ -53,7 +53,7 @@ Let us know if you have published using `ggtree` and your publication will be fe
53 53
 "pubid": "HtEfBTGE9r8C" 
54 54
 } 
55 55
 ],
56
-"id": "chart6cf324371a9",
56
+"id": "chartb34e67b891da",
57 57
 "labels": "cites" 
58 58
 },
59 59
       chartType = "Bar"
... ...
@@ -17,8 +17,8 @@
17 17
 
18 18
 [![releaseVersion](https://img.shields.io/badge/release%20version-1.4.20-blue.svg?style=flat)](https://bioconductor.org/packages/ggtree)
19 19
 [![develVersion](https://img.shields.io/badge/devel%20version-1.5.14-blue.svg?style=flat)](https://github.com/GuangchuangYu/ggtree)
20
-[![total](https://img.shields.io/badge/downloads-13863/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
21
-[![month](https://img.shields.io/badge/downloads-1122/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
20
+[![total](https://img.shields.io/badge/downloads-14686/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
21
+[![month](https://img.shields.io/badge/downloads-1678/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
22 22
 
23 23
 
24 24
 The `ggtree` package extending the `ggplot2` package. It based on grammar of graphics and takes all the good parts of `ggplot2`.  `ggtree` is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree.
... ...
@@ -35,7 +35,7 @@ Please cite the following article when using `ggtree`:
35 35
 
36 36
 [![doi](https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat)](http://dx.doi.org/10.1111/2041-210X.12628)
37 37
 [![citation](https://img.shields.io/badge/cited%20by-1-blue.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627)
38
-[![Altmetric](https://img.shields.io/badge/Altmetric-167-blue.svg?style=flat)](https://www.altmetric.com/details/10533079)
38
+[![Altmetric](https://img.shields.io/badge/Altmetric-168-blue.svg?style=flat)](https://www.altmetric.com/details/10533079)
39 39
 
40 40
 __G Yu__, 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. __*Methods in Ecology and Evolution*__. *accepted*.
41 41
 
... ...
@@ -86,7 +86,7 @@ If you have problems when installing some of the dependent packages, please refe
86 86
 
87 87
 
88 88
 #### <i class="fa fa-angle-double-right"></i> Bioconductor packages
89
-+ [LINC](https://www.bioconductor.org/packages/LINC): annotation of noncoding RNAs and coexpressed genes
89
++ [LINC](https://www.bioconductor.org/packages/LINC): co-expression of lincRNAs and protein-coding genes
90 90
 + [philr](https://www.bioconductor.org/packages/philr): Phylogenetic paritioning based ILR transform for metagenomics data
91 91
 
92 92
 #### <i class="fa fa-angle-double-right"></i> Other applications
... ...
@@ -5,9 +5,9 @@
5 5
 
6 6
 # <i class="fa fa-download"></i> Installation
7 7
 
8
-## <i class="fa fa-angle-double-right"></i> Could not find function 
8
+## <i class="fa fa-angle-double-right"></i> Could not find function
9 9
 
10
-If you got [this error](https://github.com/GuangchuangYu/ggtree/issues/12), please make sure you are using the latest R and `ggtree`. 
10
+If you got [this error](https://github.com/GuangchuangYu/ggtree/issues/12), please make sure you are using the latest R and `ggtree`.
11 11
 
12 12
 Packages in Bioconductor, like `ggtree`, have different release policy compare to CRAN. There are two branches, release and devel, in parallel. Release branch is more stable and only document improvement and bug fixes will commit to it. New functions will only commit to `devel` branch.
13 13
 
... ...
@@ -22,7 +22,7 @@ This also applied to other of my packages, including `GOSemSim`, `DOSE`, `cluste
22 22
 
23 23
 ## <i class="fa fa-angle-double-right"></i> Tip label truncated
24 24
 
25
-ggplot2 can't auto adjust xlim based on added text. 
25
+ggplot2 can't auto adjust xlim based on added text.
26 26
 
27 27
 ```r
28 28
 library(ggtree)
... ...
@@ -72,13 +72,13 @@ For details, please refer to [ggrepel usage examples](https://cran.r-project.org
72 72
 ggtree(rtree(30)) + geom_point()
73 73
 ```
74 74
 
75
-For example, we can add symbolic points to nodes with `geom_point()` directly. 
76
-The magic here is we don't need to map `x` and `y` position of the points by providing `aes(x, y)` to `geom_point()` since it was already mapped by `ggtree` function and it serves as a global mapping for all layers. 
75
+For example, we can add symbolic points to nodes with `geom_point()` directly.
76
+The magic here is we don't need to map `x` and `y` position of the points by providing `aes(x, y)` to `geom_point()` since it was already mapped by `ggtree` function and it serves as a global mapping for all layers.
77 77
 
78
-But what if we provide a `dataset` in a layer and the `dataset` doesn't contain column of `x` and/or `y`, 
79
-the layer function also try to map `x` and `y` and also others if you map them in `ggtree` function. 
78
+But what if we provide a `dataset` in a layer and the `dataset` doesn't contain column of `x` and/or `y`,
79
+the layer function also try to map `x` and `y` and also others if you map them in `ggtree` function.
80 80
 As these variable is not available in your `dataset`, you will get the following error:
81
- 
81
+
82 82
 ```
83 83
 Error in eval(expr, envir, enclos) : object 'x' not found
84 84
 ```
... ...
@@ -86,3 +86,8 @@ Error in eval(expr, envir, enclos) : object 'x' not found
86 86
 This can be fixed by using parameter `inherit.aes=FALSE` which will disable inheriting mapping from `ggtree` function.
87 87
 
88 88
 
89
+# <i class="fa fa-tree"></i> Annotation
90
+
91
+## <i class="fa fa-angle-double-right"></i> colouring edges by user data
92
+
93
+see my answer on <https://github.com/GuangchuangYu/ggtree/issues/76>.