Running MetaPhlan3 - Fatal error running BowTie2. Is BowTie2 in the system path?

Hello there,

I installed MetaPhlan3 using miniconda in a new environment. I run an example code:

metaphlan
filtered.fastq
-x mpa_v30_CHOCOPhlAn_201901
–bowtie2_exe /home/prdas/miniconda3/envs/metaphlan3/bin
–bowtie2db /home/prdas/software/metaphlan3_mpa_v30
–input_type fastq
-o profiled_metagenome.txt

The error is:

OSError: “[Errno 13] Permission denied: ‘/home/prdas/miniconda3/envs/metaphlan3/bin’”
Fatal error running BowTie2. Is BowTie2 in the system path?

I don’t have sudo rights so I could not do sudo apt-get install libtbb2 or sudo apt-get install libtbb-dev

Hence I tried :
chmod -R 757 /home/prdas/software/bowtie2-2.4.4 (source zipfile downloaded from Bowtie2 github)
cp /home/prdas/software/bowtie2-2.4.4/bowtie2* /home/prdas/miniconda3/envs/metaphlan3/bin
export PATH="$PATH:/home/prdas/miniconda3/envs/metaphlan3/bin";

Please see the permission settings after chmod:
-rwxrwxr-x 2 prdas glab 26906 Jun 23 16:24 bowtie2
-rwxrwxr-x 1 prdas glab 25823864 Jun 23 16:08 bowtie2-align-l
-rwxr-xr-x 1 prdas glab 33785400 Jun 23 16:08 bowtie2-align-l-debug
-rwxrwxr-x 1 prdas glab 25902912 Jun 23 16:08 bowtie2-align-s
-rwxr-xr-x 1 prdas glab 33824280 Jun 23 16:08 bowtie2-align-s-debug
-rwxrwxr-x 2 prdas glab 2849 Jun 23 16:24 bowtie2-build
-rwxrwxr-x 1 prdas glab 15192968 Jun 23 16:08 bowtie2-build-l
-rwxr-xr-x 1 prdas glab 18043352 Jun 23 16:08 bowtie2-build-l-debug
-rwxrwxr-x 1 prdas glab 15197912 Jun 23 16:08 bowtie2-build-s
-rwxr-xr-x 1 prdas glab 18069680 Jun 23 16:08 bowtie2-build-s-debug
-rwxrwxr-x 2 prdas glab 2762 Jun 23 16:24 bowtie2-inspect
-rwxrwxr-x 1 prdas glab 14679712 Jun 23 16:08 bowtie2-inspect-l
-rwxr-xr-x 1 prdas glab 14562792 Jun 23 16:08 bowtie2-inspect-l-debug
-rwxrwxr-x 1 prdas glab 14736928 Jun 23 16:08 bowtie2-inspect-s
-rwxr-xr-x 1 prdas glab 14619184 Jun 23 16:08 bowtie2-inspect-s-debug
-rwxrwxr-x 3 prdas glab 3364 Aug 18 2014 bowtie2sam.pl

None of the three steps worked and still shows the same error.

Could you please help me with how to fix this? I thought that all the dependencies get configured automatically if one installs through conda. What am I missing?

Best,
Promi.

Bringing up for attention :slight_smile:

Hi @promidas, sorry for not replying to this earlier.

Why installing these packages?

It seems weird that bowtie2 is not installed in the conda environment, however the OSError is caused by not including bowtie2 at the end of the --bowtie2_exe parameter value.
If bowtie2 is in the system path you can avoid specifying the location of the executable via the bowtie2_exe parameter.