deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
223 stars 68 forks source link

About hicPCA error #898

Open HW-Superior opened 3 months ago

HW-Superior commented 3 months ago

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