The bioBakery help forum

Lefse comparing subjects not groups

Dear lefse team

Following the lefse tutorial using the data and commands provided there: hmp_small_aerobiosis.xls -c 1 -s 2 -u 3 -o 1000000 hmp_aerobiosis_small.res hmp_aerobiosis_small.res results/hmp_aerobiosis_small.png
instead of getting a plot that shows the differences between groups I get one which shows the differences between subjects:

Yet if I change the -c, -s and -u such that I would expect it to differentiate beween groups it says there are no significant features found.

I initially suspected that I have an old version of lefse, but running the -h command it says its version is 1.1.01 and conda installs the exact same version if I specify for it to install the version 1.1.1.

I’m unsure if it’s an error on my part, the program’s or conda’s. I would appreciate any help solving this issue.

Hello there,
This seems very similar to this question that was asked recently, though I’m not sure if my suggestion worked for that asker. I am curious where you’re seeing the following command, as I did not see it when I followed the link to the tutorial you sent: hmp_small_aerobiosis.xls -c 1 -s 2 -u 3 -o 1000000
When I follow the link you sent, I see documentation that gives the following command: hmp_aerobiosis_small.txt -c 1 -s 2 -u 3 -o 1000000
The version I am using is the biobakery (not bioconda) version of LEfSe, which I installed using the following command:
conda install -c biobakery lefse
The version I have is 1.0. Perhaps try re-installing with the above command, and if that doesn’t work, please let me know!

Dear all,

I am having the same problem as this one reported above. I started from scratch, in a new environment dedicated only to LEfSe. I used this recipe conda install -c biobakery lefse .

I couldn’t find the executable so I found available and used this exactly like detailed above by other user. I got the same output, a figure where the cases (row 3) are interpreted as ‘class’.

I checked to other question and advice and did conda update lefse and got

Collecting package metadata (current_repodata.json): done
Solving environment: done

All requested packages already installed.

Thanks for your help!

Just a brief update on this issue in case it helps I resurrected an old conda environment installed in a cluster and successfully run my data and grouped the samples as I desired. The difference is the old conda is the old conda way to install LEfse (LEfSe 1.0) and the new local one is the new biobakery recipe (LEfSe 1.1.01). Attached is the list of installed packages I found in the ‘working’ old environment.

lefse.tsv (9.1 KB)


Thanks all, I will bring this up with the system administrators and update here as soon as I have more information.

Hello All,
Thanks for your patience; there were some things we needed to resolve on our end re: reconciling two parallel versions of the LEfSe software. The most up-to-date version is now a python package in PyPi found here, which can be installed using the command “pip install lefse” . The command names have changed to have lefse_ in front, as shown here. The software now performs as it should with regard to plotting by group rather than subject.

Thank you very much Meg, I think I have a problem trying to install it.
I followed this to install, maybe I am setting something wrong
I downloaded, uncompressed the tar and entered the folder
Then I tried this

I tried installating under python 3 with the following commands

mamba create -n lEFSE 
conda activate lEFSE
mamba install pip
which pip
pip --version
pip 21.2.4 from /home/andrespara/.local/lib/python3.9/site-packages/pip (python 3.9)
pip install lefse

I am attaching the output or log for this but it gives an error Failed to build biom-format rpy2

LOGwithpython3.txt (36.4 KB)

This is not directly about LEfSe but it seems I am scrambling something either with pip or with some version of python. I already look for help about this error ERROR: Could not build wheels for biom-format which use PEP 517 and cannot be installed directly but I couldn’t solve it. If it is only due to the version of pip or my python I will keep trying to solve it.

It also fails under this way forcing 3.7

 mamba create -n lefseUNDER python=3.7
 conda activate lefseUNDER
 mamba install pip
 pip install lefse



Hi Andres,
It looks like it might be a dependencies issue; give the following threads a try for the needed installs:


Hi Meg,

Thanks for the heads up I will check these threads