Skip to content

Instantly share code, notes, and snippets.

View pradyumnasagar's full-sized avatar
🎯
Focusing

Pradyumna Jayaram pradyumnasagar

🎯
Focusing
View GitHub Profile
@jnhutchinson
jnhutchinson / pheatmap.r
Created April 23, 2013 21:20
pheatmap for pathprint
# annotations
heatmap.annots <- pData(mic.norm.eset)[,c("ID", "study", "stage", "gender")]
heatmap.annots <- as.data.frame(apply(heatmap.annots, 2, unlist))
row.names(heatmap.annots) <- heatmap.annots$ID
heatmap.annots$ID <- NULL
# annotation colors
study_colors <- c("#FF0000","#00FF00", "#0000FF", cbPalette )
names(study_colors) <- unique(unlist(pd$study))
stage_colors <- c("white", "darkgrey", "black")
names(stage_colors) <- unique(unlist(pd$stage))
source("http://bioconductor.org/biocLite.R") #adds bioconductor site as a package source
BiocLite(“pheatmap”) #downloads and install pheatmap package from bioconductor
library(pheatmap) #loads pheatmap package
install.packages(“RColorBrewer”) #donwnloads and installs a package with useful color themes
Library(RColorBrewer) #load RcolorBrewer package
#LOAD DATA
data=read.delim(“KO-WT-OV-3way.sig.batch.exprs.xls”) #read in expression values for significantly correlated probesets
data=data[,1:6] #subsets data remove the gene symbols, names or EntrezIDs