XiaoTaoWang / NeoLoopFinder

A computation framework for genome-wide detection of enhancer-hijacking events from chromatin interaction data in re-arranged genomes
Other
53 stars 16 forks source link

UnboundLocalError: local variable 'pool' referenced before assignment #25

Closed DittmanC closed 2 years ago

DittmanC commented 2 years ago

I am new to this software. I am trying to follow the procedures by first converting the .hic file to .cool format.

  1. hic2cool convert $work_dir/hic/sample.hic $workdir/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 $workdir/cooler/sample${bin_size}.cool --output $workdir/cooler/sample${bin_size}_calculate-cnv.txt -e MboI --cachefolder /disk3/users/dittman/Data/project1/OmniC/align/mapped/cooler/neoloopfinder/

3.segment-cnv --cnv-file $workdir/cooler/sample${bin_size}_calculate-cnv.txt --binsize ${bin_size} --output $work_dir/cooler/NPC53P68_filterhg19EBV${bin_size}_segmented_cnv.txt --nproc 12

However, when I tried to do correct-cnv, it showed "UnboundLocalError: local variable 'pool' referenced before assignment" 4.correct-cnv -H $workdir/cooler/sample${bin_size}.cool --cnv-file $workdir/cooler/sample${bin_size}_segmented_cnv.txt --nproc 12 --logFile $work_dir/cooler/cnv-norm.log

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

DittmanC commented 2 years ago

I have tried to run the "cooler balance" before step 4 as well and It doesn't work for me

XiaoTaoWang commented 2 years ago

it looks like a version compatibility issue of the cooler package ... which cooler version did you install?