FrederickHuangLin / ANCOMBC

Differential abundance (DA) and correlation analyses for microbial absolute abundance data
https://www.nature.com/articles/s41467-020-17041-7
108 stars 29 forks source link

NULL results for global, pairwise and pattern analysis #291

Open otaviolovison opened 1 month ago

otaviolovison commented 1 month ago

Hello!

I am running alongitudinal analysis with ANCOMBC2 using the code below, and the global, pairwise and pattern are NULL in the output:

set.seed(123)

genus_output = ancombc2(data = tse, assay_name = "counts", tax_level = "Genus", fix_formula = "Age + Sex + Exam + sample.type", rand_formula = "(Exam | patientID)", p_adj_method = "holm", pseudo_sens = TRUE, prv_cut = 0.10, lib_cut = 1000, s0_perc = 0.05, group = "sample.type", struc_zero = TRUE, neg_lb = TRUE, alpha = 0.05, n_cl = 20, verbose = TRUE, global = TRUE, pairwise = TRUE, dunnet = TRUE, trend = TRUE, iter_control = list(tol = 1e-2, max_iter = 20, verbose = TRUE), em_control = list(tol = 1e-5, max_iter = 100), lme_control = lme4::lmerControl(), mdfdr_control = list(fwer_ctrl_method = "holm", B = 100), trend_control = list(contrast = list(matrix(c(1, 0, -1, 1), nrow = 2, byrow = TRUE), matrix(c(-1, 0, 1, -1), nrow = 2, byrow = TRUE), matrix(c(1, 0, 1, -1), nrow = 2, byrow = TRUE)), node = list(2, 2, 1), solver = "ECOS", B = 100))

I believe that the cause of this is the random_formula, where I am 'blocking' the temporal variable 'Exam' and the patient ID. In addition, I have another 'issue' in this study design, where the same patientID have both group (sample.type) categories represented, since the samples where collected from the same patient but from different sites (health and disease), so, we have a 'double' autocorrelation problem. I tried to remove 'Exam' from the random_formula, but the global, pairwise and pattern are still NULL, which I believe that is being caused by this 'double' autocorrelation.

I would like to discuss if:

Thanks in advance!