ggloor / ALDEx_bioc

ALDEx_bioc is the working directory for updating bioconductor
26 stars 13 forks source link

Error when running run_aldex with kruskal or glm_anova for more than 2 level comparisons on "microbiomeMarker" package #72

Open LauGuaUuu opened 5 months ago

LauGuaUuu commented 5 months ago

Good day,

I am trying to run Aldex2 on my data as phyloseq objects, for microbiome and metabolomics data. I am though, suspecting the function run_aldex with comparisons with co-variates with more than 2 levels does not work. This is, the options "kruskal" and "glm_anova" give error messages.

I get this error message when running "run_aldex":

Error in UseMethod("filter") : no applicable method for 'filter' applied to an object of class "c('simpleError', 'error', 'condition')"

This i the code I use, which works if I test a group or co-variate with 2 levels with method = t.test:

Aldex.Cd <- run_aldex( phy.Cd.10prev, group ="Treat", #Treat has 5 levels taxa_rank = "Genus", transform = "identity", norm = "none", method = "kruskal", p_adjust = "fdr", pvalue_cutoff = 0.05, mc_samples = 128, denom = "all", paired = FALSE )

My group of comparison "Treat" is composed of 5 levels. As said, if I use a group with 2 levels and method = "t.test", then the run_aldex works, but I want to run the multiple group test!

If run the simple , the multiple group comparisons works, with the code bellow.

DA.Cd.Treat <- run_test_multiple_groups( phy.Cd.10prev, group = "Treat", taxa_rank = "Genus", # Which taxa rank, also "all" is all taxa by the top taxa ranks or "none" is ASV level transform = c("identity"), norm = "CLR", # "none", "CLR", "rarefy", etc.. see above norm_para = list(), method = c("kruskal"), # "kruskal" or "anova", p_adjust = c("fdr"), # "none", "fdr", "bonferroni", "holm", "hochberg", "hommel", "BH", "BY" pvalue_cutoff = 0.05, effect_size_cutoff = NULL )

BUT, I want to run Aldex2, as I do not know if this "run_test_multiple_groups" is analogous, or does the same as Aldex2.

Also, are pairwise comparisons on multigroups of more than 2 levels possible with Aldex2 aferwards?.

Thank you very much!.. I hope you can help soon...

LAU