sampledoc
News and Announcements »

single_rarefaction.py – Perform rarefaction on an otu table

Description:

To perform bootstrap, jackknife, and rarefaction analyses, the otu table must be subsampled (rarefied). This script rarefies, or subsamples, an OTU table. This does not provide curves of diversity by number of sequences in a sample. Rather it creates a subsampled OTU table by random sampling (without replacement) of the input OTU table. Samples that have fewer sequences then the requested rarefaction depth are omitted from the ouput otu tables. The pseudo-random number generator used for rarefaction by subsampling is NumPy’s default - an implementation of the Mersenne twister PRNG.

Usage: single_rarefaction.py [options]

Input Arguments:

Note

[REQUIRED]

-i, --input_path
Input otu table filepath
-o, --output_path
Write output rarefied otu tables to this filepath
-d, --depth
Sequences per sample to subsample

[OPTIONAL]

--lineages_included
Output rarefied otu tables will include taxonomic (lineage) information for each otu, if present in input otu table [default: False]
-k, --keep_empty_otus
Otus (rows) of all zeros are usually omitted from the output otu table, with -k they will not be removed from the output file [default: False]

Output:

The results of single_rarefaction.py consist of a single subsampled OTU table. The file has the same otu table format as the input otu_table.txt. note: if the output file would be empty, no file is written

Example:

subsample otu_table.txt at 400 seqs/sample (-d), write results to a file (i.e. rarefaction_400_17.txt)

single_rarefaction.py -i otu_table.txt -o rarefaction_400_17.txt -d 400

(naming convention rarefaction_400_17.txt implies that the depth is 400 seqs/sam, iteration 17 at that depth (18th file written, due to iter 0))

Site index


sampledoc