Result of phylophlan_assign_sgbs resulting in error in phylophlan_draw_metagenomic?

Dear all,
I’m trying to follow the Phylophlan tutorials with my own data and I ran into a problem while trying to use the phylophlan_draw_metagenomic function.
phylophlan_assign_sgbs.py version 3.1.40 (6 March 2024)
phylophlan_draw_metagenomic.py version 3.1.7 (6 March 2024)

My error message is:

Traceback (most recent call last):
  File "/home/debian/miniforge3/envs/phylophlan/bin/phylophlan_draw_metagenomic", line 10, in <module>
    sys.exit(phylophlan_draw_metagenomic())
  File "/home/debian/miniforge3/envs/phylophlan/lib/python3.9/site-packages/phylophlan/phylophlan_draw_metagenomic.py", line 197, in phylophlan_draw_metagenomic
    map_dict = bin2met(args, args.separator)
  File "/home/debian/miniforge3/envs/phylophlan/lib/python3.9/site-packages/phylophlan/phylophlan_draw_metagenomic.py", line 147, in bin2met
    return dict([(r.strip().split(sep)[0], r.strip().split(sep)[1]) for r in open(args.map)])
  File "/home/debian/miniforge3/envs/phylophlan/lib/python3.9/site-packages/phylophlan/phylophlan_draw_metagenomic.py", line 147, in <listcomp>
    return dict([(r.strip().split(sep)[0], r.strip().split(sep)[1]) for r in open(args.map)])
IndexError: list index out of range

I therefore compared the .tsv input I got from phylophlan_assign_sgbs with my mapping file. The mapping file I created using all bins that went into phylophlan_assign_sgbs. Upon closer inpection of the .tsv output, I found some bins, that did not get assigned, but got these notes:

  • BinX is close to an SGB not present in the SGB.Jun23 database
  • BinY is not close to any SGB present in the SGB.Jun23 database

I found as a previous answer in the forum the following:

  1. […] is close […]: your MAG (bin.12.orig, for example) is close to an SGB that, however, did not meet the requirements to end up in the MetaPhlAn database, likely meaning is an SGB with too few MAGs (in that specific database version, Jun23 in your case).
  2. […] is not close […]: your MAG (bin.8.strict, for example) is not close to the SGBs as in that database (Jun23 in your case), so can likely define a new SGB cluster if added to our SGB resource.

My questions are:

  • Could my error result from these lines?
  • How should I deal with that? I found in a paper that from the rest, the new SGBs were defined by applying a hierarchical clustering? Is there any tool, maybe already in phylophlan that I could use for both of ther cases?

Thank you in advance for your help!