LuChenLab / SCAPE

Single Cell Alternative Polyadenylation using Expectation-maximization
MIT License
7 stars 2 forks source link

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

Open msaland opened 3 months ago

msaland commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

As for the command I ran:

python /workspace/lab/hanlab/software/scape/main.py apamix --bed GRCm39utr.bed --bam .bam --cb .tsv --out _ --tag CB,UR --cores 24