Fungi 18S
QIIME - Fungal 18S OTU picking, using BLAST
Download 18S reference database & decompress
wget ftp://ftp.microbio.me/qiime/tutorial_files/its_12_11_otus.tgz
tar -zxvf its_12_11_otus.tgz
gzip -d its_12_11_otus/rep_set/97_otus.fasta.gz
gzip -d its_12_11_otus/rep_set/99_otus.fasta.gz
gzip -d its_12_11_otus/taxonomy/97_otu_taxonomy.txt.gz
gzip -d its_12_11_otus/taxonomy/99_otu_taxonomy.txt.gz # move folder "its_12_11_otus/" to a permanent database directory, accessible for example:
/home/myname/data/its_12_11_otus/
Create OTU setting file
# create new parameter file for pick_open_reference_otus.py and add 4 setting lines (adapt correct database path)
> otu_18S_settings.txt
echo "pick_otus:enable_rev_strand_match True" >> otu_18S_settings.txt
echo "assign_taxonomy:assignment_method blast" >> otu_18S_settings.txt
echo "assign_taxonomy:id_to_taxonomy_fp /home/myname/data/its_12_11_otus/taxonomy/97_otu_taxonomy.txt" >> otu_18S_settings.txt
echo "assign_taxonomy:reference_seqs_fp /home/myname/data/its_12_11_otus/rep_set/97_otus.fasta" >> otu_18S_settings.txt
# check content of parameter file
cat otu_18S_settings.txt
pick_otus:enable_rev_strand_match True
assign_taxonomy:assignment_method blast
assign_taxonomy:id_to_taxonomy_fp /home/myname/data/its_12_11_otus/taxonomy/97_otu_taxonomy.txt
assign_taxonomy:reference_seqs_fp /home/myname/data/its_12_11_otus/rep_set/97_otus.fasta
Run OTU clustering and 18S annotation
# tell BLAST where to find the 18S reference sequence database
export BLASTMAT=/home/myname/data/its_12_11_otus/rep_set/
# run OTU picking
pick_open_reference_otus.py -i seqs.fna -r /home/myname/data/its_12_11_otus/rep_set/97_otus.fasta -o OTU_18S/ -p otu_18S_settings.txt --suppress_align_and_tree
# Result
OTU_18S/otu_table_mc2_w_tax.biom # OTU abundance table of all samples, including 18S taxonomy
# convert OTU abundance table into a tab separated text file, readable with Excel
biom convert -i OTU_18S/otu_table_mc2_w_tax.biom -o OTU_18S/otu_table_mc2_w_tax.tsv --to-tsv --header-key taxonomy
http://nbviewer.jupyter.org/github/biocore/qiime/blob/1.9.1/examples/ipynb/Fungal-ITS-analysis.ipynb