About the Tutorial

Managing the OTU Table.

Once you have a complete and processed OTU table, the next step is to perform a variety of analyses on this data. But before you can move onto the alpha/beta diversity analyses, you must first need to know how to filter your data. Filtering the BIOM file will be important to many of your analyses. Most scripts/worflows perform their analysis on all the samples in the OTU table.

So if you have many timepoints within your biom file, you will not be able to see the beta-diversity of one particular timepoint. You will see a PCoA of the combination of all timepoints or p-value from the combination of all treatment groups. To get around this problem, you will need to subset the table based on mapping file categories. Below are examples of the different ways of filtering the table.

Filtering Groups from OTU table

The most common type of filtering is filtering the groups of samples from the table. This will be the most important filter as it allows you to remove one particular group or timepoint from the table or remove samples below a particular sequencing depth.

There are a few different ways to filter out data. The command works differently depending upon the type and amount of samples in one particular group. Either way, the command takes the same formatted argument. You must have the name of the column variable:name of the group, all surrounded in quotes. ('Treatment:Control')


A. Postive Filtering

The first ways is positive filtering. You tell the script which groups you WANT to keep. For this examples, we have in total 3 different groups within the column varibale ‘Treatment’: Group1, Group2, Group3. If we want to remove ‘Group3’ we would run the script below.

link : http://qiime.org/scripts/filter_samples_from_otu_table.html

Parameters:
|-i : Input OTU table in .biom format
|-o : The name of the output filtered biom file
|-m : The mapping file that corresponds to the input OTU table
|-s : The names of the groups you want to remove. It MUST be surrounded by single or double quotes.

filter_samples_from_otu_table.py -i otu_table.biom -o otu_table_filtered.biom -m mapping_file.txt -s 'Treatment:Group1,Group2' 

B. Negative Filtering of OTU table

The second way is negative filtering. You tell the script which groups you DO NOT WANT to keep. We are going to use the same example found above and remove ‘Group3’. The negative filtering requires a special few characters. It needs a *,! before the name of the group.

filter_samples_from_otu_table.py -i otu_table.biom -o otu_table_filtered.biom -m mapping_file.txt -s 'Treatment:*,!Group3' 

There are many more features within filter_sample_from_otu_table.py, such as the ability to remove high coverage samples or to choose samples that match a particular list of SampleID’s. See the QIIME website link above for more examples.


C. Advanced usage of Group Filtering

If you want to get a bit more advanced, you can specifiy multiple variables at the same time. If you want to filter out multiple groups as well as a particular study, you can use a semicolon,: between statements.

filter_samples_from_otu_table.py -i otu_table.biom -o otu_table_filtered.biom -m mapping_file.txt -s 'Treatment:Group1,Group2;Study:Mouse'

Splitting The Table Based on Group Information

Removing Very Low Abundant OTU’s

Filtering for Particular Taxa

Positive Filtering of Taxa


Negative Filtering of Taxa


Advanced Filtering of Taxa


Taxonomy and Composition

Relative Abundance Plots

Calculating Abundance Significance

Going Further with Taxonomy

Relative Abundance Heatmap

Computing Taxonomic Ratio’s (Microbial Dysbiosis Index)

Computing Core Microbiome

Make OTU Network in Cytoscape


Calculating Alpha Diversity

Alpha Diversity Metrics

Alpha Rarefaction (Workflow)

Calculating Alpha Diversity Significance

Add Alpha Metric to Mapping File


Calculating Beta Diversity

Beta Diversity Metrics

Beta Diversity Through Plots (Workflow)

Calculating Beta Diversity Significance

Going Further with Beta Diversity

Customizing PCoA Plots


A. Adding Custom Axes

B. Adding Vector Lines

C. Adding Custom Colors

D. Creating Biplots (UniFrac + Taxonomy)