Unable to run --profile_vsc: UnboundLocalError: local variable 'vsc_fna' referenced before assignment

Hello,

I am using MetaPhlAn version 4.1.1 (11 Mar 2024) together with mpa_vJun23_CHOCOPhlAnSGB_202307 and tried to run the Metaphlan viral module (–profile_vsc) with the following command:

metaphlan
$INPUT/${basename}/${basename}_paired.unmatched.combined.fastq.gz
–bowtie2db $REFERENCES/bowtie2_chochphlan_202307
-x mpa_vJun23_CHOCOPhlAnSGB_202307
–input_type fastq --profile_vsc
–vsc_out $OUTPUT/${basename}/metaphlan/${basename}_virus_table.tsv
–nproc 16

However, I am getting following the error:

Traceback (most recent call last):
File “/home/leticiac/miniconda3/envs/biobakery3/bin/metaphlan”, line 10, in
sys.exit(main())
File “/home/leticiac/miniconda3/envs/biobakery3/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 1242, in main
vsc_fna, vsc_vinfo = set_vsc_parameters(pars[‘index’], pars[‘bowtie2db’])
File “/home/leticiac/miniconda3/envs/biobakery3/lib/python3.7/site-packages/metaphlan/metaphlan.py”, line 397, in set_vsc_parameters
return(vsc_fna, vsc_vinfo)
UnboundLocalError: local variable ‘vsc_fna’ referenced before assignment

I have downloaded my CHOCOPhlAnSGB database with:
metaphlan --install --bowtie2db

And obtained the following files:
mpa_latest
mpa_vJun23_CHOCOPhlAnSGB_202307.3.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.rev.1.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.1.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.4.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.rev.2.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.2.bt2l
mpa_vJun23_CHOCOPhlAnSGB_202307.pkl
mpa_vJun23_CHOCOPhlAnSGB_202307_VINFO.csv

I don’t have any file ending with “_VSG.fna”, which seems to be causing the problem.
Where can I obtain it?

Thank you in advance.

Hi @LeticiaCT,

Could you please try to download the database one more time? Because the *_VSG.fna file is normally downloaded in this step. Also, make sure that the location you specify in the main MetaPhlAn command and install command for the --bowtie2db parameter correspond (i.e. metaphlan --install --bowtie2db $REFERENCES/bowtie2_chochphlan_202307)

Hi Claudia,

Very strangely, I have re-downloaded the database and this time I got the mpa_vJun23_CHOCOPhlAnSGB_202307_VSG.fna file.

Thanks!

Bests,
Leticia