Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'vertex_counter' is not defined #137

Closed
Kiliankleemann opened this issue Oct 4, 2023 · 6 comments
Closed

NameError: name 'vertex_counter' is not defined #137

Kiliankleemann opened this issue Oct 4, 2023 · 6 comments

Comments

@Kiliankleemann
Copy link

Tried to run TALON with the following command:
mkdir TALON_output
talon --f config.csv
--db hg38.db
--build hg38_rmsk_ucsd
--threads 4
--o TALON_output/

but I got this error:
Traceback (most recent call last):
File "/Users/kiliankleemann/anaconda3/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/site-packages/talon/talon.py", line 2333, in parallel_talon
annotation_info = annotate_read(record, cursor, run_info,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/site-packages/talon/talon.py", line 2514, in annotate_read
annotation_info = identify_monoexon_transcript(chrom, positions, strand,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/site-packages/talon/talon.py", line 1817, in identify_monoexon_transcript
vertex_IDs, v_novelty, diff_5p, diff_3p = match_monoexon_vertices(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/site-packages/talon/talon.py", line 193, in match_monoexon_vertices
vertex_match = create_vertex(chromosome, position, location_dict, run_info)[
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kiliankleemann/anaconda3/lib/python3.11/site-packages/talon/talon.py", line 416, in create_vertex
new_ID = vertex_counter.increment()
^^^^^^^^^^^^^^
NameError: name 'vertex_counter' is not defined

@fairliereese
Copy link
Member

Hi there, can you please let me know what version of TALON you're running?

@Kiliankleemann
Copy link
Author

talon 5.0 pypi_0 pypi

@Kiliankleemann
Copy link
Author

It seems to initiate properly but then fails:

[ 2023-10-11 13:41:18 ] Started TALON run
[ 2023-10-11 13:42:27 ] Merged input SAM/BAM files
[ 2023-10-11 13:43:03 ] Split reads into 305 intervals
[ 2023-10-11 13:43:05 ] Launching parallel annotation jobs
[ 2023-10-11 13:43:05 ] Annotating reads in interval GL000009.2:116008-116358...
[ 2023-10-11 13:43:05 ] Annotating reads in interval GL383522.1:57520-77044...
[ 2023-10-11 13:43:05 ] Annotating reads in interval GL383582.2:2045-71551...
[ 2023-10-11 13:43:05 ] Annotating reads in interval GL000194.1:44042-106555...

@fairliereese
Copy link
Member

It looks like you are having the same issue as in #136, vaguely. I noticed that you're both using Python >= 3.10. Digging into this, it looks like the behaviour of sharing these "counter" variables between multiprocessing threads has changed (see https://stackoverflow.com/questions/70552775/multiprocess-inherently-shared-memory-in-no-longer-working-on-python-3-10-comin). Maybe you could try downgrading your Python version. I will likely try to update the requirements in the setup.py file to solve this in the future, once I've done some testing on my end.

@Kiliankleemann
Copy link
Author

Thanks so much for the reply. Ill try it now.

@fairliereese
Copy link
Member

Just to follow up, I tested this behavior and found that I was able to reproduce your issue with Python >= 3.8, as the Stackoverflow thread I found suggested. I have now included <3.8 as a Python dependency in the installation requirements in the latest release. Please try installing with this version and see if this fixes your issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants