Row Annotation in ComplexHeatmap
library(grid)
library(circlize)
## ========================================
## circlize version 0.4.5
## CRAN page: https://cran.r-project.org/package=circlize
## Github page: https://github.com/jokergoo/circlize
## Documentation: http://jokergoo.github.io/circlize_book/book/
##
## If you use it in published research, please cite:
## Gu, Z. circlize implements and enhances circular visualization
## in R. Bioinformatics 2014.
## ========================================
library(ComplexHeatmap)
## ========================================
## ComplexHeatmap version 1.20.0
## Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/
## Github page: https://github.com/jokergoo/ComplexHeatmap
## Documentation: http://bioconductor.org/packages/ComplexHeatmap/
##
## If you use it in published research, please cite:
## Gu, Z. Complex heatmaps reveal patterns and correlations in multidimensional
## genomic data. Bioinformatics 2016.
## ========================================
setwd("C:/Users/shi-lab/Documents/psi")
sp = read.csv("M1SD_BCR_SP.csv", header=TRUE, sep=,)
psi = read.csv("M1SD_BCR_PSI.csv", header=TRUE, sep=,)
fpkm = read.csv("M1SD_BCR_FPKM.csv", header=TRUE, sep=,)
rownames(sp) = sp$GeneID
rownames(psi) = psi$GeneID
rownames(fpkm) = fpkm$GeneID
sp = subset(sp, select=-GeneID)
psi = subset(psi, select=-GeneID)
fpkm = subset(fpkm, select=-GeneID)
h_fpkm = Heatmap(fpkm, name = "fpkm", column_title = "M1SD BCR Gene Expression", col=colorRamp2(c(0,260), c("blue", "red")), show_row_names = TRUE, cluster_columns = FALSE, cluster_rows = FALSE, row_names_gp = gpar(fontsize=8))
h_sp = Heatmap(sp, name = "sp", column_title = "M1SD BCR Splicing Events", col=colorRamp2(c(0,90), c("blue", "red")), show_row_names = FALSE, cluster_columns = FALSE, cluster_rows = FALSE)
h_psi = rowAnnotation(row_barplot = row_anno_barplot(psi, ylim=c(0,100), border = FALSE, axis=TRUE, bar_width=1), width=unit(1,"cm"))
h = h_psi + h_sp + h_fpkm
draw(h)
