yiluheihei / microbiomeMarker

R package for microbiome biomarker discovery
https://yiluheihei.github.io/microbiomeMarker
GNU General Public License v3.0
169 stars 40 forks source link

Plot_ef_bar() returns error for run_aldex() results #73

Open marcinschmidt opened 2 years ago

marcinschmidt commented 2 years ago

I encountered a problem with a code:

res.aldex <- run_aldex(ps, 
                       group = test_grp,
                       taxa_rank = "all",
                       p_adjust = "fdr",
                       pvalue_cutoff = 0.06)
plot_ef_bar(res.aldex)

which returns error for the plot:

Error in .plot_ef(mm, label_level, max_label_len, markers, "bar") : 
  The effect size must be one of lda, diff_mean, eta_squared, logFC, clr_diff_mean, clr_F_statistic, W, imp, LR or F

What am I missing?

fconstancias commented 2 years ago

Hi @marcinschmidt,

I encountered similar patterns when no significant results were determined by the test. In that case I got a warning message as well when running 'run_aldex'. Is it the case?

yiluheihei commented 2 years ago

@fconstancias @marcinschmidt Thanks for your interested in microbiomeMarker. Could you provide your reproducible examples? Thanks.

marcinschmidt commented 2 years ago

Hi @yiluheihei @fconstancias, I got results for my phyloseq using run_lefse() and run_ancombc() , and for run_aldex() as well. For the two first mentioned methods result the plot_ef_bar() gives output/plot but for plot_ef_bar(res.aldex) it returns the error message

yiluheihei commented 2 years ago

Hi @yiluheihei @fconstancias, I got results for my phyloseq using run_lefse() and run_ancombc() , and for run_aldex() as well. For the two first mentioned methods result the plot_ef_bar() gives output/plot but for plot_ef_bar(res.aldex) it returns the error message

A reproducible example will greatly help. Could you provide you phylosq object so that I can test your example? https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example. Thanks.