Creating & Exporting ASV tables

Hello,

I have a quick question, or more like a confirmation of my analysis. I had previously followed a tutorial on how to create and export an ASV table and I feel like I did it correctly, however, after a request from my PI, she mentioned that what I had provided was not an ASV table. Hence, I would like to know if I in fact did this wrong. If you could please let me know if I followed the correct steps to create an ASV table, I would really appreciate it. I have also provided a few rows and columns from the ASV file I have created for verification (in case this makes it easier to see).

Below is the code I ran to create the ASV table using the dada2 feature table and the taxonomy.qza files.

#Raw Table----------------------------------------------------------------------
mkdir DADA2/Clean/FilteredTable/ExportRaw

qiime tools export --input-path Bacteria-Table-Merged-Filtered-1-4E-MJ-NS.qza --output-path DADA2/Clean/FilteredTable/ExportRaw
cd DADA2/Clean/FilteredTable/ExportRaw
mv feature-table.biom Bacteria-Table-MergedFiltered-Clean-NS.biom
biom convert -i Bacteria-Table-MergedFiltered-Clean-NS.biom -o Bacteria-Table-MergedFiltered-Clean-NS.tsv --to-tsv
biom head -i Bacteria-Table-MergedFiltered-Clean-NS.tsv

#Create a taxonomy biom file----------------------------------------------
qiime tools export --input-path Bacteria-taxonomy-paired-Clean-2020-132.qza --output-path ./
cp taxonomy.tsv biom-taxonomy.tsv

#Add metadata to taxonomy and biom feature table ----------------
mkdir ASVtables

biom add-metadata -i DADA2/Clean/FilteredTable/ExportRaw/Bacteria-Table-MergedFiltered-Clean-NS.biom -o ASVtables/Bacteria-FilteredTable-with-taxonomy.biom --observation-metadata-fp Taxonomy/biom-taxonomy.tsv --sc-separated taxonomy --observation-header OTUID,taxonomy,confidence

biom convert -i ASVtables/Bacteria-FilteredTable-with-taxonomy.biom -o ASVtables/Bacteria-FilteredTable-with-taxonomy.tsv -m Bacteria-Metadata-Lib1-4E-MJ-Clean.tsv --to-tsv --header-key taxonomy

This in turn is the file that I am using as the ASV table and which I was using in R to run statistic analysis.

Fungal-ASV-table.csv (1.5 KB)

Hi @fabipc,

Whether your table is an ASV table or OTU table depends on the upstream processing before the export. What commands did you use to generate file file you exported?

Best,
Justine

@jwdebelius Thanks for your response.

I see, I just ran DADA2, created the taxonomy file, and then added the taxonomy to the feature table, using the following commands:

1. Ran DADA: used these files to create classifier with the commands below:

#Train Classifier--------------------------------------------------------------------------------------------------------------
mkdir SILVA_132_QIIME_release/Reference

qiime tools import
–type ‘FeatureData[Sequence]’
–input-path SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva_132_99_16S.fna
–output-path SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva_132_99_16S.qza

qiime tools import
–type ‘FeatureData[Taxonomy]’
–input-format HeaderlessTSVTaxonomyFormat
–input-path SILVA_132_QIIME_release/taxonomy/16S_only/99/majority_taxonomy_7_levels.txt
–output-path SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva-16s-Ref-Taxonomy132.qza

qiime feature-classifier extract-reads
–i-sequences SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva_132_99_16S.qza
–p-f-primer CCTACGGGNGGCWGCAG
–p-r-primer GACTACHVGGGTATCTAATCC
–p-min-length 1
–o-reads SILVA_132_QIIME_release/Reference/16s-ref-seqs.qza

#Fit the classifier-------------------------------------------------------------------------------------------------------------
mkdir SILVA_132_QIIME_release/Classifier
qiime feature-classifier fit-classifier-naive-bayes
–i-reference-reads SILVA_132_QIIME_release/Reference/16s-ref-seqs.qza
–i-reference-taxonomy SILVA_132_QIIME_release/rep_set/rep_set_16S_only/99/silva-16s-Ref-Taxonomy132.qza
–o-classifier SILVA_132_QIIME_release/Classifier/Silva-16s-Classifier132.qza

#Test the Classifier- Create Taxonomy Barplot----------------------------------------------------------------------
mkdir TrialTaxonomy

qiime feature-classifier classify-sklearn
–i-classifier SILVA_132_QIIME_release/Classifier/Silva-16s-Classifier-2020-132.qza
–i-reads DADA2/Clean/Bacteria-RepSeqs-Merged-1-4E-MJ-clean.qza
–o-classification Taxonomy/Bacteria-taxonomy-paired-Clean-2020-132.qza

2. I then filtered out the mitochondria and chloroplast
3. Exported the files out with the code shared on the first post.

Thank you so much for your help, I feel like I did create an ASV table since I did not cluster the data. If you could please let me know if I did this correctly and or not, I would really appreciate it.

Hi @fabipc,

This is exactly what I was wondering about! If you didn’t cluster your data, then you have ASVs. If you clustered, it would be OTUs.

I dont see anything immediately wrong with your code, either

Best,
Justine

@jwdebelius Okay perfect, so the ASV table attached in the first post, looks correct, right? (The one I attached was for fungi, but I did the same steps as mentioned above, with the exception that I used the UNITE database).