The bioBakery help forum

LefSe: what happens if no subclass

Hello,

I’ve seen this question asked a few times on the previous lefse forum but never answered succinctly. If one does not provide a subclass, does LefSe run the wilcoxon? If so, what is it testing and will the result differ from only the KW?

If one does provide a subclass, will the results from the wilcoxon show up in the “.res” file?

Thanks in advance!
John

Without a subclass LEfSe should reduce to a per-feature KW test. I am not sure about the answer to the second question, though I would recommend migrating to MaAsLin2 for problems involving more than one covariate.

Hello,

I have a related question. I ran LEfSe using the conda install of the biobakery tool. I used a table with no subclass using these steps:

format_input.py rel_freq_cntrl_ace_L6_lefse_2.txt freq_table_formatted.in -c 1 -o 1000000
run_lefse.py freq_table_formatted.in lefse_out.res -y 1

I got the following message printed:

Number of significantly discriminative features: 0 ( 35 ) before internal wilcoxon

No features with significant differences between the two classes

Number of discriminative features with abs LDA score > 2.0 : 0

Correct me if I’m interpreting things wrong, but these results are telling me that I had 35 significantly discriminative features before the Wilcoxon test and that number was dropped to 0 after the Wilcoxon test. Based on your answer to the original question the Wilcoxon test shouldn’t have been run since I don’t have subclasses, correct? Am I missing a step/flag in the formatting command?

Thanks!
Samantha

Hi Samantha,
It is indeed strange that LEfSe seems to be still performing the Wilcoxon test. Could you try setting the flag -wilc to 0 for run_lefse.py (it forces LEfSe to skip the Wilcoxon step)?
Thanks!
Siyuan

Hi Siyuan,

Adding --wilc 0 appears to have fixed the issue! I now get this output:

Number of significantly discriminative features: 35 ( 0 ) before internal wilcoxon

Number of discriminative features with abs LDA score > 2.0 : 35

Thank you,
Samantha

Hello franzosa,
I came from the other thread regarding this question, I understand that without a subclass, LEfSe perform only a per-feature KW test. However, when examined the result with option --wilc 0, there were no p-value present, when the p-value is expected to come from K-W test. Is this behaivour normal? I thought that whether --wilc is 0 or 1, the result report p-value from K-W test. Hoping to hear from you at your earliest convenience.

From what I have observed, the p values are only reported for features when they are significant. This is a problem though as it makes correcting for FDR/multiple comparisons impossible. I don’t know if there is a current solution.

1 Like

Hello jmgreenb, thank you very much for your reply. I understand that p-values are only reported for features when they are significant. However, my question is that when comparing only two classes, “–wilc 0” return no p-value while “–wilc 1” return p-values, when there are significant features. When comparing two classes, K-W and Wilcoxon rank-sum test produces essentially identical results. So I don’t know why when “–wilc 0”, they produce no p-value. They should return p-value from K-W test… And still no input from developers…

I post the other thread regarding this question:

I think it is not strange since when specifying no subclass (-s 1), input_format.py produces subclasses that is identical to classes, then perform wilcoxon test which is by default set to be performed (–wilc 1). Could you please answer the latest question in this thread, that when specifying --wilc to 0, why are there no p-value reported whenever K-W is significant? Reproducible example is in Question about LEfSe input_format.py when specifing no subclass
I think we need developers who were involved in publication of LEfSe