# Unable to run --profile\_vsc: UnboundLocalError: local variable 'vsc\_fna' referenced before assignment

**URL:** https://forum.biobakery.org/t/unable-to-run-profile-vsc-unboundlocalerror-local-variable-vsc-fna-referenced-before-assignment/6949
**Category:** MetaPhlAn
**Created:** [April 23, 2024, 1:35am UTC](https://forum.biobakery.org/t/unable-to-run-profile-vsc-unboundlocalerror-local-variable-vsc-fna-referenced-before-assignment/6949 "2024-04-23T01:35:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![LeticiaCT](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/leticiact/32/2777_2.png) [@LeticiaCT](https://forum.biobakery.org/u/LeticiaCT)
#### Post date: [April 23, 2024, 1:35am UTC](https://forum.biobakery.org/t/unable-to-run-profile-vsc-unboundlocalerror-local-variable-vsc-fna-referenced-before-assignment/6949/1 "2024-04-23T01:35:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Claudia\_Mengoni](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/claudia_mengoni/32/2871_2.png) [@Claudia\_Mengoni](https://forum.biobakery.org/u/Claudia_Mengoni)
#### Post date: [April 29, 2024, 8:24am UTC](https://forum.biobakery.org/t/unable-to-run-profile-vsc-unboundlocalerror-local-variable-vsc-fna-referenced-before-assignment/6949/2 "2024-04-29T08:24:21Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![LeticiaCT](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/leticiact/32/2777_2.png) [@LeticiaCT](https://forum.biobakery.org/u/LeticiaCT)
#### Post date: [April 30, 2024, 4:08am UTC](https://forum.biobakery.org/t/unable-to-run-profile-vsc-unboundlocalerror-local-variable-vsc-fna-referenced-before-assignment/6949/3 "2024-04-30T04:08:44Z")

</div>

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
