sampledoc
News and Announcements »

multiple_rarefactions_even_depth.py – Perform multiple rarefactions on a single otu table, at one depth of sequences/sample

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: multiple_rarefactions_even_depth.py [options]

Input Arguments:

Note

[REQUIRED]

-i, --input_path
Input otu table filepath
-o, --output_path
Write output rarefied otu tables files to this dir (makes dir if it doesn’t exist)
-d, --depth
Sequences per sample to subsample

[OPTIONAL]

-n, --num-reps
Num iterations at each seqs/sample level [default: 10]
--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 tables, with -k they will not be removed from the output files [default: False]

Output:

The results of this script consist of n subsampled OTU tables, written to the directory specified by -o. The file has the same otu table format as the input otu_table.txt. note: if the output files would be empty, no files are written

Example:

subsample otu_table.txt at 400 seqs/sample (-d), 100 times (-n), write results to files (i.e. rarefaction_400_17.txt)

multiple_rarefactions_even_depth.py -i otu_table.txt -o rarefaction_tables -d 400 -n 100

Site index


sampledoc