The merge_metaphlan_tables.py script doesnt work if when metaphlan output has been converted using the sgb_to_gtdb_profile.py utility script. I suspect this is to do with the lower number of headers and columns.
This is what an example of my converted metaphlan output looks like:
#mpa_vJan21_CHOCOPhlAnSGB_202103 #clade_name relative_abundance d__Bacteria 100.00001 d__Bacteria;p__Actinobacteriota 25.292869999999997 d__Bacteria;p__Proteobacteria 12.73789 d__Bacteria;p__Firmicutes_A 38.49073 d__Bacteria;p__Bacteroidota 18.188679999999998 d__Bacteria;p__Firmicutes 4.95885 d__Bacteria;p__Firmicutes_C 0.28645 d__Bacteria;p__Firmicutes_B 0.04454
The error code in the merged output is:
merge_metaphlan_tables: wrong header format for “13-6929606_metaphlan_gtdb.txt”, please check your profiles.
Any ideas on how to fix this?