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

hicPCA error: IndexError: list index out of range. raise ValueError('x and y must have length at least 2.') ValueError: x and y must have length at least 2. #907

Open
shRDJr opened this issue Aug 14, 2024 · 0 comments

Comments

@shRDJr
Copy link

shRDJr commented Aug 14, 2024

Hi, when I was running hicPCA to get compartment, I encountered the following error. I checked the extraTrack bed file and found nothing wrong with the format. How can I solve this problem?

ERROR:hicmatrix.HiCMatrix:Index error
Traceback (most recent call last):
File "/work/home/ac9kx9ps3t/mambaforge/envs/hicexplorer/lib/python3.12/site-packages/hicmatrix/HiCMatrix.py", line 262, in getRegionBinRange
endbin = sorted(self.interval_trees[chrname][endpos:endpos + 1])[0].data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
WARNING:hicexplorer.hicPCA:Your chromosome sizes do not match the chromosome sizes of the extraTrack data!
WARNING:hicexplorer.hicPCA:Your chromosome Contig2063_pilon; Size 10393. ExtraTrack data Contig2063_pilon 2889 10393
WARNING:hicexplorer.hicPCA:Please create your interaction matrix with a chromosome size file! However, if the sizes are intended and it is accepted that certain regions are not part of the correlation, you can ignore this message.
Traceback (most recent call last):
File "/work/home/ac9kx9ps3t/mambaforge/envs/hicexplorer/bin/hicPCA", line 7, in
main()
File "/work/home/ac9kx9ps3t/mambaforge/envs/hicexplorer/lib/python3.12/site-packages/hicexplorer/hicPCA.py", line 355, in main
vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.extraTrack)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/home/ac9kx9ps3t/mambaforge/envs/hicexplorer/lib/python3.12/site-packages/hicexplorer/hicPCA.py", line 190, in correlateEigenvectorWithGeneTrack
_correlation = pearsonr(np.array(eigenvector[bin_id[0]:bin_id[1]]).real,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/home/ac9kx9ps3t/mambaforge/envs/hicexplorer/lib/python3.12/site-packages/scipy/stats/_stats_py.py", line 4814, in pearsonr
raise ValueError('x and y must have length at least 2.')
ValueError: x and y must have length at least 2.

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

1 participant