Generate Average of Taxa Plots as well as Calculate Significance of Taxon Presence

I want to compare the taxa plots of delivery mode. Each mode has a lot of samples so when I generate a taxa plot rather than generating one column for each mode, it gives me columns for each sample. Is there a way to take the average presence of taxa for the samples so I only have 1 column for each delivery mode? Also, is there a way to calculate if there is a significant difference between the presence of a certain taxon? Thank you.

Yes! Use feature-table group to collapse by mode, then construct barplots.

For static timepoints (e.g., is taxon X more abundant in vaginally delivered than cesarean infants), there is not a method to specify individual taxa. You would just use ANCOM and see what comes out in the wash.

If you have a longitudinal sampling design (as I believe you do) and want to look at temporal changes, there are methods for this in q2-longitudinal, e.g., with pairwise-differences or linear-mixed-effects you can specify a single feature. But that doesn’t really sound like what you are going for.

I hope that helps!

Hi Nicholas,

I used the feature-table group like you said but when I try to construct barplots with it I get this error:

 Plugin error from taxa:

  Argument to parameter 'taxonomy' is not a subtype of FeatureData[Taxonomy].

What I plugged in for --i-taxonomy was the output I got from the feature-table group command. So now I’m trying to find the command to make my FeatureTable[taxonomy] to pair with the FeatureTable[Frequency] output from feature-table group command but I can’t find where I would make it. Can you direct me to that page? Thank you for your help.

This is incorrect. The grouped feature table output from feature-table group should be used as the table input, not as the taxonomy input. The taxonomy input must be a FeatureData[Taxonomy] artifact. This will be the same file that corresponds to the full table — you do not need any special transformations because all the same features should be present in the feature table whether or not it is grouped by sample metadata.

I hope that helps!

Where do I get the FeatureTable[Taxonomy] from? I recently ran summarize taxa on Qiita. The output is a .csv file but when I tried to use that it said it wasn’t a qiime artifact. Is there a different file I should be downloading from Qiita to input into Qiime? Or do I get my taxonomy table from somewhere else? Thanks.

You want a FeatureData[Taxonomy] artifact — see this section in the moving pictures tutorial for details on how that is produced and used downstream. You would use this the same way as described there — with the exception that your feature table would be grouped prior to making barplots.

Yep — summarize taxa is effectively the same as qiime taxa collapse. It generates a new feature table labeled by taxonomy. But that is not what taxa barplots wants. It requires a feature table (labeled by SV ID) and a FeatureData[Taxonomy] artifact (mapping SV IDs to taxonomy labels) as input.

You can download the representative sequences for each OTU/SV from QIITA, then classify with QIIME2 as described in the link above. If you want to use taxonomy assignments generated in QIITA instead of in QIIME2, download the taxonomy assignments (NOT the output of and import as FeatureData[Taxonomy].

I hope that helps!

Great! Thank you for directing me to those commands. Regarding getting the FeatureData[Sequence], when I download a biom table from Qiita (it was only filtered a few times, no other commands) and convert it to a .qza, it comes out FeatureTable[Frequency] and I’m unable to run:

qiime feature-classifier classify-sklearn \
  --i-classifier gg-13-8-99-515-806-nb-classifier.qza \
  --i-reads rep-seqs.qza \
  --o-classification taxonomy.qza

Am I able to go from FeatureTable[Frequency] to FeatureData[Sequences] or will I have to use the command here and start from the beginning? Thanks.

Hey @Stephanieorch! Check out this post - you can import a biom table that has been annotated with taxonomy as a FeatureData[Taxonomy] artifact. I am not 100% sure if that answers your question though, because as @Nicholas_Bokulich pointed out already, you should be able to download your representative sequences directly from Qiita, it looks like you might be skipping that step.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.