# MetaPhlAn Database already present error 

**URL:** <https://forum.biobakery.org/t/metaphlan-database-already-present-error/2732>\
**Category:** MetaPhlAn\
**Created:** [October 28, 2021, 12:56pm UTC](https://forum.biobakery.org/t/metaphlan-database-already-present-error/2732 "2021-10-28T12:56:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cirodri1](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@cirodri1](https://forum.biobakery.org/u/cirodri1)\
**Post date:** [October 28, 2021, 12:56pm UTC](https://forum.biobakery.org/t/metaphlan-database-already-present-error/2732/1 "2021-10-28T12:56:05Z")

</div>

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:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/2X/4/42c560e67877fa426ad8ad8a7cfdbdb2e65742df.png)

I have been checking through the github issues channel and found a similar issue [#157](https://github.com/biobakery/MetaPhlAn/issues/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:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/2X/a/a0d3cc98f555a0d06b771458bc852cfbcf184908.png)  
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.

---

<div class="post-metadata">

**Author:** ![cirodri1](https://avatars.discourse-cdn.com/v4/letter/c/e9bcb4/32.png) [@cirodri1](https://forum.biobakery.org/u/cirodri1)\
**Post date:** [October 28, 2021, 5:35pm UTC](https://forum.biobakery.org/t/metaphlan-database-already-present-error/2732/2 "2021-10-28T17:35:20Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/2X/8/848816a4014b0c74b46401bd6c6edfe09466869f.png)

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:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/2X/0/0fb6ee4de76b5505d89bcf2764c6cb7701196b9a.png)

---

<div class="post-metadata">

**Author:** ![ewissel](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/ewissel/32/568_2.png) [@ewissel](https://forum.biobakery.org/u/ewissel)\
**Post date:** [October 20, 2023, 6:50pm UTC](https://forum.biobakery.org/t/metaphlan-database-already-present-error/2732/3 "2023-10-20T18:50:11Z")

</div>

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.
