ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
181 stars 55 forks source link

lefse plot #278

Closed jimena18-O closed 5 months ago

jimena18-O commented 9 months ago

Hi!! Run the following script:

t1 <- trans_diff$new(dataset = dataset, method = "lefse", group = "Group", alpha = 0.01, lefse_subgroup = NULL)

see t1$res_diff for the result

From v0.8.0, threshold is used for the LDA score selection.

t1$plot_diff_bar(threshold = 4)

we show 20 taxa with the highest LDA (log10)

t1$plot_diff_bar(use_number = 1:30, width = 0.8, group_order = c("CW", "IW", "TW"))

I have four treatments and I want to graph all on the same graph. How can I do? And I would also like to change the colors of the bars to an aquamarine and coral palette.

ChiLiubio commented 9 months ago

Hi, If one group is not shown in the bar plot, the results mean that in those features, there is no anyone that enriched (with highest abundance) in that group. To adjust colors, please use the parameter color_values in the function plot_diff_bar. To fix each group color for different plotting setting, please also set the parameter color_group_map.

jimena18-O commented 9 months ago

How do I change the score to the lefse analysis? because if I changed it to 3 I would have marker taxa for all the treatments.

Thanks.

ChiLiubio commented 9 months ago

The threshold may be what you need. t1$plot_diff_bar(threshold = 3)