R/hmap.R

## hmap <- function(x, fcol, pcol, ...) {
##     hap <- new("HeatmapAnnotation")
##     if (missing(pcol) & ncol(pData(x)) > 0) {
##         hap <- HeatmapAnnotation(pData(x))
##     } else {
##         hap <- HeatmapAnnotation(pData(x)[, pcol, drop=FALSE])
##     }
##     hm <- Heatmap(exprs(x), top_annotation = hap, ...)
##     if (!missing(fcol)) {
##         haf <- rowAnnotation(fData(x)[, fcol, drop = FALSE])
##         hm <- hm + haf
##     }
##     print(hm)
##     invisible(hm)
## }

Try the MSnbase package in your browser

Any scripts or data that you put into this service are public.

MSnbase documentation built on Jan. 23, 2021, 2 a.m.