heatmapGenomewide {AneuFinder} | R Documentation

## Genome wide heatmap of CNV-state

### Description

Plot a genome wide heatmap of copy number variation state. This heatmap is best plotted to file, because in most cases it will be too big for cleanly plotting it to screen.

### Usage

    heatmapGenomewide(hmms, ylabels = NULL, classes = NULL,
      reorder.by.class = TRUE, classes.color = NULL, file = NULL,
      cluster = TRUE, plot.breakpoints = FALSE, hotspots = NULL,
      exclude.regions = NULL)

### Arguments

`hmms` | A list of `aneuHMM` objects or a character vector with files that contain such objects.
`ylabels` | A vector with labels for the y-axis. The vector must have the same length as `hmms`. If `NULL` the IDs from the `aneuHMM` objects will be used.
`classes` | A character vector with the classification of the elements on the y-axis. The vector must have the same length as `hmms`.
`reorder.by.class` | If `TRUE`, the dendrogram will be reordered to display similar classes next to each other.
`classes.color` | A (named) vector with colors that are used to distinguish `classes`. Names must correspond to the unique elements in `classes`.
`file` | A PDF file to which the heatmap will be plotted.
`cluster` | Either `TRUE` or `FALSE`, indicating whether the samples should be clustered by similarity in their CNV-state.
`plot.breakpoints` | Logical indicating whether breakpoints should be plotted.
`hotspots` | A `GRanges-class` object with coordinates of genomic hotspots (see `hotspotter`).
`exclude.regions` | A `GRanges-class` with regions that will be excluded from the computation of the clustering. This can be useful to exclude regions with artifacts.

### Value

A `ggplot` object or `NULL` if a file was specified.

### Examples

    ## Get results from a small-cell-lung-cancer
    lung.folder <- system.file("extdata", "primary-lung", "hmms", package="AneuFinderData")
    lung.files <- list.files(lung.folder, full.names=TRUE)
    ## Get results from the liver metastasis of the same patient
    liver.folder <- system.file("extdata", "metastasis-liver", "hmms", package="AneuFinderData")
    liver.files <- list.files(liver.folder, full.names=TRUE)
    ## Plot a clustered heatmap
    classes <- c(rep('lung', length(lung.files)), rep('liver', length(liver.files)))
    labels <- c(paste('lung',1:length(lung.files)), paste('liver',1:length(liver.files)))
    heatmapGenomewide(c(lung.files, liver.files), ylabels=labels, classes=classes,
                     classes.color=c('blue','red'))

[Package AneuFinder version 1.20.0 Index]