When to filter samples based on rarefying depth before taxabarplot

Hii!!

I was looking at the different tutorials in Qiime2 documentation and the following question arised..

For "Moving pictures" tutorial, the taxabarplot is performed directly after the taxonomic classification.

qiime taxa barplot \
  --i-table table.qza \
  --i-taxonomy taxonomy.qza \
  --m-metadata-file sample-metadata.tsv \
  --o-visualization taxa-bar-plots.qzv

However, for the Parkinson mice tutorial, a filtering of samples, based on rarefaction depth, is conducted, before creating the taxa-barplot visualization.

qiime feature-table filter-samples \
  --i-table ./dada2_table.qza \
  --p-min-frequency 2000 \
  --o-filtered-table ./table_2k.qza

qiime taxa barplot \
  --i-table ./table_2k.qza \
  --i-taxonomy ./taxonomy.qza \
  --m-metadata-file ./metadata.tsv \
  --o-visualization ./taxa_barplot.qzv

How can I know when to apply this filtering?

Thank you so much in advance :slight_smile:

Miriam

Hi @MiriamGorostidi,

My interpretation is that in the Parkinson mouse tutorial, they are looking to visualize as barplot the composition of the samples retained after the rarefaction step. One way to do this is to filter out any samples with less than your rarefaction threshold. Another way could have been to create a list of sample identifier from the file 'core-metrics-results/rarefied_table.qza' and providing this list as metadata for the 'feature-table filter-samples' plug in.

Performing the filtering by excluding the samples with less than threshold used in the rarefaction step, comes in handy so it becomes already the initial step for the de analysis for the tutorial, which it is always a good idea to perform after filtering out low count samples/ASVs.

So to answer your question, I would say it is a matter if you want to visualize the samples passing the rarefaction step as separate group or it is enough to visualize them in the context with the rest of the samples.

Hope it makes sense
Cheers
Luca

1 Like

Hii @llenzi !

Ok, perfect! So it depends on what do you want to visualize, but going forward in your taxonomic analysis with all the samples. without filtering them, would also be correct, right?

Thank you for your time!

Hi @MiriamGorostidi,
If you mean taxonomic assignment and visualization considering all the samples, yes it is correct.
Cheers
Luca

1 Like

Yes!! Perfect Luca! Thank you so much @llenzi !