otu_heatmap: Create a heatmap of OTU counts.

Description Usage Arguments Value See Also Examples

View source: R/otu_table.R

Description

Create a heatmap of OTU counts.

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

kylebittinger/qiimer documentation built on May 20, 2019, 7:30 p.m.