# Lefse comparing subjects not groups

**URL:** <https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413>\
**Category:** LEfSe\
**Created:** [July 23, 2021, 6:29am UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413 "2021-07-23T06:29:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neuron](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Neuron](https://forum.biobakery.org/u/Neuron)\
**Post date:** [July 23, 2021, 6:29am UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/1 "2021-07-23T06:29:40Z")

</div>

Dear lefse team

Following the [lefse tutorial](https://github.com/biobakery/biobakery/wiki/lefse) using the data and commands provided there:  
`lefse-format_input.py hmp_small_aerobiosis.xls hmp_aerobiosis_small.in -c 1 -s 2 -u 3 -o 1000000`

`run_lefse.py hmp_aerobiosis_small.in hmp_aerobiosis_small.res`

`plot_res.py 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:

 ![hmp_small_aerobiosis](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/a1c89dc8b607956cb21e7244492bd50d7b75e839.png)  
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 run\_lefse.py -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.

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [July 27, 2021, 2:48pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/2 "2021-07-27T14:48:06Z")

</div>

Hello there,  
This seems very similar to [this](https://forum.biobakery.org/t/problme-with-lefse-using-command-line-interface/2283) 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: lefse-format\_input.py hmp\_small\_aerobiosis.xls hmp\_aerobiosis\_small.in -c 1 -s 2 -u 3 -o 1000000  
When I follow the link you sent, I see documentation that gives the following command:  
format\_input.py hmp\_aerobiosis\_small.txt hmp\_aerobiosis\_small.in -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!  
Thanks,  
Meg

---

<div class="post-metadata">

**Author:** ![drelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/drelo/32/566_2.png) [@drelo](https://forum.biobakery.org/u/drelo)\
**Post date:** [August 2, 2021, 8:51pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/3 "2021-08-02T20:51:38Z")

</div>

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 format\_input.py executable so I found lefse-format\_input.py 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!

---

<div class="post-metadata">

**Author:** ![drelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/drelo/32/566_2.png) [@drelo](https://forum.biobakery.org/u/drelo)\
**Post date:** [August 3, 2021, 9:54pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/4 "2021-08-03T21:54:02Z")

</div>

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](https://forum.biobakery.org/uploads/short-url/8LFrvtKtwnENZ0b4i2EmVqxlSqy.tsv) (9.1 KB)

Cheers

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [August 6, 2021, 3:55pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/5 "2021-08-06T15:55:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [August 24, 2021, 7:33pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/6 "2021-08-24T19:33:50Z")

</div>

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](https://pypi.org/project/lefse/), which can be installed using the command “pip install lefse” . The command names have changed to have lefse\_ in front, as shown [here](https://github.com/SegataLab/lefse/blob/master/example/bioconda-lefse_run.sh). The software now performs as it should with regard to plotting by group rather than subject.  
Best,  
Meg

---

<div class="post-metadata">

**Author:** ![drelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/drelo/32/566_2.png) [@drelo](https://forum.biobakery.org/u/drelo)\
**Post date:** [August 24, 2021, 9:15pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/7 "2021-08-24T21:15:56Z")

</div>

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

```auto
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](https://forum.biobakery.org/uploads/short-url/yyspbmYzZRy7lavy7rL3j7gKUwd.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.

**ETA**  
It also fails under this way forcing 3.7

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

```

Best

Andres

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [September 8, 2021, 9:03pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/8 "2021-09-08T21:03:20Z")

</div>

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

> <https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory/21530768#21530768>

> <https://github.com/okfn/piati/issues/65#issuecomment-39722476>
>
> Hi,
> 
> Faced some compilation issues: any hints?
> 
> x86\_64-linux-gnu-gcc -pthread -D…NDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D\_FORTIFY\_SOURCE=2 -fPIC -I/usr/include/libxml2 -I/var/www/piati/pyenv/build/lxml/src/lxml/includes -I/usr/include/python3.3m -I/var/www/piati/pyenv/include/python3.3m -c src/lxml/lxml.etree.c -o build/temp.linux-x86\_64-3.3/src/lxml/lxml.etree.o
> 
> src/lxml/lxml.etree.c:8:22: fatal error: pyconfig.h: No such file or directory
> 
> #include "pyconfig.h"
> 
> \`\`\`
> ^
> \`\`\`
> 
> compilation terminated.
> 
> /usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'bugtrack\_url'
> 
> warnings.warn(msg)
> 
> error: command 'x86\_64-linux-gnu-gcc' failed with exit status 1
> 
> \---
> 
> Cleaning up...
> 
> Removing temporary dir /var/www/piati/pyenv/build...
> Command /var/www/piati/pyenv/bin/python3.3 -c "import setuptools;\*\*file\*\*='/var/www/piati/pyenv/build/lxml/setup.py';exec(compile(open(\*\*file\*\*).read().replace('\\r\\n', '\\n'), \*\*file\*\*, 'exec'))" install --record /tmp/pip-ljykbz-record/install-record.txt --single-version-externally-managed --install-headers /var/www/piati/pyenv/include/site/python3.3 failed with error code 1 in /var/www/piati/pyenv/build/lxml
> 
> Exception information:
> Traceback (most recent call last):
> File "/var/www/piati/pyenv/lib/python3.3/site-packages/pip/basecommand.py", line 134, in main
> status = self.run(options, args)
> File "/var/www/piati/pyenv/lib/python3.3/site-packages/pip/commands/install.py", line 241, in run
> requirement\_set.install(install\_options, global\_options, root=options.root\_path)
> File "/var/www/piati/pyenv/lib/python3.3/site-packages/pip/req.py", line 1298, in install
> requirement.install(install\_options, global\_options, \_args, \*\_kwargs)
> File "/var/www/piati/pyenv/lib/python3.3/site-packages/pip/req.py", line 625, in install
> cwd=self.source\_dir, filter\_stdout=self.\_filter\_install, show\_stdout=False)
> File "/var/www/piati/pyenv/lib/python3.3/site-packages/pip/util.py", line 670, in call\_subprocess
> % (command\_desc, proc.returncode, cwd))
> pip.exceptions.InstallationError: Command /var/www/piati/pyenv/bin/python3.3 -c "import setuptools;\_\_file\_\_='/var/www/piati/pyenv/build/lxml/setup.py';exec(compile(open(\*\*file\*\*).read().replace('\\r\\n', '\\n'), \*\*file\*\*, 'exec'))" install --record /tmp/pip-ljykbz-record/install-record.txt --single-version-externally-managed --install-headers /var/www/piati/pyenv/include/site/python3.3 failed with error code 1 in /var/www/piati/pyenv/build/lxml

Best,  
Meg

---

<div class="post-metadata">

**Author:** ![drelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/drelo/32/566_2.png) [@drelo](https://forum.biobakery.org/u/drelo)\
**Post date:** [September 8, 2021, 9:21pm UTC](https://forum.biobakery.org/t/lefse-comparing-subjects-not-groups/2413/9 "2021-09-08T21:21:00Z")

</div>

Hi Meg,

Thanks for the heads up I will check these threads

Best,

Andrés
