Skip to content

Translating output for oligotyping analysis

spacocha edited this page May 8, 2015 · 4 revisions

To transform the data into a format compatible with QIIME and the q2oligo pipeline set-up to be used by oligotyping, do the following commands after running SmileTrain with the dbc pipeline. As always, make sure your dbOTUcaller is up to date.

I'm assuming you did the SmileTrain/dbc pipeline, so you have the following output files: unique.f0.mat, unique.fa, unique.dbOTU.list, unique.dbOTU.fasta

Also assuming you have q2oligo, QIIME scripts and gg_13_8_otus available. Change the path to perllib, mothur, gg_13_8_otus and q2oligo if needed. Then you need to do the following to transform the files from SmileTrain/dbOTUcaller format to QIIME format:

 perl ~/lib/dbOTUcaller/perllib/QIIMEIZE_fasta_from_mat.pl unique.f0.mat unique.fa > test.qiimeize.seqs.fa

 perl ~/lib/dbOTUcaller/perllib/transform_OTU_to_complete_list.pl test.qiimeize.seqs.fa unique.dbOTU.list > eq.otus.list

 ~/bin/mothur/mothur "#degap.seqs(fasta=unique.dbOTU.fasta)"

<NOTE: this makes unique.dbOTU.ng.fasta- which is different from the one that is generated after running SmileTrain with dbc- a bug>

Then run the rest of the analysis with the QIIME and q2oligo scripts: assign_taxonomy.py -i unique.dbOTU.ng.fasta -t ~/lib/qiime-default-reference/qiime_default_reference/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt -r ~/lib/qiime-default-reference/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta -o unique.dbOTU.ng.fasta.taxonomy_dir

 python ~/lib/q2oligo/q2oligo.py unique.dbOTU.ng.fasta.taxonomy_dir/unique.dbOTU.ng_tax_assignments.txt eq.otus.list 'Crenothrix'

 filter_fasta.py -f test.qiimeize.seqs.fa -m Crenothrix_otu_map.txt -o Crenothrix.fasta

 python ~/lib/q2oligo/stripMeta.py Crenothrix.fasta Crenothrix_stripped.fasta

​This should work with the results from the 16S-analysis-workshop-tar/example_data3_res dataset (just check to make sure it works on that dataset first following the link- http://web.mit.edu/afs/athena.mit.edu/user/s/p/spacocha/Public/16S-workshop/16S-analysis-workshop-tar.tar.gz).