How to silence database download message from Metaphlan 4.0.6 within Humann 3.8

Hello Biobakery team!

In short, i am unable to use metaphlan4.0.6/humann3.8 because I cannot get metaphlan to silence this interactive message:

Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_latest
Downloading file of size: 0.00 MB
A newer version of the database (mpa_vJan25_CHOCOPhlAnSGB_202503) is available. Do you want to download it and replace the current one (mpa_vOct22_CHOCOPhlAnSGB_202212)?	[Y/N] 

I have successfully ran many samples with this conda environment/program version pair before, and am attempting to on new samples to add to my existing dataset, therefore do not want to change any versions of databases or programs. However I cannot run this on our HPCs slurm queue because metaphlan continually throws this interactive message, even though i am specifying my bowtie2 database location. this happens in metaphlan inside and outside of humann. Of note, I did open an interactive node on our HPC and ran metaphlan outside of humann, specifying N on the download question, and allowed it to complete. After a successful run, it still prompted me to download the database when i tried to run a different sample.

The command im running:

humann --input ./raw/${PREFIX}.fq.gz \
       --output ./humann/${PREFIX} \
       -v --memory-use maximum --threads 48 \
       --metaphlan-options "--bowtie2db /home/hhallow1/shared_databases/metaphlan/" \
       --remove-temp-output

any help on getting this message permanently silenced would be appreciated! Thanks!

Conda environment:

# packages in environment at /home/hhallow1/.conda/envs/biobakery:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bcbio-gff                 0.7.0              pyh7cba7a3_1    bioconda
biom-format               2.1.12           py37hda87dfa_1    conda-forge
biopython                 1.79             py37h540881e_2    conda-forge
blast                     2.15.0          pl5321h6f7f691_1    bioconda
bottleneck                1.3.5            py37hda87dfa_0    conda-forge
bowtie2                   2.5.1            py37hb24965f_1    bioconda
brotli                    1.1.0                hd590300_1    conda-forge
brotli-bin                1.1.0                hd590300_1    conda-forge
brotli-python             1.0.9            py37hd23a5d3_7    conda-forge
bx-python                 0.9.0            py37hfa8f21c_1    bioconda
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.25.0               hd590300_0    conda-forge
ca-certificates           2024.2.2             hbcca054_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
capnproto                 0.10.2               h6239696_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.3            py37h89c1867_0    conda-forge
cmseq                     1.0.4              pyhb7b1952_0    bioconda
curl                      7.87.0               h6312ad2_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
dendropy                  4.6.1              pyhdfd78af_0    bioconda
diamond                   2.1.8                h43eeafb_0    bioconda
entrez-direct             16.2                 he881be0_1    bioconda
fasttree                  2.1.11               h031d066_2    bioconda
fonttools                 4.38.0           py37h540881e_0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
future                    0.18.2           py37h89c1867_5    conda-forge
gawk                      5.3.0                ha916aea_0    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
glpk                      5.0                  h445213a_0    conda-forge
gmp                       6.3.0                h59595ed_0    conda-forge
gsl                       2.7                  he838d99_0    conda-forge
h5py                      3.7.0           nompi_py37hf1ce037_101    conda-forge
hdf5                      1.12.2          nompi_h2386368_101    conda-forge
htslib                    1.17                 h6bc39ce_1    bioconda
humann                    3.8                pyh7cba7a3_0    bioconda
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.4           py37h89c1867_0    conda-forge
iqtree                    2.2.6                h21ec9f0_0    bioconda
jpeg                      9e                   h0b41bf4_3    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.4            py37h7cecad7_0    conda-forge
krb5                      1.20.1               hf9c8cef_0    conda-forge
lcms2                     2.14                 h6ed2654_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libblas                   3.9.0           20_linux64_openblas    conda-forge
libbrotlicommon           1.1.0                hd590300_1    conda-forge
libbrotlidec              1.1.0                hd590300_1    conda-forge
libbrotlienc              1.1.0                hd590300_1    conda-forge
libcblas                  3.9.0           20_linux64_openblas    conda-forge
libcurl                   7.87.0               h6312ad2_0    conda-forge
libdeflate                1.13                 h166bdaf_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libhwloc                  2.9.3           default_h554bfaf_1009    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libidn2                   2.3.4                h166bdaf_0    conda-forge
liblapack                 3.9.0           20_linux64_openblas    conda-forge
libnghttp2                1.51.0               hdcd2b5c_0    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libopenblas               0.3.25          pthreads_h413a1c8_0    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libssh2                   1.10.0               haa6b8db_3    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libtiff                   4.4.0                h0e0dad5_3    conda-forge
libunistring              0.9.10               h7f98852_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxml2                   2.11.6               h232c23b_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mafft                     7.520                h031d066_3    bioconda
mash                      2.3                  hd3113c8_6    bioconda
matplotlib-base           3.5.3            py37hf395dca_2    conda-forge
metaphlan                 4.0.6              pyhca03a8a_0    bioconda
mpfr                      4.2.1                h9458935_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
muscle                    5.1                  h4ac6f70_3    bioconda
ncbi-vdb                  3.0.10               hdbdd923_0    bioconda
ncurses                   6.4                  h59595ed_2    conda-forge
nomkl                     1.0                  h5ca1d4c_0    conda-forge
numexpr                   2.8.3           py37h85a3170_100    conda-forge
numpy                     1.21.6           py37h976b520_0    conda-forge
openjpeg                  2.5.0                h7d73246_1    conda-forge
openssl                   1.1.1w               hd590300_0    conda-forge
ossuuid                   1.6.2             hf484d3e_1000    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pandas                    1.3.5            py37h8c16a72_0
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
perl                      5.22.2.1                      0    conda-forge
perl-archive-tar          2.18                          1    bioconda
perl-common-sense         3.74                          0    bioconda
perl-exporter-tiny        0.042                         1    bioconda
perl-json                 2.90                          1    bioconda
perl-json-xs              2.34                          0    bioconda
perl-list-moreutils       0.413                         1    bioconda
perl-threaded             5.32.1               hdfd78af_1    bioconda
perl-uri                  1.71                          0    bioconda
perl-xml-libxml           2.0124                        0    bioconda
perl-xml-namespacesupport 1.11                          0    bioconda
perl-xml-sax              0.99                          0    bioconda
perl-xml-sax-base         1.08                          0    bioconda
phylophlan                3.0.3              pyhdfd78af_0    bioconda
pillow                    9.2.0            py37h850a105_2    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pysam                     0.21.0           py37hee149a5_0    bioconda
pysocks                   1.7.1            py37h89c1867_5    conda-forge
python                    3.7.12          hb7a2778_100_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-lzo                1.14             py37hd06c622_1    conda-forge
python_abi                3.7                     4_cp37m    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
raxml                     8.2.13               h031d066_0    bioconda
readline                  8.2                  h8228510_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
samtools                  1.18                 hd87286a_0    bioconda
scipy                     1.7.3            py37hf2a6cf1_0    conda-forge
seaborn                   0.12.2               hd8ed1ab_0    conda-forge
seaborn-base              0.12.2             pyhd8ed1ab_0    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.44.2               h2c6b66d_0    conda-forge
statsmodels               0.13.2           py37hda87dfa_0    conda-forge
tbb                       2021.11.0            h00ab1b0_0    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
trimal                    1.4.1                h4ac6f70_8    bioconda
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
unicodedata2              14.0.0           py37h540881e_1    conda-forge
urllib3                   2.1.0              pyhd8ed1ab_0    conda-forge
wget                      1.20.3               ha56f1ee_1    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zipp                      3.15.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

conda info:

     active environment : biobakery
    active env location : /home/hhallow1/.conda/envs/biobakery
            shell level : 1
       user config file : /home/hhallow1/.condarc
 populated config files : /home/hhallow1/.condarc
          conda version : 4.8.3
    conda-build version : 3.18.11
         python version : 3.8.3.final.0
       virtual packages : __glibc=2.28
       base environment : /data/apps/linux-centos8-cascadelake/gcc-9.3.0/anaconda3-2020.07-i7qavhiohb2uwqs4eqjeefzx3kp5jqdu  (read only)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/biobakery/linux-64
                          https://conda.anaconda.org/biobakery/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /data/apps/linux-centos8-cascadelake/gcc-9.3.0/anaconda3-2020.07-i7qavhiohb2uwqs4eqjeefzx3kp5jqdu/pkgs
                          /home/hhallow1/.conda/pkgs
       envs directories : /home/hhallow1/.conda/envs
                          /data/apps/linux-centos8-cascadelake/gcc-9.3.0/anaconda3-2020.07-i7qavhiohb2uwqs4eqjeefzx3kp5jqdu/envs
               platform : linux-64
             user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/4.18.0-477.21.1.el8_8.x86_64 rocky/8.8 glibc/2.28
                UID:GID : 2072:1272
             netrc file : None
           offline mode : False

Hi,

I think there might be an --offline flag in Metaphlan, maybe worth a try to add this to the --metaphlan-options?

From metaphlan --help:
–offline If used, MetaPhlAn will not check for new database updates.

Best, Barbara

Confirmed on this - if you’re manually setting MetaPhlAn options and don’t include the --offline option, it will look for and attempt to download an updated database.

yes –offline is working for humann metaphlan4 options! thanks!

Can you please share how you formatted your code? I tried to include –metaphlan-options –offline, but this was not working for my code…(see here). Thank you so much!