Command '['bowtie2-build', '--usage']' returned non-zero exit status 250

Hi

I had no problem running MetaPhlan last week but haven’t been able to run it today due to this error message. I tried uninstalling and reinstalling to see if that would fix the problem but it hasn’t. I installed using conda.

This is what I get:
$ metaphlan BBC3240_R1.fastq.gz --bowtie2out BBC3240_R1.bowtie2.bz2 --input_type fastq -o BBC3240_R1.txt

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

File /Users/s4/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.tar already present!

File /Users/s4/miniconda3/lib/python3.7/site-packages/metaphlan/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.md5 already present!
Traceback (most recent call last):
File “/Users/s4/miniconda3/bin/metaphlan”, line 10, in
sys.exit(main())
File “/Users/s4/miniconda3/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 “/Users/s4/miniconda3/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 “/Users/s4/miniconda3/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 “/Users/s4/miniconda3/lib/python3.7/subprocess.py”, line 411, in check_output
**kwargs).stdout
File “/Users/s4/miniconda3/lib/python3.7/subprocess.py”, line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘bowtie2-build’, ‘–usage’]’ returned non-zero exit status 250.

I saw on another thread that was somewhat similar to check with bowtie2 --version and bowtie2-build if the installation worked. With those I get these messages respectively if that helps:
dyld: Library not loaded: @rpath/libtbb.dylib
Referenced from: /Users/s4/miniconda3/bin/bowtie2-align-s
Reason: image not found
(ERR): Description of arguments failed!
Exiting now …

and
dyld: Library not loaded: @rpath/libtbb.dylib
Referenced from: /Users/s4/miniconda3/bin/bowtie2-build-s
Reason: image not found

Can you try installing MetaPhlAn in a environmnent separate from the base?

I fixed it by manually downloading bowtie2 and using those to replace the bowtie2 files downloaded by conda, no idea why that worked but it did, thanks for the help

1 Like

Can you explain what “separate from the base” means? I am getting the same error.

Did you fixed it?

What worked for me was creating a clean env, installing metaphlan using pip, and then installing bowtie2 separately.

Hi @sophieleech, would you mind sharing what lines of codes you ran to do that? Thanks!

Sorry for the very late reply. This was a while ago so I’m not 100% sure but I didn’t use code, I just downloaded it and opened up where bowtie2 is saved and replaced the files manually.

I just update bowtie2 package by " conda update bowtie2", and then update metaphlan “conda update metaphlan”.

3 Likes

I installed metaphlan(3.0.13) in a new environment by using conda create -n metaphlan.3.0.13 metaphlan=3.0.13 and I also encountered this bowtie2-build error. I found the bowtie2 in ~/software/anaconda3/envs/metaphlan.3.0.13/bin did not work. When I typed ./bowtie2, it gave /Dell/Dell15/jiaobk/software/anaconda3/envs/metaphlan.3.0.13/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory.

I copied the libtbb.so.2 from bowtie2 environment’s lib directory to the metaphalan/lib, and the bowtie2 in metaphlan/bin worked, so did the metaphlan.