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

"Error: subscript contains invalid names" when running ancombc2 #264

Closed tfccheng closed 2 months ago

tfccheng commented 7 months ago

When I ran ancombc2, it reported an error "Error: subscript contains invalid names". I have tried both tse and transformed phyloseq object. In my previous project, everything was ok. But this time, I don't know what went wrong.

output = ancombc2(data = tse, assay_name = "counts", tax_level = "Genus", fix_formula = "Sample", rand_formula = NULL, p_adj_method = "fdr", pseudo = 0, pseudo_sens = TRUE, prv_cut = 0, lib_cut = 0, s0_perc = 0.05, group = "Disease", struc_zero = TRUE, neg_lb = TRUE, alpha = 0.2, n_cl = 12, 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 = 20), 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)), node = list(2, 2), solver = "ECOS", B = 100)) image

tfccheng commented 7 months ago

I've found my issue. Please delete this issue topic. Thanks.

mariamaseng commented 5 months ago

I have the same problem! What was your issue tfccheng? :-)

mariamaseng commented 5 months ago

Hehe me to found it. I had called a fixed effect variable by wrong name.