Functions for plots useful in HTS data analysis, using ggplot2 R package
- PCA from a matrix or a DESeq2 object
- Density plot from a data frame or a matrix
- Hierarchical clustering from a matrix or a DESeq2 object
- Dotplot for counts / gene from a matrix or a DESeq2 object
- Heatmap from a matrix or a DESeq2 object
library(devtools)
install_github("sarahbonnin/ggplot2Functions")
Example data set:
dat <- matrix(rnorm(1200), ncol=6)
Run Function:
ggplot2_pca(dat, first_pc=1, second_pc=3, samples=1:6, expGroups=rep(c("A", "B"), 3), title="test")
Example data set:
dat <- data.frame(A=rnorm(200), B=rnorm(200))
Run Function:
ggplot2_density(dat, title="test")
Example data set:
dat <- matrix(rnorm(1200), ncol=6)
Run Function:
ggplot2_dendrogram(dat, samples=1:6, expGroups=rep(c("A", "B"), 3), title="test")
Example data set:
dat <- matrix(rnorm(6), ncol=2, dimnames=list(c("A", "B", "C"), 1:2))
Run Function:
ggplot2_dotplot(dat, genes=c("A", "C"), samples=c("sample1", "sample2"))