R: Create a heatmap of OTU counts.

otu_heatmap {qiimer} | R Documentation

## Create a heatmap of OTU counts.

### Description

Create a heatmap of OTU counts.

### Usage

    otu_heatmap(otu_counts, assignments, threshold = 0, plot = T,
      color = saturated_rainbow(100), breaks = c(0, 1e-10, seq(0.001, 1,
      length.out = 100)), ...)

### Arguments

`otu_counts` | A matrix of OTU counts, one row per OTU and one column per sample.
`assignments` | A character vector of OTU assignments. Length should match number of rows in otu_counts.
`threshold` | Minimum number of OTU counts necessary for an assignment to be included in the heatmap. Assignments are filtered after calculating the proportions, so the threshold setting does not affect the display of the remaining OTUs.
`plot` | If true, display a plot. If false, just return the computed abundances.
`color` | Vector of colors to use in the heatmap.
`breaks` | Vector of color breaks, one element greater in length than 'colors'.
`...` | Additional arguments are passed to the pheatmap function.

### Value

A heatmap plot of the proportions of assignments in each sample, and invisibly returns a matrix of the proportions in the plot.

### See Also

`saturated_rainbow`

### Examples

    data(relmbeta_assignments)
    data(relmbeta_counts)
    a <- simplify_assignments(split_assignments(relmbeta_assignments))

    ## Not run:
    otu_heatmap(relmbeta_counts, a, threshold=10)
    otu_heatmap(
      relmbeta_counts, a, threshold=10,
      cluster_rows=FALSE, cluster_cols=FALSE,
      cellwidth=12, cellheight=12)

    ## End(Not run)

    heatmap_data <- otu_heatmap(relmbeta_counts, a, threshold=10, plot=FALSE)
    head(heatmap_data)

[Package qiimer version 0.9.4 Index]