# Can't download Chocophlan

**URL:** <https://forum.biobakery.org/t/cant-download-chocophlan/3512>\
**Category:** MetaPhlAn\
**Created:** [April 28, 2022, 5:18pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512 "2022-04-28T17:18:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [April 28, 2022, 5:18pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/1 "2022-04-28T17:18:21Z")

</div>

Hi,

I’m trying to run metaphlan3 for the first time on a computer (I’ve run it successfully on other computers), and am getting this error message:

Downloading [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)

Warning: Unable to download [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)  
Traceback (most recent call last):  
File “/apps/metaphlan2/3.0.3/bin/metaphlan”, line 10, in   
sys.exit(main())  
File “/apps/metaphlan2/3.0.3/lib/python3.8/site-packages/metaphlan/metaphlan.py”, line 913, in main  
pars[‘index’] = check\_and\_install\_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2\_build’], pars[‘nproc’], pars[‘force\_download’])  
File “/apps/metaphlan2/3.0.3/lib/python3.8/site-packages/metaphlan/ **init**.py”, line 281, in check\_and\_install\_database  
index = resolve\_latest\_database(bowtie2\_db, ls\_f[‘mpa\_latest’], force\_redownload\_latest)  
UnboundLocalError: local variable ‘ls\_f’ referenced before assignment  
[dianataft@c24a-s23 seqkit\_nosruber]$ metaphlan cat\_trimmed/3000828988.R1.fastq,cat\_trimmed/3000828988.R2.fastq --bowtie2out metaphlan\_bowtie/3000828988.bowtie2.bz2 --input\_type fastq -o 3000828988.metagenome.txt --bowtie2db /blue/dianataft/databases2/

Downloading [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)

Warning: Unable to download [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)  
Traceback (most recent call last):  
File “/apps/metaphlan2/3.0.3/bin/metaphlan”, line 10, in   
sys.exit(main())  
File “/apps/metaphlan2/3.0.3/lib/python3.8/site-packages/metaphlan/metaphlan.py”, line 913, in main  
pars[‘index’] = check\_and\_install\_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2\_build’], pars[‘nproc’], pars[‘force\_download’])  
File “/apps/metaphlan2/3.0.3/lib/python3.8/site-packages/metaphlan/ **init**.py”, line 281, in check\_and\_install\_database  
index = resolve\_latest\_database(bowtie2\_db, ls\_f[‘mpa\_latest’], force\_redownload\_latest)  
UnboundLocalError: local variable ‘ls\_f’ referenced before assignment

I also went to the metaphlan github page, as I remembered there was a link to the database there, and thought I could just download it directly myself. Unfortunately, I got a file not found error message following the link from the github page. Where can I access the database?

Thanks!

---

<div class="post-metadata">

**Author:** ![naomiomics](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/naomiomics/32/1414_2.png) [@naomiomics](https://forum.biobakery.org/u/naomiomics)\
**Post date:** [April 29, 2022, 10:38am UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/2 "2022-04-29T10:38:59Z")

</div>

Hello! I think I am getting an error that could be related to the same issue. I am running metaphlan3 on a big server, and never had issues before, but since this week I keep on getting errors that the directory for the databases isn’t writeable (it never was, and was never an issue before). I tried getting around this by creating a conda env and having my own version of metaphlan3 run there, but here I get the same error as the original poster

Warning: Unable to download [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)  
Traceback (most recent call last):  
File “/home/naomi/.conda/envs/metaphlan-3.0/bin/metaphlan”, line 10, in   
sys.exit(main())  
File “/home/naomi/.conda/envs/metaphlan-3.0/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 913, in main  
pars[‘index’] = check\_and\_install\_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2\_build’], pars[‘nproc’], pars[‘force\_download’])  
File “/home/naomi/.conda/envs/metaphlan-3.0/lib/python3.7/site-packages/metaphlan/ **init**.py”, line 281, in check\_and\_install\_database  
index = resolve\_latest\_database(bowtie2\_db, ls\_f[‘mpa\_latest’], force\_redownload\_latest)  
UnboundLocalError: local variable ‘ls\_f’ referenced before assignment

Any suggestions on how to get metaphlan running?

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [May 18, 2022, 2:18pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/3 "2022-05-18T14:18:54Z")

</div>

Hi @naomiomics and @willowblade  
Thanks for getting in touch. The Dropbox download is not available anymore, instead, in the last version of the tool (available in conda), MetaPhlAn will download the database from the following link: [http://cmprod1.cibio.unitn.it/biobakery3/metaphlan\_databases/mpa\_latest](http://cmprod1.cibio.unitn.it/biobakery3/metaphlan_databases/mpa_latest)

---

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [May 18, 2022, 2:31pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/4 "2022-05-18T14:31:14Z")

</div>

Thank you for this! What should we do if we are using a shared computational cluster and must individual download the database prior to running metaphlan? I tried following this link, but there didn’t seem to be a way to download the database from the link.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [May 18, 2022, 2:37pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/5 "2022-05-18T14:37:40Z")

</div>

Upgrading the version of MetaPhlAn in the shared cluster will fix the error. Which is the version you are currently using (you can check it by executing `metaphlan --version`)

---

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [May 18, 2022, 2:53pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/6 "2022-05-18T14:53:52Z")

</div>

No, I understand that, but at least in the older versions the download would try and happen automatically and would throw an error because the default directory was for a location that users could not access. The cluster does not allow for installation of shared databases, it’s the responsibility of users to download and maintain databases. With the old version, I’d download the file directly from the dropbox, put it in a known location and call the database by full filepath when running metaphlan. I’ve checked the tutorial and the user manual, but both are still sending me to the old dropbox.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [May 18, 2022, 2:55pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/7 "2022-05-18T14:55:49Z")

</div>

I see. In that case, you can find the files here:  
[https://cmprod1.cibio.unitn.it/biobakery3/metaphlan\_databases/mpa\_v30\_CHOCOPhlAn\_201901.tar](https://cmprod1.cibio.unitn.it/biobakery3/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.tar)  
[https://cmprod1.cibio.unitn.it/biobakery3/metaphlan\_databases/mpa\_v30\_CHOCOPhlAn\_201901.md5](https://cmprod1.cibio.unitn.it/biobakery3/metaphlan_databases/mpa_v30_CHOCOPhlAn_201901.md5)

---

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [May 18, 2022, 3:08pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/8 "2022-05-18T15:08:19Z")

</div>

Thank you! This is exactly what I was looking for!

---

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [June 2, 2022, 5:52pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/9 "2022-06-02T17:52:41Z")

</div>

Hi, Turns out even with the directly downloaded database, metaphlan3 keeps trying to download a new version from the website. Is there a way to force metaphlan3 not to check for updates? I even got the cluster to install the database in a folder for us to use, and update it with the last version of metaphlan3, but it’s still trying to install a new version everytime and we don’t have read/write permission to the folder where the cluster support placed the database. Thanks again.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 3, 2022, 11:05am UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/10 "2022-06-03T11:05:40Z")

</div>

Hi @willowblade  
MetaPhlAn will try to download the database if it doesn’t find the 6 bowtie2db files (\*.bt2) and the .pkl file in the `--bowtie2db` folder. After download the database, have you uncompressed the tar file, then uncompressed the fna file, and finally built the bowtie2 database with the bowtie2-build command?

Best,  
Aitor

---

<div class="post-metadata">

**Author:** ![willowblade](https://avatars.discourse-cdn.com/v4/letter/w/b782af/32.png) [@willowblade](https://forum.biobakery.org/u/willowblade)\
**Post date:** [June 3, 2022, 1:54pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/11 "2022-06-03T13:54:50Z")

</div>

Yes, I had all of those files. But it keeps deciding that what I’ve got isn’t the latest version (even when I just downloaded it) and trying to redownload.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [June 7, 2022, 12:29pm UTC](https://forum.biobakery.org/t/cant-download-chocophlan/3512/12 "2022-06-07T12:29:49Z")

</div>

Hi @willowblade  
Sorry, but there is not an option for metaphlan3 in order not to check for updates. However, if metaphlan is retrying to download the database is because it has no access to the database files. If you are pointing the script with the `--bowtie2db` parameter to the correct folder containing the database and adding the `--index mpa_v30_CHOCOPhlAn_201901` and it is still not working, it might be that it metaphlan has no permission to read the files. Could this be the problem?
