The bioBakery help forum

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