I'm experiencing an issue with hicPCA, where it gives a ValueError. I'm using python version 3.8.19 and hicexplorer version 3.7.2. Here is the command I run:
hicPCA --matrix CX6_200000.h5 --whichEigenvectors 1 --outputFileName CX6.200k.hicpca.bedgraph --format bedgraph --extraTrack gene.bed --pearsonMatrix CX6.200k.hicpca.pm --obsexpMatrix CX6.200k.hicpca.oem
The error as Traceback (most recent call last):
File "/home/wanghao/miniconda3/envs/hicexplorer/bin/hicPCA", line 7, in
main()
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicPCA.py", line 355, in main
vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.extraTrack)
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicPCA.py", line 190, in correlateEigenvectorWithGeneTrack
_correlation = pearsonr(np.array(eigenvector[bin_id[0]:bin_id[1]]).real,
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/scipy/stats/_stats_py.py", line 4411, in pearsonr
raise ValueError('x and y must have length at least 2.')
ValueError: x and y must have length at least 2.
The picture below shows the gene.bed file. When I remove --extraTrack gene.bed parameter, the output will be normal. How should I solve this problem?
Thanks
Hi ,
I'm experiencing an issue with hicPCA, where it gives a ValueError. I'm using python version 3.8.19 and hicexplorer version 3.7.2. Here is the command I run: hicPCA --matrix CX6_200000.h5 --whichEigenvectors 1 --outputFileName CX6.200k.hicpca.bedgraph --format bedgraph --extraTrack gene.bed --pearsonMatrix CX6.200k.hicpca.pm --obsexpMatrix CX6.200k.hicpca.oem
The error as Traceback (most recent call last): File "/home/wanghao/miniconda3/envs/hicexplorer/bin/hicPCA", line 7, in
main()
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicPCA.py", line 355, in main
vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.extraTrack)
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicPCA.py", line 190, in correlateEigenvectorWithGeneTrack
_correlation = pearsonr(np.array(eigenvector[bin_id[0]:bin_id[1]]).real,
File "/home/wanghao/miniconda3/envs/hicexplorer/lib/python3.8/site-packages/scipy/stats/_stats_py.py", line 4411, in pearsonr
raise ValueError('x and y must have length at least 2.')
ValueError: x and y must have length at least 2.
The picture below shows the gene.bed file. When I remove --extraTrack gene.bed parameter, the output will be normal. How should I solve this problem?
Thanks
![image](https://github.com/deeptools/HiCExplorer/assets/106525492/010c0ee3-578c-47ae-8aa6-f3ac0592851d)