HUMANN3.9 cannot recognize MetaPhlAn 4.2.2 output file

Dear team of Humann/Metaphlan:
During the process of metagenomic data analysis, I encountered several technical challenges. Upon obtaining the raw sequencing data, I initially performed quality control and host sequence removal procedures. I have successfully completed the Metaphlan analysis based on reads and obtained the taxonomic annotation results. Currently, I intend to proceed with HUMAnN analysis for functional profiling. After overcoming multiple obstacles related to nucleic acid and protein databases, I discovered that HUMAnN 3.9 is incompatible with the output files generated by Metaphlan 4.2.2. I have exhausted all potential solutions, including modifying header information and re-downloading Metaphlan 3.v, but to no avail. I would be deeply grateful if your technical team could assist in resolving this compatibility issue. Your expertise in this matter would be highly appreciated.
(Here is my codes:
mkdir -p 05.Annotation/02-humann3
samples=(S{1..2})
for sample in ā€œ${samples[@]}ā€; do
time humann3
–input 01.QC/05-rmhost/${sample}.nonhost.R1.fq
–input 01.QC/05-rmhost/${sample}.nonhost.R2.fq
–output 05.Annotation/02-humann3/${sample}
–threads 20
–taxonomic-profile 05.Annotation/01-metaphlan/${sample}.taxa.profile.txt
done
Output files will be written to: /home/yunpeng/Desktop/Metagenomics/zyp/05.Annotation/02-humann3/S1
Removing spaces from identifiers in input file …

ERROR: The MetaPhlAn taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn to at least v3.0.

**Me: Actually, the results named ā€œ..${sample}.taxa.profile.txtā€ were generated by MetaPhlAn4.2.2(the latest version), but this version have removed ā€œā€“legacy-outputā€(Help to be compatible with MetaPhlAn 3.x), which could not fit with Humann3.9, how can I solve this problem? Thank you very much. It is my first time to come here, I’m not sure if the above questions will receive attention, but I still look forward to someone responding.:slight_smile:
Note: MetaPhlAn version 4.2.2 (4 Jun 2025)
humann v3.9

Hi @YUNPENG
Which database version did you use to run MetaPhlAn? If you used vJun23 you should be able to run HUMAnN 3.9, while if you used vOct22 you can use HUMAnN 4.alpha. The latest database version vJan25 still doesn’t have compatibility with HUMAnN.
Here are more details Humann 4 cant work with metaphlan 4 - #2 by franzosa

1 Like

Hi@Claudia Mengoni!
Goodness! I sincerely appreciate your kind and prompt response. Indeed, I am using the latest version of the database that comes with MetaPhlAn, specifically vJan25. I thought that using the latest version might enable me to discover more useful information. Thank you very much for resolving my confusion. Otherwise, I would have been stuck in unproductive tasks such as searching for errors in the code. May I take the liberty to ask you and your team members if the latest version of the database is currently being debugged and adapted for HuMAnN? If so, could you estimate how long it will take? I am truly looking forward to that day! Once again, thank you so much for your explanation, dear kind - hearted lady. (^ā–½^)

@Claudia_Mengoni ,

Hi, I’m trying to pass a taxonomic profile generated with metaphlan 4.2.2 into humann 3.9. I’ve run metaphlan --install --index mpa_vJun23_CHOCOPhlAnSGB_202403 and then generated the taxonomic profile via <interleaved reads> | metaphlan --input_type fastq --index mpa_vJun23_CHOCOPhlAnSGB_202403 > taxonomic-profile.tsv. I’m then running

humann3 --input myfastq.fastq.gz --taxonomic-profile taxonomic-profile.tsv --output mydir --remove-temp-output --o-log mylogdir --threads 16

I’m still getting an error with the message:

ERROR: The MetaPhlAn taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn to at least v3.0

I’d also noticed at Index of /biobakery4/metaphlan_databases/bowtie2_indexes that there’s mpa_vJun23_CHOCOPhlAnSGB_202403_bt2.tar as well as mpa_vJun23_CHOCOPhlAnSGB_202307_bt2 - I wanted to make sure that this version difference isn’t causing any issues? Or do I need to be specifying any non-default databases in the call to humann?

For debugging, the first lines in the taxonomic-profile.tsv are

#mpa_vJun23_CHOCOPhlAnSGB_202403
#/scratch/conda-envs/8a41c1856db186a278d6518c3602f531_/bin/metaphlan --input_type fastq --index mpa_vJun23_CHOCOPhlAnSGB_202403
#21427424 reads processed

Thanks,
Jake

Any updates with this issue? I seem to be having the same problem.

I am running humann v3.9 after generating the taxonomic profiles from MetaPhlAn version 4.2.2 (#mpa_vJun23_CHOCOPhlAnSGB_202403).

Running the command:

humann -i sample_kneaddata.fastq --taxonomic-profile sample_profile.tsv --nucleotide-database /mnt/lscratch/users/egrant/humann/humann/chocophlan --protein-database /mnt/lscratch/users/egrant/humann/humann/uniref -o sample_output --threads 20 --verbose

I get the following error

ERROR: The MetaPhlAn taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn to at least v3.0.

I was hoping that by specifying the databases in the command and by running MetaPhlAn separately I would move forward but am a bit stuck now on what the exact issue is so would appreciate any leads on how to resolve the incompatibility!

Also having this issue and my posts are being flagged as spam, which is not helping. Is there any solution? I am very confused as to where we download the dbs and which verisons we are supposed to be using. Shouldn’t the conda install solve this uncertainty? Thanks.

Finally got it running together by downgrading metaphlan to version 4.1.1 and running with humann v 3.9 (chocophlan db v201901_v31, uniref v 201901b). I use micromamba for the installation on our HPC. Agree not ideal with all the different versions running around and I will avoid updating anything until the new versions are compatible across metaphlan/humann :sweat_smile:

1 Like

Dear all,

Sorry for the delayed answer, you were correct to be using humann v3.9 with vJun23 but there was a bug that caused some of the lines in the taxonomic profiles (the ones without additional taxonomies) to be shorter when split on tab, causing the checks of the taxonomic profiles in humann to fail. It has been fixed now in the latest commit in MetaPhlAn #5b73b7c
You can use the latest code by downloading directly from GitHub, but we will shortly update the conda environment as well. Thank you for your feedback and sorry for the inconvenience.