subsample_table: subsample_table

View source: R/subsample_table.R

subsample_tableR Documentation

subsample_table

Description

This function has been ported from MicrobeR. Takes a Feature/OTU/ASV table of counts where samples are columns and feature names are row names and returns a table with even coverage on a per-sample basis. Now this function is really just an alias for rarefy_even_depth from phyloseq to simplify its usage for non-phyloseq objects. NOTE: Sampling with replacement for single rarefraction method!

Usage

subsample_table(features, depth, seed, with_replace, verbose)

Arguments

features

Table of feature/OTU/SV counts where Samples are columns, and IDs are row names

depth

Count depth, defaults to min(colSums(OTUTABLE)). Note, samples with less than the desired number of read will be removed!

seed

A randomization SEED, defaults to 182. This is ignored for multiple subsamples and instead the seeds 1:NSAMPS is used.

with_replace

Should subsampling be with or without replacement? (TRUE/FALSE) Default=FALSE to be analogous to qiime2; however, this may take longer to calculate. Please see phyloseq::rarefy_even_depth for more information.

verbose

Should progress and metrics be printed to screen via message()? Default=TRUE

Value

Subsampled Table


jbisanz/qiime2R documentation built on April 24, 2024, 5 p.m.