Within-individual DE/DA with MrVI

Hi all,

I am running MrVI on data with repeated measures per donor across timepoints. I want to test differential abundance across timepoints while accounting for donor IDs.

Current setup_anndata config:

MRVI.setup_anndata(
    adata,
    layer      = "counts",
    sample_key = "final_label", # combination of donor x timepoint
    batch_key  = "batch",
)

Current DA call:

da_res = model.differential_abundance(sample_cov_keys=["batch", "donor", "timepoint"\])

My question is: can I interpret donor_log_probs like it has been conditioned on batch and donor IDs?

Thanks in advance!

Best,
Mikhael

It is not.

However, you might artificially achieve that if you select the batch key of MRVI to be a combination of batch and donor.

Either way, you can also check it yourself by running the DA with “compute_log_enrichment”: True and see if their patterns correlates (donor and batch)