Individual feature abundance over time


I am trying to visualise (and test) the change in relative frequency of individual taxa and/or specific features over time. I was planning to use “qiime longitudinal volatility” to visualise change over time, “qiime longitudinal first-differences” to see how the rate of change differs over time, and “qiime longitudinal linear-mixed-effects” to test association of variables with abundance change. Does this sound like the correct approach, and are there any additional tools?

One thing I am struggling with is formatting the input file for these commands. I have searched tutorials and the forum, and cannot seem to find how to add a column of relative frequencies of a specific taxa/feature to a metadata file, so I can use this feature as “–p-metric”.

Thanks for your help,

For testing individual features, you are on the right track.


You do not need to add the relative frequency file to metadata.

All of these commands can also accept a feature table as input.

For example, you can do something like this:

qiime longitudinal volatility \
  --m-metadata-file ../data/ecam-sample-metadata.tsv \
  --i-table ../data/ecam-table-taxa.qza \
  --p-default-metric 'k__Bacteria;p__Bacteroidetes;c__Bacteroidia;o__Bacteroidales;f__Bacteroidaceae;g__Bacteroides' \
  --p-default-group-column delivery \
  --p-state-column month \
  --p-individual-id-column studyid \
  --o-visualization ../results/bacteroides-volatility.qzv \

Sounds like you are using an older version of QIIME2 than current (2018.4). In the new version you can use a default-metric (as I've shown above) but you do not even need to! The visualizer will allow you to interactively toggle between possible continuous variables as metrics... so you can make one visualizer and use it to view longitudinal change in all of your taxa one at a time by choosing them from the drop-down menu.

This preprint gives some examples that may be useful (and you can find the commands used to create the figures here... scroll down to the "Feature data as inputs" section for examples of using features as input but note that those commands are from an older version of q2-longitudinal so some actions/parameters may have changed a bit since then)

I hope that helps!


Hi @Nicholas_Bokulich

Thanks so much, that interactive volatility plot in the recent release is a great tool!



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