Last data update: 2014.03.03

R: Annotated heatmaps
annHeatmapR Documentation

Annotated heatmaps

Description

Creating heatmaps with annotated columns

Usage

    annHeatmap(x, ...)

    ## Default S3 method:
annHeatmap(x, annotation, dendrogram = list(clustfun = hclust, distfun = dist, Col = list(status = "yes"), Row = list(status = "hidden")), cluster = NULL, labels = NULL, legend = TRUE, ...)

    ## S3 method for class 'ExpressionSet'
annHeatmap(x, ...)

Arguments

x

either a numerical matrix with the data for the central heatmap (for the default method) or an object of class ExpressionSet

annotation

a data frame containing the annotation for the columns of x

dendrogram

a list controlling the options for row- and column dendrogram, see annHeatmap2

cluster

a list controlling the options for clustering rows and columns of x, see annHeatmap2

labels

a list controlling the row- and column labels as well as their location and size, see annHeatmap2

legend

either a logical value, indicating whether to draw a legend at the default location determined by the function, or one of the sides of the plot (1-4), see annHeatmap2

...

extra options passed to annHeatmap2

Details

These functions generate an object representing the heatmap; in order to produce graphical output, you have to invoke the plot method, see Examples.

Value

An object of class annHeatmap

Warning

These are currently simple convenience functions that allow quick plotting, but little control over the finer details. This may change in the future, but for now, if you want to do anything fancy, you should invoke annHeatmap2 directly.

See Also

annHeatmap2, plot.annHeatmap

Examples


    ## Default method
    set.seed(219)
    mat = matrix(rnorm(100), ncol=5)
    ann = data.frame(Class=c("A","A","B","A","B"))
    map1 = annHeatmap(mat, ann)
    plot(map1)
    
    ## Expression set
    require(Biobase)
    data(sample.ExpressionSet)
    map2 = annHeatmap(sample.ExpressionSet)
    plot(map2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Heatplus)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Heatplus/annHeatmap.Rd_%03d_medium.png", width=480, height=480)
> ### Name: annHeatmap
> ### Title: Annotated heatmaps
> ### Aliases: annHeatmap annHeatmap.default annHeatmap.ExpressionSet
> ### Keywords: hplot
> 
> ### ** Examples
> 
> 
>     ## Default method
>     set.seed(219)
>     mat = matrix(rnorm(100), ncol=5)
>     ann = data.frame(Class=c("A","A","B","A","B"))
>     map1 = annHeatmap(mat, ann)
>     plot(map1)
>     
>     ## Expression set
>     require(Biobase)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

>     data(sample.ExpressionSet)
>     map2 = annHeatmap(sample.ExpressionSet)
>     plot(map2)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>