Can't get MetaPhlAn to complete within HUMAnN 3

Can you help? I installed this as a conda install -c biobakery

Thank you for any help.

(biobakery) [shighlander@aspen-login1 shighlander]$ humann --input demo.fastq --output cyp8b1.humann/
Output files will be written to: /labs/Microbiome/shighlander/cyp8b1.humann
WARNING: Can not call software version for bowtie2

Running metaphlan …

CRITICAL ERROR: Error executing: /labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/bin/metaphlan /labs/Microbiome/shighlander/demo.fastq -t rel_ab -o /labs/Microbiome/shighlander/cyp8b1.humann/demo_humann_temp/demo_metaphlan_bugs_list.tsv --input_type fastq --bowtie2out /labs/Microbiome/shighlander/cyp8b1.humann/demo_humann_temp/demo_metaphlan_bowtie2.txt

Error message returned from metaphlan :

Downloading MetaPhlAn database
Please note due to the size this might take a few minutes

File /labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.tar already present!

File /labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.md5 already present!
Traceback (most recent call last):
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/bin/metaphlan”, line 10, in
sys.exit(main())
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 925, in main
pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/init.py”, line 301, in check_and_install_database
download_unpack_tar(index, bowtie2_db, bowtie2_build, nproc, use_zenodo)
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/init.py”, line 180, in download_unpack_tar
bt2_build_output = subp.check_output([bowtie2_build, ‘–usage’], stderr=subp.STDOUT)
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/subprocess.py”, line 411, in check_output
**kwargs).stdout
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/subprocess.py”, line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘bowtie2-build’, ‘–usage’]’ returned non-zero exit status 127.

Hi Sarah,

Coul you check that post .

Thank you. I will try this.

Sarah

This got rid of the bowtie warning but didn’t solve to problem on metaphlan not running.

Error message returned from metaphlan :

Downloading MetaPhlAn database
Please note due to the size this might take a few minutes

File /labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.tar already present!

File /labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.md5 already present!
Traceback (most recent call last):
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/bin/metaphlan”, line 10, in
sys.exit(main())
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 925, in main
pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/init.py”, line 301, in check_and_install_database
download_unpack_tar(index, bowtie2_db, bowtie2_build, nproc, use_zenodo)
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/site-packages/metaphlan/init.py”, line 180, in download_unpack_tar
bt2_build_output = subp.check_output([bowtie2_build, ‘–usage’], stderr=subp.STDOUT)
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/subprocess.py”, line 411, in check_output
**kwargs).stdout
File “/labs/Microbiome/shighlander/bin/anaconda3/envs/biobakery/lib/python3.7/subprocess.py”, line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘bowtie2-build’, ‘–usage’]’ returned non-zero exit status 127.

Hi, I have noticed that many errors are coming from a library that Bowtie needs and it seems is not properly installed (I experienced a similar error). You could try installing the library inside the conda environment with:

conda install tbb

Hope this helps.

Thanks I’ll try that!

Unfortunately, this didn’t work :frowning:

Thanks for the suggestion though.

Yes, you were correct that it was tbb but there is a new tbb that is incompatible with bowtie. I downgraded to tbb-2020.2 and that fixed the problem.

Thanks for your help!

Sarah

1 Like

Hi Sarah, you are welcome, I’m glad you solved your issue!

For conda noobs like myself coming to this thread and wondering how to implement the tbb fix, you need to specify tbb=2020.2 at installation. Here’s my recipe, based on the most recent HUMAnN 3.0 installation instructions:

source /home/miniconda3/bin/activate
conda create --name biobakery3 python=3.7
conda activate biobakery3
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels biobakery
conda install humann tbb=2020.2 -c biobakery

Attempts to remove and reinstall tbb from environments that have already been built results in the removal of all packages that depend on tbb. Per this SO post, it may be possible to use conda remove --force tbb followed by conda install tbb=2020.2, though I haven’t tried this.