Closed StanleyDeng27 closed 6 months ago
I tried the solution you provided to other users, I don't know if it is the same as mine, but it still doesn't solve the problem dataset$tax_table %<>% tidy_taxonomy dataset$cal_abund()
l1 <- trans_diff$new( dataset = dataset, method = "lefse", group = "group", taxa_level = "all", alpha = 0.01, p_adjust_method = "fdr", lefse_norm = 1000000, nresam = 0.6667, boots = 100, )
clad <- l1$plot_diff_cladogram(
filter_taxa = 0.0001,
use_taxa_num = 200,
use_feature_num = 50,
clade_label_level = 5,
only_select_show = FALSE,
group_order =NULL,
node_size_offset = 1.5,
annotation_shape = 21,
annotation_shape_size = 4.5,
clade_label_size =1,
alpha = 0.2
)
Select 50 significant features ...
Select 200 most abundant taxa as the background cladogram ...
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Warning: Ignoring unknown parameters: level
Hi. Could you please attach your data and the scripts so that I can reproduce your result? Please save your microtable object following the tutorial (https://chiliubio.github.io/microeco_tutorial/notes.html#save-function) and provide your lefse steps, i.e. steps from trans_diff part. Please also provide your microeco version. It is important. Thanks.
dataset.zip version:microeco_0.20.0
load("./dataset.RData") lefse <- trans_diff$new(dataset = dataset, method = "lefse", group = "group", alpha = 0.05, lefse_subgroup = NULL, p_adjust_method = "none")
lefse$plot_diff_bar(use_number = 1:40, width = 0.8, group_order = c("1", "2"))
lefse$plot_diff_cladogram(use_taxa_num = 200, use_feature_num = 50, clade_label_level = 5, group_order = c("1","2")) #this step is problematic
Hi.
Please first adjust use_taxa_num
parameter to 150 and try again.
g1 <- lefse$plot_diff_cladogram(use_taxa_num = 150, use_feature_num = 50, clade_label_level = 5, group_order = c("1","2"))
ggplot2::ggsave("test.pdf", g1, width = 14, height= 10)
It is a bug. The total effective taxa (without unidentified) number is less than 200 in your dataset. The program lack a checking step, leading to NA and chaos in the running. Please temporarily ingore the warinings as they comes from the inner function of dependent ggtree package. Thanks very much for your finding!
Best, Chi
hi! It did work! I re-analyzed it using your code and was indeed able to solve my problem. Thank you so much for your help!
Best, Deng
hi! i try to use the function plot_diff_cladogram, and i just follow the microeco tutorial, and the location is Chapter 6 Model-based class.I can execute LEfSe normally, the figure of LDA score and relative abundance is normal. But when i try to show the cladogram of the differential features in the taxonomic tree, as the following code: lefse is my project, and the group is 1 and 2. I can't get the graphics right. And the warnings are long and repetitive, so I've kept only part of them. In the sample_table, I converted the group column into a factor form, but the problem still cannot be solved. This problem has troubled me for a long time, I don't know how to solve it, if I can get your help, I will be very grateful!