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:
-
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?
-
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.