I am running the following code in order to extract species specific markers for Strainphlan:
extract_markers.py -c s__Haemophilus_parainfluenzae -o $METAPHLAN_4_DIR/db_markers
Here is the output:
Fri Nov 4 18:28:13 2022: Start extract markers execution
Fri Nov 4 18:28:17 2022: Extracting markers from the Bowtie2 database...
Fri Nov 4 18:47:08 2022: Done.
Fri Nov 4 18:47:08 2022: Loading MetaPhlAn mpa_vJan21_CHOCOPhlAnSGB_202103 database...
Fri Nov 4 18:48:00 2022: Done.
[e] No markers were found for the clade "s__Haemophilus_parainfluenzae".
Traceback (most recent call last):
File "/bioware/metaphlan-4.0.2/bin/extract_markers.py", line 33, in <module>
sys.exit(load_entry_point('MetaPhlAn==4.0.2', 'console_scripts', 'extract_markers.py')())
File "/bioware/metaphlan-4.0.2/lib/python3.10/site-packages/metaphlan/utils/extract_markers.py", line 138, in main
extract_markers(args.database, args.clades, args.output_dir)
File "/bioware/metaphlan-4.0.2/lib/python3.10/site-packages/metaphlan/utils/extract_markers.py", line 122, in extract_markers
return output_file
UnboundLocalError: local variable 'output_file' referenced before assignment
As you can see, I am using the mpa_vJan21_CHOCOPhlAnSGB_202103 database. I checked the marker_info text file and there are indeed 200 marker genes for Haemophilus parainfluenzae.
cat mpa_vJan21_CHOCOPhlAnSGB_202103_marker_info.txt | grep "s__Haemophilus_parainfluenzae" | wc -l # 200
Any have any suggestions? I donât know what the is meant by âUnboundLocalError: local variable âoutput_fileâ referenced before assignmentâ in the traceback or why no markers were found for the clade âs__Haemophilus_parainfluenzaeâ.