TITLE: Taxonomic classification of IonTorrent-sequenced 16S amplicon sequences
AUTHORS: Laura Espina

[STEPS]
?. [Pre-processing]
Demultiplex sequences. Quality-filter sequences. Tim barcodes and adapters. Export as fastq files (1 fastq file per sample).
Example of fastq files at this point:
?. [Pre-processing]
Import fastq files.Trim primers.Remove sequences shorter than 100 bp.Suggested software:(or python scripts).
?. [Pre-processing]
(Optional) Check the Phred quality score of the sequences.Suggested software:
?. [On Qiime2]
To train a Naïve Bayes classifier: Download the Greengenes 13_8 99% OTU database. Upload the files "99_otus.fasta" and "99_otu_taxonomy.txt" onto a folder accesible by the Qiime2 environment. With Qiime2 activated and inside the folder containing those files, type in the command line:
?. [On Qiime2]
>qiime tools import --type 'FeatureData[Sequence]' --input-path 99_otus.fasta --output-path otus.qza
?. [On Qiime2]
>qiime tools import --type 'FeatureData[Taxonomy]' --input-format HeaderlessTSVTaxonomyFormat --input-path 99_otu_taxonomy.txt --output-path taxonomy.qza
?. [On Qiime2]
>qiime feature-classifier extract-reads --i-sequences otus.qza --p-f-primer AGAGTTTGATCMTGGCTCAG --p-r-primer CYNACTGCTGCCTCCCGTAG --o-reads ref-seqs.qza
?. [On Qiime2]
>qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads ref-seqs.qza --i-reference-taxonomy taxonomy.qza --o-classifier classifierp.qza
The artifact "classifier.qza" can be copied to any other folder for the following steps.Example of classifier trained on the Greengenes 99% OTU database for the V1-V2 region of the 16S rRNA gene:
?. [On Qiime2]
To perform taxonomy classification: In a new folder, upload the artifact "classifier.qza" and the file with the metadata corresponding to the fastq files in the correct format. Example of file:Also create a subfolder "fastq" containing the compressed fastq files in the correct nominal format (eg. "fcm1_1_L001_R1_001.fastq.qz" and "fcm2_2_L001_R1_001.fastq.qz") and the classifier artifact.In the command line, type in:
?. [On Qiime2]
>qiime tools import --type 'SampleData[SequencesWithQuality]' --input-path fastq --input-format CasavaOneEightSingleLanePerSampleDirFmt --output-path demux-single-end.qza
?. [On Qiime2]
>qiime vsearch dereplicate-sequences --i-sequences demux-single-end.qza --o-dereplicated-table dereplicatedtable.qza --o-dereplicated-sequences rep-seqs.qza
?. [On Qiime2]
>qiime feature-classifier classify-sklearn --i-classifier classifier.qza --i-reads rep-seqs.qza --o-classification taxonomy.qza
?. [On Qiime2]
>qiime taxa barplot --i-table dereplicatedtable.qza --i-taxonomy taxonomy.qza --m-metadata-file sample-metadata.tsv --o-visualization taxa-bar-plots.qzv
The artifact "taxa-bar-plots.qzv" can be interactively visualized in https://view.qiime2.org/Example of artifact:
?. [On Qiime2]
The components of the biom table (the OTU abundance table and the taxonomy table) can be obtained from the "taxa-bar-plots.qzv" artifact or with the following commands:>qiime tools export --input-path dereplicatedtable.qza --output-path exported-feature-table>cd exported-feature-table>biom convert -i feature-table.biom -o otutable.tsv --to-tsv>qiime tools export --input-path taxonomy.qza --output-path taxonomy
The files "taxonomy.tsv" and "otutable.tsv" should be downloaded and can be manually converted into .csv files and adapted for the analysis with R. The additional file "metadata.csv" is also necessary.Example of files:
?. [Analysis with R]
Within R and activating the phyloseq package, different types of analysis can be easily performed.
?. [Analysis with R]
The first step is the creation of the phyloseq object using the type of files shown in step 5.5:> otu_table > tax_table > OTU > tax_matrix> TAX > metadata > meta > fcm
?. [Analysis with R]
Basic operations such as tax_glom are used to prepare the data for further analyses. For example, with the following commands a table containing the taxonomic abundance for the families present in each sample is created:> fcm.family > fcm.family.m > write.table(x=fcm.family.m, sep = ",", file = "fcm_family.csv")
At this point a table with the taxonomic abundance of each family is produced. Example of file: