missing samples in longitudinal first-distances output


I am trying to run longitudinal first-distances on a Jaccard distance matrix using the following command:

qiime longitudinal first-distances --i-distance-matrix DBA-core-metrics-results/jaccard_distance_matrix.qza --m-metadata-file metadatav.2.tsv --p-state-column Hour --p-individual-id-column studyID --p-replicate-handling random --o-first-distances DBA-first-distances-jacccard.qza

When I interactively explored the output artifact via qiime metadata tabulate, I noticed that samples belonging to only five of the six timepoints were present (missing the first timepoint). I get the same result when using the --p-baseline parameter, but for the sake of simplicity, I omitted it from the command above.

Attached is the initial metadata file used to execute the longitudinal first-distances command as well as the metadata-tabulated longitudinal first-distances output.

I suspect the problem lies in the initial metadata file and is user-mediated, but I have not been successful in my troubleshooting.

I appreciate your time and any suggestions!

P.S. I am currently running QIIME 2 2019.4, which was installed within a conda environment.

metadatav.2.tsv (6.4 KB) first-distances-metadata-tabulate.tsv (11.9 KB)

Hi @Lexie_Keding,

It sounds like this is working as intended! first-distances and first-differences look at change between sequential time points, and these interval changes are labeled with the second time point (I believe), so if you have a dataset like this:

SampleID timepoint subjectID
s1 1 A
s2 2 A
s3 3 A

with a distance matrix like this:

s1 s2 s3
s1 0.0 1.0 2.0
s2 1.0 0.0 1.5
s3 2.0 1.5 0.0

and run first-distances, your output will look like this:

SampleID Distance
s2 1.0
s3 1.5

where “s2” now refers to the distance between s1->s2 and “s3” refers to the distance between s2->s3. The first timepoint has been “dropped” because there is no previous time point present for measuring an interval change with first-distances.


Hello @Nicholas_Bokulich,

That makes a lot of sense! I apologize for the naive question, but really appreciate your detailed explanation.

Thanks so much!


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