QIIME OTU clustering

Get → OTU cluster of similar sequences and select a reference sequence ("OTU picking")

1) get OTU cluster of similar sequences (97% itentity)

2) select one representative sequences for each OTU

3) annotate OTU cluster with known taxonomy (consider OTU representative sequences without database hits as "unkown")

4) create table (biom format) containing OTU abundance of all samples, and taxonomy information for further analysis

→ QIIME tutorial: OTU picking

→ 18S Fungi OTU picking

→ SILVA OTU annotation

Get annotated OTU's (16S)

# allow taxonomic annotation of sequences in reverse orientation

echo 'pick_otus:enable_rev_strand_match True' > otu_settings.txt # create setting file

# run OTU clustering

pick_open_reference_otus.py -i $PWD/SEQ/seqs.fna -o $PWD/OTU/ -p $PWD/otu_settings.txt

Results:

otu_table_mc2_w_tax.biom OTU abundance table of all samples, including taxonomy

rep_set.fna representative sequences for each OTU cluster

rep_set.tre phylogenetic tree based on representative OTU sequenes

Get OTU cluster using usearch

same as above, but using another sequence clustering algorithm

# install sequence cluster algorithm: → usearch

# set location of reference sequence file "97_otus.fasta"

REFSEQS=/path/to/my/qiime1/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta

# allow taxonomic annotation of sequences in reverse orientation

echo 'pick_otus:enable_rev_strand_match True' > otu_settings.txt

# run otu picking with usearch61

pick_open_reference_otus.py -i $PWD/SEQ/seqs.fna -o $PWD/OTU/ -r $REFSEQS -s 0.1 -m usearch61 -p $PWD/otu_settings.txt

Get OTU & read count per sample

# Get number of OTU's per sample (not normalized OTU table)

biom summarize-table -i OTU/otu_table_mc2_w_tax_no_pynast_failures.biom --qualitative -o stats_OTUs_per_sample.txt

# Get number of reads per sample (not normalized OTU table)

biom summarize-table -i OTU/otu_table_mc2_w_tax_no_pynast_failures.biom -o stats_reads_per_sample.txt

Visualize OTU table as heatmap

make_otu_heatmap.py -i otu_table_mc2_w_tax_no_pynast_failures.biom -o otu_heatmap.pdf

Convert OTU table into text file

# Convert OTU .biom file to .tsv text file

biom convert -i otu_table_mc2_w_tax_no_pynast_failures.biom -o otu_table_mc2_w_tax_no_pynast_failures.tsv --to-tsv --header-key taxonomy

Next

→ QIIME Taxonomy stats

read more

http://qiime.org/tutorials/otu_picking.html

http://qiime.org/scripts/pick_open_reference_otus.html

http://biom-format.org/documentation/summarizing_biom_tables.html