Metaphlan2 cannot download newest file about mpa_latest

i installed metaphlan2.8 with conda in linux.
But i run the code metaphlan2.py SRS014476-Supragingival_plaque.fasta.gz --input_type fasta > SRS014476-Supragingival_plaque_profile.txt
it show this error as follows:
Downloading https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest

Warning: Unable to download https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest
Traceback (most recent call last):
** File “/home/ftz/anaconda3/bin/metaphlan2.py”, line 1442, in **
** metaphlan2()**
** File “/home/ftz/anaconda3/bin/metaphlan2.py”, line 1164, in metaphlan2**
** pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])**
** File “/home/ftz/anaconda3/bin/metaphlan2.py”, line 570, in check_and_install_database**
** index = resolve_latest_database(bowtie2_db, force_redownload_latest)**
** File “/home/ftz/anaconda3/bin/metaphlan2.py”, line 549, in resolve_latest_database**
** with open(os.path.join(bowtie2_db,‘mpa_latest’)) as mpa_latest:**
FileNotFoundError: [Errno 2] No such file or directory: '/home/ftz/anaconda3/bin/metaphlan_databases/mpa_latest’
This url i cannot access,so how to fix it or download this file.

Hi,
we are updating the bioconda package to reflect the changes made in the repository, the database is no more available on bitbucket since we migrated the repository to GitHub.

In the meantime, you can get the latest MetaPhlAn2 from the repository

Thank you reply me!
But i have a new question when i using bioconda .
i am download all realted documents about metaphlan2,so i try it .However,it run with a instruction like “Building Bowtie2 index",and i unzip the ”mpa_v296_CHOCOPhlAn_201901.tar“file and i just get 4 files.It dosen’t have .rev files.

Have you checked that the process has terminated correcly/is not still running?
Can you post here a ls of the metaphlan_databases folder?

Just like this?
Sorry , I ’m a beginner, so I don’t understand many related things.
and i run the code “metaphlan SRS014476-Supragingival_plaque.fasta.gz --input_type fasta -o SRS014476-Supragingival_plaque_profile.txt” again,it shows me another question


and i run the code “metaphlan SRS014476-Supragingival_plaque.fasta.gz --input_type fasta -o SRS014476-Supragingival_plaque_profile.txt” again,it shows me another question

It seems that the building process has not finished.
Can you run
bowtie2-build mpa_v296_CHOCOPhlAn_201901.fna mpa_v296_CHOCOPhlAn_201901
inside /home/ftz/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan_databases ?

I have soloved my problem under your suggestion.
Thank you very much for your help!!!

Hi Francesco

I used MetaPhlAn version 2.96.1 on 20th of March 2020. I’m rerunning it now using the same installation and get the same error message as the user tongs_fu posted 27 Apr. Is this error message still due to the same issue that you are updating the bioconda package to reflect changes made in the repository?

Thanks

My error message was:

Downloading https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest

Warning: Unable to download https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest
Traceback (most recent call last):
File “/scratch/project_2001318/metaphlan2/bioconda2_env/metaphlan2/bin/metaphlan2.py”, line 1442, in
metaphlan2()
File “/scratch/project_2001318/metaphlan2/bioconda2_env/metaphlan2/bin/metaphlan2.py”, line 1164, in metaphlan2
pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])
File “/scratch/project_2001318/metaphlan2/bioconda2_env/metaphlan2/bin/metaphlan2.py”, line 570, in check_and_install_database
index = resolve_latest_database(bowtie2_db, force_redownload_latest)
File “/scratch/project_2001318/metaphlan2/bioconda2_env/metaphlan2/bin/metaphlan2.py”, line 549, in resolve_latest_database
with open(os.path.join(bowtie2_db,‘mpa_latest’)) as mpa_latest:
FileNotFoundError: [Errno 2] No such file or directory: ‘/scratch/project_2001318/metaphlan2/bioconda2_env/metaphlan2/bin/metaphlan_databases/mpa_latest’

Yes, that’s right. Version 2.96.1 is now called 3.0, you should update to the latest version

hello,i installed metaphlan4.8 with conda in linux on 1st July , 2020. i met the same question with you . how do you deal with the error? Could you share your solution of the error?
Thank you !
Looking forward to your reply

hello,i have not understanded your slution you provided? Could you please instruct me again ? i met the same error. Thanks and looking forward to your reply.

(base) [students@Nebula metaphlan2_analysis]$ metaphlan2.py SRS014476-Supragingival_plaque.fasta.gz --input_type fasta > SRS014476-Supragingival_plaque_profile.txt

Downloading https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest

Warning: Unable to download https://bitbucket.org/biobakery/metaphlan2/downloads/mpa_latest
Traceback (most recent call last):
File “/public/home/students/miniconda3/bin/metaphlan2.py”, line 1442, in
metaphlan2()
File “/public/home/students/miniconda3/bin/metaphlan2.py”, line 1164, in metaphlan2
pars[‘index’] = check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘force_download’])
File “/public/home/students/miniconda3/bin/metaphlan2.py”, line 570, in check_and_install_database
index = resolve_latest_database(bowtie2_db, force_redownload_latest)
File “/public/home/students/miniconda3/bin/metaphlan2.py”, line 549, in resolve_latest_database
with open(os.path.join(bowtie2_db,‘mpa_latest’)) as mpa_latest:
FileNotFoundError: [Errno 2] No such file or directory: ‘/public/home/students/miniconda3/bin/metaphlan_databases/mpa_latest’

Hi, you are installing an older MetaPhlAn build. In order to use the most recent and working one, you should configure first the conda installation, if it was not already done:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

then,
create a new one with python 3.7: conda create -n metaphlan-3.0 python=3.7
install MetaPhlAn 3 in the new environment: conda activate metaphlan-3.0 && conda install -c bioconda metaphlan

Thanks for your reply . I performed commands you instructed. But I have a new question , i do not find the tutorial of Metaphlan3 . I am a newbie . I have using the tutorial of Metaphlan2 , but it reported an error . Thanks ! Looking forward your reply.

(metaphlan-3.0) [students@Nebula metaphlan2_analysis]$ metaphlan3.py SRS014459-Stool.fasta.gz --input_type fasta --nproc 4 > SRS014459-Stool_profile.txt
-bash: metaphlan3.py: command not found

it seem to that

The tutorial is linked in the repo README at this link https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-3.0

Hi . I am sorry to trouble you . i have downloaded the metaphlan database . So what commands should i perform next ? thanks evry much .

It seems you are not able to download files from Dropbox. Are you able to access to the Dropbox website?

yeah , i am not available to the Dropbox . I copied the metaphlan_database from orthers . So i have no idea to run .

If you have all the required files, you can run using -x mpa_v30_CHOCOPhlAn_201901 --bowtie2db <folder where the db is stored>

Hi, where can we download the databases for Metaphlan2? They do not come with the github repository.