MetaPhlAn 4.2.2 --profile_vsc

MetaPhlAn version 4.2.2 (4 Jun 2025)
Had to manually change the column name from MV_group to M-Group/Cluster in mpa_vJan25_CHOCOPhlAnSGB_202503_VINFO.csv to make --profile_vsc work.
Can you please double check if this is the right modification? if yes, should be a simple fix on developer end.

Detailed error messages seen below:

File “/home/users/.conda/envs/mpa/bin/metaphlan”, line 10, in
sys.exit(main())
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/metaphlan/metaphlan.py”, line 2263, in main
metaphlan_runner.run_metaphlan()
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/metaphlan/metaphlan.py”, line 1911, in run_metaphlan
self.vsc_controller.run_analysis(self.total_metagenome)
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/metaphlan/metaphlan.py”, line 566, in run_analysis
self.vsc_parsing(rpkm=True, total_metagenome=total_metagenome)
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/metaphlan/metaphlan.py”, line 417, in vsc_parsing
self.create_vsc_report(VSC_report)
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/metaphlan/metaphlan.py”, line 428, in create_vsc_report
vsc_out_df = vsc_out_df.merge(vsc_info_df, on=‘M-Group/Cluster’).sort_values(by=‘breadth_of_coverage’, ascending=False).set_index(‘M-Group/Cluster’)
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/pandas/core/frame.py”, line 10839, in merge
return merge(
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/pandas/core/reshape/merge.py”, line 170, in merge
op = _MergeOperation(
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/pandas/core/reshape/merge.py”, line 794, in init
) = self._get_merge_keys()
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/pandas/core/reshape/merge.py”, line 1297, in _get_merge_keys
right_keys.append(right._get_label_or_level_values(rk))
File “/home/users/.conda/envs/mpa/lib/python3.10/site-packages/pandas/core/generic.py”, line 1911, in _get_label_or_level_values
raise KeyError(key)
KeyError: ‘M-Group/Cluster’

Hi @CherryChengchenLi
You’re correct, we should fix the VINFO table on the ftp. Thanks for spotting this.
EDIT: we updated the tar file

1 Like

I also noticed there was a similar issue in the merge_vsc_tables.py utility script to merge VSC tables, I pushed the fix on GitHub, in case it is needed one can directly download the file from there.

1 Like