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

Error when concatenating final sheet (local variable 'r1_dt' referenced before assignment) #20

Open
msaland opened this issue Jul 2, 2024 · 2 comments

Comments

@msaland
Copy link

msaland commented Jul 2, 2024

Hello,

I'm currently running the SCAPE package on some single-cell GRCm39 data, and it's running well up until the last step where it's concatenating the final sheet, where it gives this error:

2024-07-02 10:45:19.226 | INFO | cli.apamix:apamix:197 - Concating your final sheet
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/workspace/software/scape/apamix/inference.py", line 262, in wraper_process
return run(arg)
File "/workspace/software/scape/apamix/inference.py", line 168, in run
apa_reads.polya_len_arr.append(r1_dt)
UnboundLocalError: local variable 'r1_dt' referenced before assignment
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/workspace/software/scape/main.py", line 4, in
cli()
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/workspace/software/scape/cli/apamix.py", line 202, in apamix
df = df.get()
File "/workspace/software/Miniconda3/envs/scape/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
UnboundLocalError: local variable 'r1_dt' referenced before assignment

I've previously run it on some single cell Grch38 human data without issue, so I'm surprised to see this error now.

Thanks,
Mike

@zhou-ran
Copy link
Contributor

zhou-ran commented Jul 3, 2024

Hello,

I didn't notice your command and am unsure why it didn't work. Please try using the latest version of SCAPE from https://github.com/chengl7-lab/scape.

Regards,
Ran

@msaland
Copy link
Author

msaland commented Jul 3, 2024

I have been trying to use the newer version, but unfortunately I've been having issues (same one as chengl7-lab/scape#2).

As for the command I ran:

python /workspace/lab/hanlab/software/scape/main.py apamix --bed GRCm39_utr.bed --bam .bam --cb .tsv --out <out_folder> --tag CB,UR --cores 24

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