How to match HTX samples with the closest MGX sampling in IBDMDB?

Hello,
I am currently trying to integrate host transcriptome (HTX) data with metagenomic (MGX) data from IBDMDB in order to analyze associations between host gene expression and the gut microbiome.

To do this properly, I would like to match each HTX sample with the MGX sample collected as close in time as possible.
However, I am not sure which metadata fields should be used to determine the sampling dates.

For example:

  • week_num appears to match between HTX and MGX samples from the same subject.

  • But visit_num does not match (e.g., HTX samples are almost always visit_num = 1, while MGX samples for the same subject are often visit_num ≥ 4).

Therefore, I would like to ask:

  1. What exactly do week_num and visit_num represent in IBDMDB metadata?

    • Do they correspond to actual sampling dates or project timepoints?

    • Why do HTX and MGX share the same week_num but not visit_num?

  2. What is the recommended way to identify the MGX sample taken closest to an HTX sampling timepoint?

    • Is there an official variable corresponding to the true sampling date for HTX?

    • Should week_num be used for matching?

Any clarification on how to correctly pair HTX and MGX samples would be greatly appreciated.
Thank you very much for your help!