Python script to quickly extract promoter and terminator regions with the NCBI API. Search for the presence of individual pattern or transcription factor responsive elements with manual sequence (IUPAC) or JASPAR API.
Describe the bug
Wrong Gene ID leads to an error and not a warning
To Reproduce
Steps to reproduce the behavior:
Add an ID invalid (4847)
Extract promoter or terminator
See error
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/tfinder/TFinder-v1.py", line 108, in <module>
allapp_page()
File "/mount/src/tfinder/navigation/allapp.py", line 67, in allapp_page
aio_page()
File "/mount/src/tfinder/navigation/aio.py", line 251, in aio_page
all_slice_forms=True if all_variants else False).find_sequences()
^^^^^^^^^^^^^^^^
File "/mount/src/tfinder/tfinder/__init__.py", line 131, in find_sequences
gene_name, chraccver, chrstart, chrstop, species_API = NCBIdna.get_gene_info(entrez_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/src/tfinder/tfinder/__init__.py", line 222, in get_gene_info
return gene_name, _, _, _, _
^
NameError: name '_' is not defined
Describe the bug Wrong Gene ID leads to an error and not a warning
To Reproduce Steps to reproduce the behavior: