Bowtie2 align error

Hi
I am new to Metaphlan3, I installed using miniconda3 and build the database in folder outside conda environment and i gave the following commands to run the file.

$ metaphlan 945_metagenome_1.fastq.gz, 945_metagenome_2.fastq.gz --bowtie2out metagenome.bowtie2.bz2 --nproc 5 --input_type fastq -o profiled_metagenome.txt --bowtie2db “/home/bsadaiappan/Metaphlan_databases/” -x mpa_v30_CHOCOPhlAn_201901

And i got this error

/home/bsadaiappan/miniconda3/envs/mpa/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory
(ERR): Description of arguments failed!
Exiting now …
OSError: “Command ‘[‘bowtie2’, ‘-h’]’ returned non-zero exit status 127.”
Fatal error running BowTie2. Is BowTie2 in the system path?
(mpa) [bsadaiappan@pravah K-tara] bowtie2 -h /home/bsadaiappan/miniconda3/envs/mpa/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory (ERR): Description of arguments failed! Exiting now ... (mpa) [bsadaiappan@pravah K-tara] bowtie2 -h
/home/bsadaiappan/miniconda3/envs/mpa/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory
(ERR): Description of arguments failed!
Exiting now …

Please help me on this issue.

Thank you for your valuable time

Hi!
I am not from the team, but recently had the same issue.
If you have sudo permissions, install missing library like this:
sudo apt-get install libtbb2
or
sudo apt-get install libtbb-dev

If you do not have sudo rights, go to bowtie2 github, download .zip file (under releases tab) with precompiled binaries, unzip binaries, make them executable and copy them to your /bin path

Hi timyerg
Thank for your help.
I don’t have sudo permission, so I had followed your instructions, but i don’t know how to make executable.
I just download and unzipped in my HPC.
Can you help me in this issue

Thank you

To make all files executable, run (replace path_to/Bowtie_folder with path to your unzipped files):

chmod -R 757 path_to/Bowtie_folder

If you are planning to run only metaphlan, you can provide (replace path_to/Bowtie_folder/bowtie2 with path to your unzipped bowtie2) to metaphlan command:

--bowtie2_exe path_to/Bowtie_folder/bowtie2

Like this, I was able to run metaphlan on server

ONLY if you are using your own environmemt on HPC, and nobody else is using it:
If you are also planning to run Humann, it is better to copy all bowtie2 related files to you bin directory, since even providing a path to bowtie2 failed in my case:

cp path_to/Bowtie_folder/bowtie2* ~/minoconda3/envs/your_environment/bin

After it, I was able to launch both Metaphlan and Humann on server.

Adjust path to bin and your bowtie2 files.

Also, you can ask moderators to install missing libtbb2 libraries on the server.

Hi timyreg
Thank you so much, the command worked
Thank you

Another solution that worked for me was to downgrade tbb by running conda install tbb=2020.2 within the metaphlan conda environment; see Conda version does not work with most recent tbb version · Issue #336 · BenLangmead/bowtie2 · GitHub

1 Like

Downgrading TBB via conda install tbb=2020.2, and specifying the path within the mpa conda env (system path supplanting the mpa conda env path for bowtie* for some reason) using --bowtie2_exe and --bowtie2_build resolved the first wave of non-zero exit codes (variously 125 127 250 and 245), on a HPC and a fresh install of mpa.