ggheat.continuous.group ggheatmap function for plotting groups of esets, within-group column clustering

ggheat.continuous.group(
  esetlist,
  hclist,
  hrlist,
  hmcolors,
  hmtitle = "expression",
  col_lab,
  col_legend,
  ylabstr = "",
  fout,
  p.heights = c(1.5, 0.5, 5),
  xsize = 4,
  ysize = 4,
  ysizelab = 7,
  xleft = 0.15,
  xright = 0.24
)

Arguments

esetlist

list of expression sets, see ?heatmap.make.groups for preprocessing

hclist

list of column clustering from hclust or hcopt

hrlist

list of row clustering from hclust or hcopt

hmcolors

function for heatmap color gradient, default: hmcolors<-function(... ) scale_fill_gradient2(low = "blue", mid = "white", high = "red", midpoint = 0, limits=c(-3,3), oob=squish, ...)

hmtitle

title of heatmap color label, default: "expression"

col_lab

column color label to display, one or more of columns of pData(eset)

col_legend

named list of column color legends, names correspond to col_lab, see format: col_legend<-list(COL1 = list(col_breaks = COL1levels, col_values = brewer.pal(length(COL1levels),"Set1"), col_labels = COL1levels), COL2 = list(col_breaks = COL2levels, col_values = brewer.pal(length(COL2levels),"Set2"), col_labels = COL2levels))

ylabstr

y axis title string,

fout

filename to save plot, default NA, save as object, to display to device, use grid.arrange

p.heights

panel heights default c(1.5, 0.5, 5),

xsize

default 4 x axis labels (uses colnames), set to 0 to turn off display

ysize

default 4, y axis labels (uses rownames), set to 0 to turn off display

ysizelab

default 7, text size for y axis title (specified in ylabstr)

xleft

default 0.15, displayed width for left panel + margin as fraction of whole plot width

xright

default 0.24, displayed width for right margin as fraction of whole plot width

Examples

data(tcga.subset.400g.200s)
#> Warning: data set ‘tcga.subset.400g.200s’ not found
dat
#> Error in eval(expr, envir, enclos): object 'dat' not found
subtypelevels<-levels(dat$subtype)
#> Error in levels(dat$subtype): object 'dat' not found
grps<-ggheat.make.groups(eset = dat, labelcol = "subtype", #column name for grouping in pData(eset) labelvals = subtypelevels, #values to group on (e.g. factor levels of pData(eset)[, labelcol]) clustFUN = clust_eset #clustering function for eset )
#> Error in is.data.frame(x): object 'dat' not found
col_legend<-list(subtype = list(col_breaks = subtypelevels, col_values = brewer.pal(length(subtypelevels),"Set1"), col_labels = subtypelevels))
#> Error in eval(expr, envir, enclos): object 'subtypelevels' not found
esetlist<-lapply(grps$esetlist, function(i) scale_row(i))
#> Error in lapply(grps$esetlist, function(i) scale_row(i)): object 'grps' not found
hmcolors<-function(... ) scale_fill_gradient2(low = "blue", mid = "white", high = "red", midpoint = 0, limits=c(-3,3), oob=squish, ...) p<-ggheat.continuous.group(esetlist, grps$hclist, grps$hrlist, hmcolors, hmtitle = "row-zscore GE", col_lab = "subtype", col_legend = col_legend, ylabstr = "", fout = NA, p.heights = c(1.5, 0.5, 5), xsize = 0, ysize = 0, ysizelab = 7, xleft = 0.10, xright = 0.24)
#> Error in ggheat.continuous.group(esetlist, grps$hclist, grps$hrlist, hmcolors, hmtitle = "row-zscore GE", col_lab = "subtype", col_legend = col_legend, ylabstr = "", fout = NA, p.heights = c(1.5, 0.5, 5), xsize = 0, ysize = 0, ysizelab = 7, xleft = 0.1, xright = 0.24): object 'esetlist' not found