UnboundLocalError: local variable 'pool' referenced before assignment
DittmanC opened this issue · 2 comments
I am new to this software. I am trying to follow the procedures by first converting the .hic file to .cool format.
- hic2cool convert $work_dir/hic/sample.hic
$work_dir/cooler/sample_$ {bin_size}.cool -r $bin_size -p 10
then I used calculate-cnv and segment-cnv in step 2 and 3. It cause no problem and no error message.
2.calculate-cnv -g hg19 -H
3.segment-cnv --cnv-file
However, when I tried to do correct-cnv, it showed "UnboundLocalError: local variable 'pool' referenced before assignment"
4.correct-cnv -H
the error message as below,
root INFO @ 10/19/21 17:23:42: Match CNV segmentation to matrix bins
root INFO @ 10/19/21 17:23:46: Perform CNV-separate matrix balancing ...
Traceback (most recent call last):
File "/disk3/users/dittman/.conda/envs/neoloop/lib/python3.7/site-packages/neoloop/cnv/correctcnv.py", line 179, in matrix_balance
pool = balance.Pool(nproc)
AttributeError: module 'cooler.balance' has no attribute 'Pool'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/disk3/users/dittman/.conda/envs/neoloop/bin/correct-cnv", line 94, in run
matrix_balance(args.hic, nproc=args.nproc)
File "/disk3/users/dittman/.conda/envs/neoloop/lib/python3.7/site-packages/neoloop/cnv/correctcnv.py", line 198, in matrix_balance
pool.close()
UnboundLocalError: local variable 'pool' referenced before assignment
I have tried to run the "cooler balance" before step 4 as well and It doesn't work for me
it looks like a version compatibility issue of the cooler package ... which cooler version did you install?