# HUMAnN v3 joint taxonomic profile

**URL:** <https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480>\
**Category:** HUMAnN\
**Created:** [May 15, 2020, 2:49pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480 "2020-05-15T14:49:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![thad](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@thad](https://forum.biobakery.org/u/thad)\
**Post date:** [May 15, 2020, 2:49pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/1 "2020-05-15T14:49:13Z")

</div>

There is a problem with the output format of humann\_reduce\_table. To reproduce,

$ metaphlan --version; humann --version  
MetaPhlAn version 3.0 (20 Mar 2020)  
humann v3.0.0.alpha.1

$ metaphlan --input\_type fasta -t rel\_ab --nproc 12 SRS014459-Stool.fasta.gz profiled\_metagenome.tsv

$ humann\_join\_tables -i . --file\_name profiled\_metagenome.tsv -o joined\_profiled\_metagenome.tsv

$ humann\_reduce\_table -i joined\_profiled\_metagenome.tsv -o max\_profiled\_metagenome.tsv --function max --sort-by level

$ humann --input SRS014459-Stool.fasta.gz --output test.out --taxonomic-profile max\_profiled\_metagenome.tsv

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

MetaPhlAn 3.0 output has an additional field, “additional\_species”, so append tab to each line of max profile.

sed -i 's//\t/’ max\_profiled\_metagenome.tsv

$ humann --input SRS014459-Stool.fasta.gz --output test.out --taxonomic-profile max\_profiled\_metagenome.tsv

ERROR: The MetaPhlAn2 taxonomic profile provided was not generated with the database version v30 . Please update your version of MetaPhlAn2 to v3.0.

Prepend first line of profiled\_metagenome.tsv to max\_profiled\_metagenome.tsv  
#mpa\_v30\_CHOCOPhlAn\_201901

Now it works!

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [May 15, 2020, 5:09pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/2 "2020-05-15T17:09:12Z")

</div>

Thanks for pointing this out - we built in the database version check to the main software now that there are multiple versions floating around, but these changes have not necessarily made it into the suite of utility scripts yet. Assuming your MetaPhlAn profiles _were_ generated on v30 then this is a good short-term hack. 🙂

---

<div class="post-metadata">

**Author:** ![beeswaxag](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@beeswaxag](https://forum.biobakery.org/u/beeswaxag)\
**Post date:** [February 1, 2021, 2:55am UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/3 "2021-02-01T02:55:16Z")

</div>

This is so helpful comment for me!  
I had same error  
“ERROR: The MetaPhlAn2 taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn2 to v3.0.”  
during making custom pipeline with KEGG DB.  
I fixed it with same method as you tried. (adding tab and 1st line in taxonomic profile document)  
I think ‘custom taxonomic profile’ section in manual of Humann3 should be updated.  
Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![Max\_Ortiz](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/max_ortiz/32/1275_2.png) [@Max\_Ortiz](https://forum.biobakery.org/u/Max_Ortiz)\
**Post date:** [February 26, 2022, 10:47pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/4 "2022-02-26T22:47:59Z")

</div>

I’m having a similar issue, but I couldn’t fix it yet.  
$ metaphlan --version; humann --version  
MetaPhlAn version 3.0.13 (27 Jul 2021)  
humann v3.0.0

The script “humann\_join\_tables” is working properly to join my gene tables but it’s failing to merge the “metaphlan\_bugs\_list.tsv” to create a joint taxonomic profile for multiple samples as suggested in the user manual.

$ humann\_join\_tables -i ./tax\_profile/ -o joint.tsv  
Traceback (most recent call last):  
File “/home/eortiz/miniconda3/bin/humann\_join\_tables”, line 10, in   
sys.exit(main())  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/join\_tables.py”, line 238, in main  
join\_gene\_tables(gene\_tables,args.output,verbose=args.verbose)  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/join\_tables.py”, line 98, in join\_gene\_tables  
sorted\_gene\_list=util.fsort(list(gene\_table\_data))  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 403, in fsort  
features = sorted( features, key=lambda f: c\_topsort.get( fsplit( f )[0], default ) )  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 403, in   
features = sorted( features, key=lambda f: c\_topsort.get( fsplit( f )[0], default ) )  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 377, in fsplit  
sys.exit( “LETHAL ERROR: bad feature name: {}”.format( f ) )  
NameError: name ‘f’ is not defined

I’m working in a cluster, so I installed humann3 in my Ubuntu box and I’m getting the same error.

As an alternative, I merged all the taxonomic profiles in metaphlan3 with the “merge\_metaphlan\_tables.py” and got the `max_taxonomic_profile.tsv` with the `humann_reduce_table` script in humann3.

The `max_taxonomic_profile.tsv` looks like this:  
#mpa\_v30\_CHOCOPhlAn\_201901 max  
clade\_name 0  
k\_\_Archaea 2157.0  
k\_\_Bacteria 100.0  
k\_\_Eukaryota 2759.0  
k\_\_Archaea|p\_\_Candidatus\_Bathyarchaeota 0.36522  
k\_\_Archaea|p\_\_Candidatus\_Heimdallarchaeota 16.78566  
k\_\_Archaea|p\_\_Candidatus\_Marsarchaeota 13.69396  
…

When I try to use this file with the --taxonomic-profile flag, I’m getting the following error:  
“ERROR: The MetaPhlAn2 taxonomic profile provided was not generated with the expected database version. Please update your version of MetaPhlAn2 to v3.0.”

So, I have 2 questions:

1. Could you please let me know if I’m missing something when I try to merge the tax profiles (bugs.tsv) with the humann\_join\_tables script?

2. Where I can check the proper format for the ‘max\_taxonomic\_profile.tsv’? Since I have no idea what this table should look, not sure what is the right format. I tried the suggestions posted above but I’m still getting the same error. (The MetaPhlAn2 taxonomic profile provided was not generated with the expected database).

Any help is really welcome.

---

<div class="post-metadata">

**Author:** ![Max\_Ortiz](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/max_ortiz/32/1275_2.png) [@Max\_Ortiz](https://forum.biobakery.org/u/Max_Ortiz)\
**Post date:** [March 7, 2022, 6:18pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/5 "2022-03-07T18:18:49Z")

</div>

My apologies for the insistence, but I’m still getting the same error after trying a lot of different things. Any suggestion/help is really welcome.

The script “humann\_join\_tables” is working properly to join my gene tables but it’s failing to merge the “metaphlan\_bugs\_list.tsv” to create a joint taxonomic profile for multiple samples as suggested in the user manual.

$ humann\_join\_tables -i ./tax\_profile/ -o joint.tsv  
Traceback (most recent call last):  
File “/home/eortiz/miniconda3/bin/humann\_join\_tables”, line 10, in  
sys.exit(main())  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/join\_tables.py”, line 238, in main  
join\_gene\_tables(gene\_tables,args.output,verbose=args.verbose)  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/join\_tables.py”, line 98, in join\_gene\_tables  
sorted\_gene\_list=util.fsort(list(gene\_table\_data))  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 403, in fsort  
features = sorted( features, key=lambda f: c\_topsort.get( fsplit( f )[0], default ) )  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 403, in  
features = sorted( features, key=lambda f: c\_topsort.get( fsplit( f )[0], default ) )  
File “/home/eortiz/miniconda3/lib/python3.8/site-packages/humann/tools/util.py”, line 377, in fsplit  
sys.exit( “LETHAL ERROR: bad feature name: {}”.format( f ) )  
NameError: name ‘f’ is not defined

---

<div class="post-metadata">

**Author:** ![strainliu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/strainliu/32/1745_2.png) [@strainliu](https://forum.biobakery.org/u/strainliu)\
**Post date:** [June 23, 2023, 1:01pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/6 "2023-06-23T13:01:47Z")

</div>

Hi Max, did you solve the problem you met?

I am actually faced with the same error like yours

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [June 23, 2023, 5:47pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/7 "2023-06-23T17:47:22Z")

</div>

There is a separate script bundled with MetaPhlAn for merging taxonomic profiles. The two scripts are looking for different properties of their respective parent methods’ output files. Sorry for the confusion!

---

<div class="post-metadata">

**Author:** ![strainliu](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/strainliu/32/1745_2.png) [@strainliu](https://forum.biobakery.org/u/strainliu)\
**Post date:** [June 25, 2023, 11:14pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/8 "2023-06-25T23:14:23Z")

</div>

Hi Eric, I used the MetaPhlAn to merge taxonomic profiles and then used humann3 to make the max\_taxonomic\_profile.

Thanks

Jun

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [July 7, 2023, 6:30pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/9 "2023-07-07T18:30:51Z")

</div>

Confirmed - glad that worked!

---

<div class="post-metadata">

**Author:** ![sarpiens](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/sarpiens/32/2621_2.png) [@sarpiens](https://forum.biobakery.org/u/sarpiens)\
**Post date:** [December 30, 2023, 11:10pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/10 "2023-12-30T23:10:25Z")

</div>

Hi! I found this other related post ([Is Humann3 comparable with Metaphlan4.0.6? - #6 by strainliu](https://forum.biobakery.org/t/is-humann3-comparable-with-metaphlan4-0-6/5464/6)) where you say that as max\_taxonomic\_profile is not widely used it has not been updated. In the post they refer to humann3.7 and metaphlan4.0.6 compatibility, I wonder if this has been updated for humann3.8? From what I’ve been seeing the biggest bottleneck is usually the indexing of the database with bowtie2 build, so this option is very interesting when I have a lot of samples to process.

On the other hand, I wanted to ask whether this option could be dangerous. For example, a decrease in the precision of the results stratified by species, i.e. if there is a higher risk of false positives (detecting species that are not in the sample) if the index is used based on the whole dataset instead of each of the samples?

Thanks in advance. Sam

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [January 12, 2024, 10:09pm UTC](https://forum.biobakery.org/t/humann-v3-joint-taxonomic-profile/480/11 "2024-01-12T22:09:13Z")

</div>

I don’t believe we’ve prioritized any updates to this approach as it isn’t widely used (by us at least). And indeed - I agree with your concern that including pangenomes in a database that are not believed to be represented in a particular sample increases the risk of false positive mapping as well as decreasing per-sample computational efficiency. The HUMAnN philosophy is that it is better to start with a sample-specific database specifically because it helps to avoid these issues.
