raref_rtk: RTK-based rarefaction

View source: R/raref_rtk.R

raref_rtkR Documentation

RTK-based rarefaction

Description

RTK-based rarefaction

Usage

raref_rtk(
  physeq,
  SampSize = NULL,
  MinSizeThreshold = NULL,
  iter = 1000,
  trimOTUs = TRUE,
  ...
)

Arguments

physeq

A phyloseq-class object

SampSize

Rarefaction depth (number of reads to sample)

MinSizeThreshold

Remove samples with number of reads less than this threshold

iter

Number of rarefication iterations

trimOTUs

Logical, if TRUE (default), OTUs that have a count of zero in every sample will be removed

...

Additional arguments will be passed to rtk

Value

List of rarefied phyloseq-objects.

Examples

data("esophagus")
eso_raref <- raref_rtk(esophagus, iter = 10)

# Benchmark
system.time( GPr <- raref_rtk(GlobalPatterns, SampSize = 5000, iter = 10, trimOTUs = T) )
system.time( GPr <- phyloseq_mult_raref(GlobalPatterns, SampSize = 5000, iter = 10, trimOTUs = T) )


vmikk/metagMisc documentation built on Feb. 14, 2024, 2:29 a.m.