ps_pheatmap: Make pheatmap directly from a phyloseq object

View source: R/ps_pheatmap.R

ps_pheatmapR Documentation

Make pheatmap directly from a phyloseq object

Description

Make pheatmap directly from a phyloseq object, including agglomoration and filtering. Default color map is viridis with absent taxa as black.

Usage

ps_pheatmap(
  ps,
  annot_samp = NULL,
  annot_taxa = NULL,
  relative = TRUE,
  log10 = TRUE,
  tax_agg = NULL,
  order_taxa = TRUE,
  min_samples = 1,
  min_reads = 1,
  min_abundance = 0,
  label_rank = NULL,
  color = c("black", viridis::viridis(10)),
  ...
)

Arguments

ps

A phyloseq object

annot_samp

Sample variables to annotate with

annot_taxa

Taxa variables to annotate with

relative

If TRUE, abundances total sum scaled. Default TRUE

log10

If TRUE, log10 transform abundances. Default TRUE

tax_agg

Taxa rank to agglomorate. Default NULL

order_taxa

If TRUE, taxa are ordered from most to least abundant. Default TRUE

min_samples

Minimum number of samples the features should be present in. Default 1

min_reads

Minimum number of total reads the features should have. Default 1

min_abundance

Minimum mean relative abundance features should have. Default 0

label_rank

Taxa rank to label the taxa. If NULL will label by taxa_names(ps). Default NULL

color

Color palette. Default viridis with absent

...

Additional arguments to pheatmap function

Value

A pheatmap


Russel88/MicEco documentation built on Nov. 24, 2022, 2:33 a.m.