MetaPhlAn Database already present error

am currently using MetaPhlAn version 3.0.13 which I downloaded through conda install. As instructed in the manual, I downloaded the database in a folder outside the Conda environment, by running this:
$ metaphlan --install --bowtie2db

Then I tried the following code with two fastq.gz forward and reverse reads for one sample and indicated the database location as follows:
$ metaphlan P001-READ1-Sequences.txt.gz,P001-READ2-Sequences.txt.gz --bowtie2db /data/homezvol2/cirodri1/bowtie2db_folder --bowtie2out metagenome.bowtie2.bz2 --input_type fastq -o profiled_metagenome.txt

But when running that code I get the following error:

I have been checking through the github issues channel and found a similar issue #157 but the issue was closed by the user without a solution.

Then, I tried running the following code on the same set of fastq.gz files:
$ for f in .gz*
do
echo “Running metaphlan 3.0 on ${f}”
bn=$(basename ${f%fastq.bz2})
metaphlan $f --input_type fastq -s sams/${bn}.sam.bz2 --bowtie2db /data/homezvol2/cirodri1/bowtie2db_folder --bowtie2out bowtie2/${bn}.bowtie2.bz2 -o profiles/${bn}_profile.tsv
done

and I obtained the following error:


Can anyone guide me into making my Metaphlan work correctly and locate the database. Thank you!

  • Version: 3.0.13
  • Download source through conda create --name mpa -c bioconda python=3.7 metaphlan
  • I am running the program from a remote server and inside a miniconda self-made environment.

I activated my conda mpa environment where Metaphlan was installed, and then I did $ conda install tbb=2020.2. After this the bowtie2 --help worked!

Unfortunately, Metaphlan still did not run successfully

I get the following error:
No MetaPhlAn BowTie2 database found (–index option)!
Expecting location /data/homezvol2/cirodri1/bowtie2db_folder/mpa_v30_CHOCOPhlAn_201901
Exiting…

Even though I have downloaded the database with:
$ metaphlan --install --bowtie2db bowtie2db_folder

And it is located in the same location I indicated in my code:

1 Like

I am going to bump this because I am running into a similar issue. I am running metaphlan v3.1.0 (conda installed) with the following command.

metaphlan /home/ewissel2/scr4_jsuez1/reprocessed_data/bbsplit_out/a4_CKDN220052185-1A_HF2WYDSX5_L4_cat.fastq.gz --input_type fastq --nproc 24 -o /home/ewissel2/scr4_jsuez1/reprocessed_data/metaphlan3_out/a4_CKDN220052185-1A_HF2WYDSX5_L4_metaphlan3.tsv --no_map --sample_id a4_CKDN220052185-1A_HF2WYDSX5_L4 --index mpa_v31_CHOCOPhlAn_201901 --bowtie2db /home/ewissel2/scr4_jsuez1/shared_databases/metaphlan/chocophlan/

I get the following error message:

Warning! Biom python library not detected!
Exporting to biom format will not work!
Downloading MetaPhlAn database
Please note due to the size this might take a few minutes
ERROR: The directory is not writeable: /home/ewissel2/scr4_jsuez1/shared_databases/metaphlan/chocophlan/. Please modify the permissions.

I have the database installed in shared_databases/metaphlan/chocophlan/ so it is not clear to me why it is trying to install it again. I double checked my index and bowtie_db flags to make sure the information was correct and it is. I was able to run metaphlan when it was included in the humann v3 run, but am running into this issue when trying to run it separately. I am very open to suggestions on hown to proceed.