longitudinal pairwise-differences

Dear Users,
I am working on a gut microbiome data. I have samples before and after taking the 2 kinds of supplements. I wish to use longitudinal first difference using shannon vector. Here is my code:
qiime longitudinal pairwise-differences --m-metadata-file metadataall.txt --m-metadata-file core-metrics-results/shannon_vector.qza --p-metric shannon --p-group-column Supplement --p-state-column Session --p-state-1 1 --p-state-2 2 --p-individual-id-column person_id --o-visualization core-metrics-results/pairwise-differences_group_supplement.qzv

I have 2 questions:

  1. In the metadata file, there are 2 rows for each person as there are 2 samples before and after. So there is a repetition of the person id. The documentation of qiime says it takes only one ID and ignores the other by default. Can someone explain me this?
  2. Is there a better way to compare the relative difference[after-before] of 2 groups of people?

Thank you

Hello @Aakash_Mantri. QIIME 2 does require all sample ids to be unique, but the difference between the two ids can be as small as a single character. This means you can, for instance, keep all of your ids mostly the same but add a .01 to the end of pre-supplement ids and a .02 to the end of post-supplement ids and so on for each different data point you have for the same person.

I suggest you check out the longitudinal tutorial here and maybe look at the design of the metdata used in that tutorial if you have further questions.

1 Like