Question about performing longitudinal analyses

Hi Everyone,

I performed a similar command (please see below) using my data and it completed successfully:

qiime longitudinal first-distances
–i-distance-matrix unweighted_unifrac_distance_matrix.qza
–m-metadata-file ecam-sample-metadata.tsv
–p-state-column month
–p-individual-id-column studyid
–p-replicate-handling random
–p-baseline 0
–o-first-distances first-distances-baseline-0.qza

One question I have is: how can I get the qzv file related to the file first-distances-baseline-0.qza?

From the tutorial, I tried to use this file in the following command:

qiime longitudinal linear-mixed-effects
–m-metadata-file first-distances-baseline-0.qza
–m-metadata-file ecam-sample-metadata.tsv
–p-metric Distance
–p-state-column month
–p-individual-id-column studyid
–p-group-columns delivery,diet
–o-visualization first-distances-LME.qzv

But, I’m getting the following error: state_column must contain at least two unique values. Values in Time: [ 12.]. I should mention that I have only two timepoints: baseline and 12 months. I’m assuming that it’s necessary to have at least 3 timepoints (baseline, time 1 and time 2) in order to complete this command. Is this correct?

In case there are only two timepoints, the only options to track changes over time in microbiome composition would be qiime longitudinal pairwise-distances and qiime longitudinal pairwise-differences. Am I right?

Thanks very much for all your support,
FS

Hi! What is the baseline value? In that cases I just use “t.p.1” for baseline and “t.p.2” for second date (12 month in your case), or just 1 and 2 if it must be numeric

Hi @fstudart,
first-distances is really only going to make sense if you have > 2 states. It will work with 2 states, and the results can still be used, e.g., to plot how much a sample changed between state 1 and state 0. But it will not be useful for linear-mixed-effects.

Correct — those methods actually effectively calculate the first differences/distances between two fixed states but then provide some statistical testing and plotting. Those will be much more useful for your purposes.

Looks like you opened up a separate question about first-distances (thanks for using separate topics!) — let’s move the conversation will move to this topic:

Hi Dr. Bokulich,

Thanks very much for your reply.

I’d like to ask if there is any way I can use the first-distances.qza and first-distances-baseline-0.qza files. I’m asking because I was able to get these files using my data, but I don’t know what else I can do to analyze them, as I only have two timepoints.

Thanks,
FS

I believe the first distances artifact can be interpreted as metadata, so you could experiment with using it as an input to alpha-correlation or other methods…

Other than that, you can export these and plot them / perform other statistical tests e.g., in R.

But I would recommend just using pairwise-distances. When you have two time points that visualization will just be more useful.

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