Skip to content

error in run diffdomains.py dvsd multiple #30

@looon1

Description

@looon1

Hello,
I am trying to run the tool with the following command:

$python diffdomains.py dvsd multiple N20k_0_1_range_KR.cool T20k_0_1_range_KR.cool N20k.hicfindtad_domains.txt --ofile res/temp_tvsi.txt --reso 20000 , it works ,the next step python diffdomains.py adjustment fdr_bh ,python classification.py and python subdivide_strength_change.py also work

but when i run $ python diffdomains.py dvsd multiple N20k_0_1_range_KR.cool T20k_0_1_range_KR.cool N20k.hicfindtad_domains.txt --ofile res/temp_tvsi.txt
traceback:
`"""
Traceback (most recent call last):
File "diffdomains.py", line 66, in
comp2domins_by_twtest_parallel(0)
File "diffdomains.py", line 59, in comp2domins_by_twtest_parallel
fhic0=opts[''], fhic1=opts[''],min_nbin=int(opts['--min_nbin']),f=opts['--f'])
File "/public/fzh/cpt_tad_loops/TAD/diffgr/utils.py", line 351, in comp2domins_by_twtest
mat1 = contact_matrix_from_hic(chrn, start, end, reso, fhic1, hicnorm)
File "/public/fzh/cpt_tad_loops/TAD/diffgr/utils.py", line 194, in contact_matrix_from_hic
mat = c.matrix(balance=False).fetch(region2)
File "/home/fzh/miniconda3/envs/diffdomain/lib/python3.7/site-packages/cooler/api.py", line 339, in matrix
return RangeSelector2D(field, _slice, _fetch, (self._info['nbins'],) * 2)
KeyError: 'nbins'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/fzh/miniconda3/envs/diffdomain/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "diffdomains.py", line 59, in comp2domins_by_twtest_parallel
fhic0=opts[''], fhic1=opts[''],min_nbin=int(opts['--min_nbin']),f=opts['--f'])
File "/public/fzh/cpt_tad_loops/TAD/diffgr/utils.py", line 351, in comp2domins_by_twtest
mat1 = contact_matrix_from_hic(chrn, start, end, reso, fhic1, hicnorm)
File "/public/fzh/cpt_tad_loops/TAD/diffgr/utils.py", line 194, in contact_matrix_from_hic
mat = c.matrix(balance=False).fetch(region2)
File "/home/fzh/miniconda3/envs/diffdomain/lib/python3.7/site-packages/cooler/api.py", line 339, in matrix
return RangeSelector2D(field, _slice, _fetch, (self._info['nbins'],) * 2)
KeyError: 'nbins'
"""

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

Traceback (most recent call last):
File "diffdomains.py", line 76, in
result.append(i.get())
File "/home/fzh/miniconda3/envs/diffdomain/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
KeyError: 'nbins'`

i follow the error in run diffdomains.py dvsd multiple
#28 try to slove the problem , i check the .cool file , $ cooler info T20k_0_1_range_KR.cool { "bin-size": 20000, "bin-type": "fixed", "creation-date": "2025-01-04T23:56:42.295906", "format": "HDF5::Cooler", "format-url": "https://github.com/mirnylab/cooler", "format-version": 3, "generated-by": "HiCMatrix-17.2", "generated-by-cooler-lib": "cooler-0.10.2", "genome-assembly": "unknown", "nbins": 154423, "nchroms": 24, "nnz": 454812249, "storage-mode": "symmetric-upper", "sum": 826273711.0, "tool-url": "https://github.com/deeptools/HiCMatrix" } $ cooler info I20k_0_1_range_KR.cool { "bin-size": 20000, "bin-type": "fixed", "creation-date": "2025-03-25T18:48:17.985695", "format": "HDF5::Cooler", "format-url": "https://github.com/mirnylab/cooler", "format-version": 3, "generated-by": "HiCMatrix-17.2", "generated-by-cooler-lib": "cooler-0.10.2", "genome-assembly": "unknown", "nbins": 154423, "nchroms": 24, "nnz": 433540280, "storage-mode": "symmetric-upper", "sum": 872420235.0, "tool-url": "https://github.com/deeptools/HiCMatrix" }

and also check the .bed file
$ head T20k.hicfindtad_domains.txt chr1 620000 860000 ID_0.01_1 -1.239578055150 . 620000 860000 31,120,180 chr1 860000 1080000 ID_0.01_2 -0.048559384101 . 860000 1080000 51,160,44 chr1 1080000 1300000 ID_0.01_3 0.112043798300 . 1080000 1300000 31,120,180 chr1 1300000 1540000 ID_0.01_4 -0.215590126392 . 1300000 1540000 51,160,44 chr1 1540000 1740000 ID_0.01_5 -0.242336646291 . 1540000 1740000 31,120,180 chr1 1740000 1920000 ID_0.01_6 -0.321861283209 . 1740000 1920000 51,160,44 chr1 1920000 2180000 ID_0.01_7 -0.712536794414 . 1920000 2180000 31,120,180 chr1 2180000 3060000 ID_0.01_8 -0.476681041406 . 2180000 3060000 51,160,44 chr1 3060000 3440000 ID_0.01_9 0.103657957273 . 3060000 3440000 31,120,180 chr1 3440000 3640000 ID_0.01_10 -0.215381254199 . 3440000 3640000 51,160,44

Please help me to solve this problem. Looking forward to your reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions