[Errno 21] Is a directory" during .nwk download & "database partially present" warning

Hello bioBakery Community,

I’m encountering a persistent issue while running MetaPhlAn and would be grateful for any help.

I have already downloaded all the necessary database files for mpa_vJan25_CHOCOPhlAnSGB_202503 into my db_dir. However, when I run MetaPhlAn, it reports the database is “partially present” and attempts to re-download the files, ultimately failing with an [Errno 21] Is a directory error when it tries to get the .nwk file.


Command

Here is the exact command I’m using:

Bash

metaphlan /mnt/d/leopardWGS/host_removed_alignment_results/02_M1_10K_combined.fastq.gz \
–input_type fastq \
–db_dir /mnt/d/humann_databases/chocophlan \
-x mpa_vJan25_CHOCOPhlAnSGB_202503 \
–mapout /mnt/d/leopardWGS/humann_output_M1_10K/metaphlan_bowtie2.bz2 \
–nproc 6 \
-o /mnt/d/leopardWGS/humann_output_M1_10K/taxonomic_profile.txt


The Problem & Key Errors

  1. “Partially Present” Warning: The process starts with this message, even though I believe all files are in the directory.

    MetaPhlAn database not present or partially present in /mnt/d/humann_databases/chocophlan.

  2. [Errno 21] Failure: The script successfully verifies the existing .tar archives but fails specifically when trying to download the Newick tree file (.nwk).

    Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan25_CHOCOPhlAnSGB_202503.nwk [Error] EnvironmentError “[Errno 21] Is a directory: ‘/mnt/d/humann_databases/chocophlan’” Unable to download http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan25_CHOCOPhlAnSGB_202503.nwk

It seems the download utility is incorrectly trying to write the file as the directory /mnt/d/humann_databases/chocophlan instead of saving it inside that directory.

My Questions

  1. Why would MetaPhlAn consider the database “partially present” if I have already downloaded all the component files into the db_dir? What specific files does it check for completeness?

  2. What could be causing the [Errno 21] Is a directory error, and why does it only happen for the .nwk file?

  3. I have manually placed the .nwk file in the directory, but the script still tries to re-download it. Why isn’t the local file being recognized?

I’ve attached the full log below for context. Any advice on how to resolve this would be greatly appreciated!

Thank you.

Full Log Output

Wed Aug 20 23:03:24 2025: MetaPhlAn database not present or partially present in /mnt/d/humann_databases/chocophlan.
Downloading database
Please note due to the size this might take a few minutes.
Wed Aug 20 23:03:24 2025: Downloading and uncompressing bowtie2 indexes
Wed Aug 20 23:03:24 2025: [Warning] File /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_bt2.tar already present!
Wed Aug 20 23:03:24 2025: [Warning] File /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_bt2.md5 already present!
Wed Aug 20 23:03:24 2025: Checking md5 of /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_bt2.md5
Wed Aug 20 23:03:24 2025: Checking md5 of /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_bt2.tar
Wed Aug 20 23:39:04 2025: Downloading and uncompressing additional files
Wed Aug 20 23:39:04 2025: [Warning] File /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503.tar already present!
Wed Aug 20 23:39:04 2025: [Warning] File /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503.md5 already present!
Wed Aug 20 23:39:04 2025: Checking md5 of /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503.md5
Wed Aug 20 23:39:04 2025: Checking md5 of /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503.tar
Wed Aug 20 23:43:56 2025: Downloading http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan25_CHOCOPhlAnSGB_202503.nwk
Wed Aug 20 23:43:58 2025: [Error] EnvironmentError “[Errno 21] Is a directory: ‘/mnt/d/humann_databases/chocophlan’”
Unable to download http://cmprod1.cibio.unitn.it/biobakery4/metaphlan_databases/mpa_vJan25_CHOCOPhlAnSGB_202503.nwk
Wed Aug 20 23:43:58 2025: Decompressing /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_SGB.fna.bz2 into /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_SGB.fna
Wed Aug 20 23:58:12 2025: Decompressing /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_VSG.fna.bz2 into /mnt/d/humann_databases/chocophlan/mpa_vJan25_CHOCOPhlAnSGB_202503_VSG.fna
Wed Aug 20 23:58:51 2025: Joining FASTA databases