transform_sample_counts: Transform abundance data in an 'otu_table', sample-by-sample

Description Usage See Also Examples

View source: R/transform-filter.R

Description

This is a wrapper around phyloseq::transform_sample_counts that allows use of a purrr-style anonymous function for .f.

Usage

1

See Also

phyloseq::transform_sample_counts tidyseq::filter_taxa

Examples

1
2
3
4
5
6
7
library(phyloseq)
library(tidyseq)
data(GlobalPatterns)
# Filter low prevalence taxa and then convert to proportions
gp.prop <- GlobalPatterns %>%
  filter_taxa2(~ sum(. > 0) > 5) %>%
  transform_sample_counts(~ . / sum(.))

mikemc/tidyseq documentation built on Oct. 27, 2019, 12:46 p.m.