-
Notifications
You must be signed in to change notification settings - Fork 4
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 in run diffdomains.py dvsd multiple #28
Comments
@jinshangkun ,Thank you for your question. The error you're encountering is due to the missing
By verifying these points, you should be able to resolve the issue. If the cool files are correct and the issue persists, don't hesitate to contact me for further assistance. |
@liuyc27 Thank you for your reply. I checked my cool files and found it including the nbins field.
The cool files were generated by 'hicConvertFormat -m A_10dpa_20000.matrix -bf A_10dpa_20000_abs.bed --inputFormat hicpro --outputFormat cool -o A_10dpa_20000.matrix.cool -r 20000' (maybe there's a problem in this step) |
Hi @jinshangkun, Could you please provide the two .cool files that are causing the issue? This will help us investigate the problem further. Thank you! |
@liuyc27 Could you provide an e-mail address? The data is too big to upload to github. Thanks! |
@jinshangkun You are welcome to send your email to Additionally, the solutions for '.cool file multiple processing errors #18' and 'output file #20' might be useful to you. I recommend checking them out for further insights. Thank you once again for your support! |
@liuyc27 Thanks! I have sent the cool file to your email. |
@jinshangkun Thank you for your data. However, there is an issue with the bed file. Please check the "2. Input format" section in the wiki to ensure the bed file is correct. It should have these columns with a header, no matter what the column names are:
Please ensure that the chromosome names in the chr1 column match those in your cool file. You can use the following code to check the chromosome names in the cool file: import cooler
# Load .cool file
cool_file = cooler.Cooler('A_10dpa_20000.matrix.cool')
# Get chromosome information
chromosomes = cool_file.chroms()
# Get chromosome names
chromosome_names = list(chromosomes)
# Print chromosome names
print("Chromosomes:", chromosome_names) If you encounter an "unknown label A01" error, follow these steps:
If you have any other questions, feel free to contact us. |
@liuyc27 Thanks!I will try it |
Thanks for a good tool for HiC data processing.
When I run it, I got an error that can not be solved by myself. Pls help me to solve this problem. Looking forward to your reply.
The script used is as follows:
python /home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/diffdomains.py dvsd multiple A_10dpa_20000.matrix.cool B_10dpa_20000.matrix.cool A_10dpa_20000_domains.bed --reso 20000 --ofile A_B_10dpa --ncore 1
The error information:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/diffdomains.py", line 66, in
comp2domins_by_twtest_parallel(0)
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/diffdomains.py", line 57, in comp2domins_by_twtest_parallel
tmp_res = comp2domins_by_twtest(chrn=tadb.iloc[i, 0], start=tadb.iloc[i, 1],
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/utils.py", line 339, in comp2domins_by_twtest
mat1 = contact_matrix_from_hic(chrn, start, end, reso, fhic1, hicnorm)
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/utils.py", line 194, in contact_matrix_from_hic
mat = c.matrix(balance=False).fetch(region2)
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/cooler/api.py", line 402, 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/jsk/miniconda3/envs/py39/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/diffdomains.py", line 57, in comp2domins_by_twtest_parallel
tmp_res = comp2domins_by_twtest(chrn=tadb.iloc[i, 0], start=tadb.iloc[i, 1],
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/utils.py", line 339, in comp2domins_by_twtest
mat1 = contact_matrix_from_hic(chrn, start, end, reso, fhic1, hicnorm)
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/utils.py", line 194, in contact_matrix_from_hic
mat = c.matrix(balance=False).fetch(region2)
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/cooler/api.py", line 402, 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 "/home/jsk/miniconda3/envs/py39/lib/python3.9/site-packages/diffdomain_py3/diffdomains.py", line 76, in
result.append(i.get())
File "/home/jsk/miniconda3/envs/py39/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
KeyError: 'nbins'
The text was updated successfully, but these errors were encountered: