Predict Metagenomic Functions

Description


Step 1: One file from the GreenGenes database is needed before proceeding. To download this file, run the commnd below.

wget ftp://greengenes.microbio.me/greengenes_release/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt

Step 2: Next you will need to remove all the 'NewReferenceOTU' identifiers in your OTU table. PICRUSt can only be used with closed reference OTU's. To do this, we can run the command below and reference the file we previously downloaded.

# This command should be run inside the MacQIIME environment.
filter_otus_from_otu_table.py \
-i otu_table.biom \
-o closed_otu_table.biom \
--negate_ids_to_exclude \
-e 97_otu_taxonomy.txt

Step 3: After removing the OTU's, you will need to convert the .biom file to a legacy format. This only applies to the OTU tables that were generated with QIIME version 1.9.1.

# This command must be run inside of the MacQIIME environment.
biom convert \
-i closed_otu_table.biom \
-o closed_otu_table_json.biom \
--table-type="OTU table" --to-json
The PICRUSt commands below must be run outside of the MacQIIME environment.

Step 4: Once the table has been converted to JSON format, you can proceed with the main processing steps of PICRUSt. The first step is to normalize by copy number.

normalize_by_copy_number.py \
-i closed_otu_table_json.biom \
-o closed_otu_table_json_normalized.biom

Step 5: Next you can begin predicting the meta genomes based on 16s rRNA count data. The output from this command generates a file setup similar to your OTU table. There is a column of counts for each KEGG genes for each sample. Because of this similarity, we can use many of the QIIME commands available.

predict_metagenomes.py \
-i closed_otu_table_json_normalized.biom \
-o metagenome_predictions.biom

Step 6: One additional step we must run is to collapse the KEGG genes into hierarchical levels, instead of a per gene identifier. This creates a more manageable analysis by converting genes counts into pathway counts.

# Level 3 (highest-detail)
categorize_by_function.py \
-i metagenome_predictions.biom \
-o predicted_metagenomes_L3.biom \
-c KEGG_Pathways \
-l 3

# Level 2 (mid-detail)
categorize_by_function.py \
-i metagenome_predictions.biom \
-o predicted_metagenomes_L2.biom\
-c KEGG_Pathways \
-l 2

# Level 1 (least-detail)
categorize_by_function.py \
-i metagenome_predictions.biom \
-o predicted_metagenomes_L1.biom\
-c KEGG_Pathways \
-l 1

results matching ""

    No results matching ""