Blog Archives

ggtree version of plotTree

December 16, 2016
By
ggtree version of plotTree

PLOTTING TREES + DATA is difficult. @DrKatHolt developed plotTree (R and Python scripts) to visualize associated data with trees, e.g. heatmap, horizontal bar etc. I reproduced the examples presented in the plotTree repo using ggtree. Source code is...

Read more »

Edge coloring with user data

December 11, 2016
By
Edge coloring with user data

Coloring edges in ggtree is quite easy, as we can map the color to numerical or categorical values via the aes(color=VAR) syntax. For user’s own data, it is also easy as ggtree provide the %<+% operator to attach user data. But as it seems not so obviously for ggtree users, see question 1, 2, and 3, I...

Read more »

scatterpie for plotting pies on ggplot

December 6, 2016
By
scatterpie for plotting pies on ggplot

Plotting pies on ggplot/ggmap is not an easy task, as ggplot2 doesn’t provide native pie geom. The pie we produced in ggplot2 is actually a barplot transform to polar coordination. This make it difficult if we want to produce a map like the above screenshot, which was posted by Tyler Rinker, the author of R package pacman.

Read more »

align genomic features with phylogenetic tree

November 15, 2016
By
align genomic features with phylogenetic tree

A question on biostars asking how to generate the following figure: This can be quite easy to implement in ggtree, I can write a geom layer to layout the alignment. As ggbio already provides many geom for genomic data and I don’t want to re-invent the wheel, I decided to try ggtree+ggbio. This is also...

Read more »

showCategory parameter for visualizing compareCluster output

November 2, 2016
By
showCategory parameter for visualizing compareCluster output

I am using dotplot() to visualize results from enrichGO(), enrichDO(), enricher() and compareCluster() in clusterProfiler R package. When specifying showCategory, I get the right number of categories except with the results of compareCluser(). In my case, I use compareCluster() on a list of 3 elements: str(ClusterList) List of 3 $ All : chr "89886" "29923" "100132891" "101410536" ... $ g1 ...

Read more »

xlim_tree: set x axis limits for only Tree panel

October 30, 2016
By
xlim_tree: set x axis limits for only Tree panel

A ggtree user recently asked me the following question in google group: I try to plot long tip labels in ggtree and usually adjust them using xlim(), however when creating a facet_plot xlim affects all plots and minimizes them. Is it possible to work around this and only affect the tree and it’s tip labels leaving the other plots...

Read more »

facet_plot: a general solution to associate data with phylogenetic tree

October 26, 2016
By
facet_plot: a general solution to associate data with phylogenetic tree

ggtree provides gheatmap for visualizing heatmap with phylogenetic tree and msaplot for visualizing multiple sequence alignment with phylogenetic tree. We may have different data types and want to visualize and align them with the tree. For example, dotplot of SNP site (e.g. using geom_point(shape='|')), barplot of trait values (e.g. using geom_barh(stat='identity')) et al. To make it easy to associate different...

Read more »

[Bioc 34] NEWS of my BioC packages

October 19, 2016
By

I have 7 packages published within the Bioconductor project. ChIPseeker clusterProfiler DOSE ggtree GOSemSim meshes ReactomePA A new package meshes was included in BioC 3.4 release. ChIPseeker For ChIPseeker, this release fixed several minor bugs. GEO data was updated, now ChIPseeker contains 20947 bed file information. CHANGES IN VERSION 1.9.8 ------------------------ o plotAvgProf/plotAvgProf2 order of panel by names of input tagMatrix List <2016-09-25, Sun> ...

Read more »

reproducible logo generated by ggtree

October 14, 2016
By
reproducible logo generated by ggtree

ggtree provides many helper functions for manupulating phylogenetic trees and make it easy to explore tree structure visually. Here, as examples, I used ggtree to draw capital character G and C, which are first letter of my name :-). To draw a tree in such shape, we need fan layout (circular layout with open angle) and then rotating the tree...

Read more »

ggtree for outbreak data

September 19, 2016
By
ggtree for outbreak data

OutbreakTools implements basic tools for the analysis of Disease Outbreaks. It defines S4 class obkData to store case-base outbreak data. It also provides a function, plotggphy, to visualize such data on the phylogenetic tree. library(OutbreakTools) data(FluH1N1pdm2009) attach(FluH1N1pdm2009) x <- new("obkData", individuals = individuals, dna = FluH1N1pdm2009$dna, dna.individualID = samples$individualID, dna.date = samples$date, ...

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)