Skip to content
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

The KeyError: 'weight' #62

Open
biosciences opened this issue Feb 16, 2024 · 1 comment
Open

The KeyError: 'weight' #62

biosciences opened this issue Feb 16, 2024 · 1 comment

Comments

@biosciences
Copy link

biosciences commented Feb 16, 2024

When I try to run this command:
correct-cnv -H patient_hg38_contact_map.mcool::resolutions/100000
--cnv-file patient_hg38_contact_map_100kb.CNV-seg.bedGraph --nproc 4 -f

It return such error:
Traceback (most recent call last):
File "/home/user1/var/opt/mambaforge/envs/neoloop/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3791, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'weight'

It seems to find certain metadata, including normalization vectors. If these vectors are absent or not recognized, it could result in a KeyError: 'weight' because the tool cannot find the expected data.

I used JuiceBox Tools to generate HiC data by following the instructions: https://protect-au.mimecast.com/s/0EM_CjZ1N7iYvJw2BhWhDsz?domain=dovetail-capture.readthedocs.io, and use below command to convert the hic file:
hic2cool patient_hg38_contact_map.hic patient_170052_18_hg38_contact_map.mcool

@XiaoTaoWang
Copy link
Owner

Hi, you may need to run cooler balance before you run correct-cnv. Please also refer to this similar issue #8 for more explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants