FrederickHuangLin / ANCOMBC

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

ancombc2 pseudo_sens option no 'passed_ss' column in res output #220

Closed szymanskishay closed 10 months ago

szymanskishay commented 10 months ago

I am running ancombc2 on some of my data and am very interested in the idea of the pseudo-count sensitivity testing. When I run my data with the pseudo_sense option set to be true, in my output I did get the full 'pseudo_sens_tab' output, but, in the output of the 'res' table, there are no columns for 'passed_ss' as is detailed in the package description. While I think I have the information needed to recreate those columns, I am wondering if there is an option I missed in the description somewhere, or if this is a true bug.

I am running my data initially based on a modified version of the ANCOMBC2 tutorial

the code input is as follows

output1 = ancombc2(data = swmrec, assay_name = "counts", tax_level = "Genus", fix_formula = "Week + Tissue", rand_formula = NULL, p_adj_method = "holm", pseudo_sens = TRUE, prv_cut = 0.10, lib_cut = 1000, s0_perc = 0.05, group = "Tissue", struc_zero = TRUE, neg_lb = TRUE, alpha = 0.05, n_cl = 2, 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,-1,1,1,-1,-1,1,0,1,-1,0,-1,1,0,-1,1,0,1,1,-1,-1,1,0,1,-1,0,-1,1,1,-1,0,1,1), nrow=6, ncol=6), matrix(c(0,1,1,1,1,1,1,0,1,0,0,1,-1,0,-1,1,0,-1,1,0,1,1,-1,-1,1,0,1,-1,0,-1,1,1,-1,0,1,1), nrow=6, ncol=6), matrix(c(-1,-1,1,0,0,1,1,-1,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,-1,-1,1,0,1,-1,0,-1,1,1,-1,0,1,1), nrow=6, ncol=6)), node = list(2, 2, 1), solver = "ECOS", B = 10))

The matrix contrasts are like that because there are 7 levels to the group "Tissue" and I frankly am not entirely sure how the contrast matrices work, so if that is somehow a mess contributing to this that would also be useful to know. My initial assumption was that perhaps there were no taxa that passed the pseudo-count sensitivity filters but there are a few that are at values below 0.05 in every column of the 'pseudo_sens_tab' so I am not sure if thats the case.

Thank you for the great package!

FrederickHuangLin commented 10 months ago

Hello @szymanskishay,

I appreciate your report. If you have set pseudo_sens = TRUE, the algorithm should provide you with the passed_ss... columns. Have you attempted to run the example code provided in the vignette to check if you can observe the desired columns? Sometimes the results table can be quite wide, so you may need to scroll all the way to the right to access the passed_ss... columns.

Also, as reported in this post, you might also consider upgrading ANCOMBC package to access the desired columns.

Best regards, Frederick