Last data update: 2014.03.03

R: Rarefy the OTU table to an equal sequencing depth
RarefyR Documentation

Rarefy the OTU table to an equal sequencing depth

Description

GUniFrac is also sensitive to different sequencing depth. To compare microbiomes on an equal basis, rarefaction might be used.

Usage

Rarefy(otu.tab, depth = min(rowSums(otu.tab)))

Arguments

otu.tab

OTU count table, row - n sample, column - q OTU

depth

Required sequencing depth; If not specified, the lowest sequencing depth is used.

Value

Return a LIST containing:

otu.tab.rff

Rarefied OTU table

discard

IDs of samples that do not reach the specified sequencing depth

Author(s)

Jun Chen <chenjun@mail.med.upenn.edu>

References

Jun Chen and Hongzhe Li(2012). Associating microbiome composition with environmental covariates using generalized UniFrac distances. (Submitted)

See Also

GUniFrac, PermanovaG

Examples

data(throat.otu.tab)
# Rarefaction
otu.tab.rff <- Rarefy(throat.otu.tab, 1024)$otu.tab.rff

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GUniFrac)
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-0
Loading required package: ape
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GUniFrac/Rarefy.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Rarefy
> ### Title: Rarefy the OTU table to an equal sequencing depth
> ### Aliases: Rarefy
> ### Keywords: Rarefaction Ecology
> 
> ### ** Examples
> 
> data(throat.otu.tab)
> # Rarefaction
> otu.tab.rff <- Rarefy(throat.otu.tab, 1024)$otu.tab.rff
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>