Error message returned from metaphlan when running humann3

Hello,

I am receiving an error message when I try to run the humann pipeline on the demo inputs provided in the biobakery tutorial.

I downloaded Metaphlan3, Humann3 and the relevant reference databases using:

conda create -n metaphlan-3.0 python=3.7
conda install metaphlan=3.0.1
pip install humann --user
humann_databases --download chocophlan full db/metaphlan_databases/
humann_databases --download uniref uniref90_diamond db/metaphlan_databases/

I ran the following command using the humann executable:

humann --input demo.fastq.gz --output demo_fastq

Then, I receive the following error message:

Error message returned from metaphlan :

Downloading 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
Traceback (most recent call last):
  File "/home/noyes046/dean0358/.conda/envs/metaphlan-3.0/bin/metaphlan", line 10, in <module>
    sys.exit(main())
  File "/home/noyes046/dean0358/.conda/envs/metaphlan-3.0/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 916, in main
    pars['index'] = check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'], pars['force_download'])
  File "/home/noyes046/dean0358/.conda/envs/metaphlan-3.0/lib/python3.7/site-packages/metaphlan/__init__.py", line 269, 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

It looks like it is trying and failing to download one of the reference databases from Dropxbox, but I already have it installed. Is there a command-line option I can use to point humann to? Any help would be appreciated.

Thanks!
Chris

Can confirm with same issue:

conda create -n humann-3.6

conda install -c bioconda metaphlan
pip install humann --no-binary :all:

humann_test (passes)

humann_databases --download chocophlan full humann_dbs
humann_databases --download uniref uniref90_diamond humann_dbs
humann_databases --download utility_mapping full humann_dbs

humann --input sample.fastq.gz --output demo --threads 20


Creating output directory: [redacted]/humann3/sample_test
Output files will be written to: [redacted]/humann3/sample_test
Decompressing gzipped file ...

Removing spaces from identifiers in input file ...


Running metaphlan ........

CRITICAL ERROR: Error executing: /data/programs/miniconda3/envs/humann-3.6/bin/metaphlan [redacted]/humann3/sample_test/sample_humann_temp/tmpkxi_uy5s/tmpzq9zrkqs -t rel_ab -o [redacted]/humann3/sample_test/sample_humann_temp/sample_metaphlan_bugs_list.tsv --input_type fastq --bowtie2out [redacted]/humann3/sample_test/sample_temp/sample_metaphlan_bowtie2.txt --nproc 20

Error message returned from metaphlan :

Downloading 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
Traceback (most recent call last):
  File "/data/programs/miniconda3/envs/humann-3.6/bin/metaphlan", line 10, in <module>
    sys.exit(main())
  File "/data/programs/miniconda3/envs/humann-3.6/lib/python3.6/site-packages/metaphlan/metaphlan.py", line 1187, in main
    pars['index'] = check_and_install_database(pars['index'], pars['bowtie2db'], pars['bowtie2_build'], pars['nproc'], pars['force_download'])
  File "/data/programs/miniconda3/envs/humann-3.6/lib/python3.6/site-packages/metaphlan/metaphlan.py", line 589, 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

This looks like a MetaPhlAn error. I’ll go ahead and move the thread to that channel, although you might want to check if it’s already been solved there. When diagnosing MetaPhlAn issues arising in HUMAnN calls it can be handy to try running the MetaPhlAn command outside of HUMAnN first to make sure you see the same error.

Hi @Collin_Kessler and @cdeanj
The Dropbox download of the database has been deprecated and thus older versions of the MetaPhlAn 3 tool are not able to download the database. I suggest you to upgrade to the latest version available (3.0.14) or manually download the database from the following link Index of /biobakery3/metaphlan_databases

Thanks both! Looks like updating to MetaPhlan4 fixed the issue.