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 when using gene track #716

Closed
biozzq opened this issue May 11, 2021 · 1 comment
Closed

hicPCA error when using gene track #716

biozzq opened this issue May 11, 2021 · 1 comment

Comments

@biozzq
Copy link

biozzq commented May 11, 2021

Dear all,

In my mind, the following will be a common question when doing PCA analysis.
I resolved the following problem before (#707, mainly because the intervals in the gene bed file exceed the chromosome ranges), but here it does not work when checking using the same methods. I have checked the gene bed file and the chromosome name, but cannot find any error. If the error occurred in the gene bed file, I hope you can give us more clear error message, such as which line of the bed file is wrong as you said before (#621). Thank you very much.

The command I used is as following:

hicPCA (Version3.6) -m KR_corrected.cool -o pca1.bw pca2.bw --format bigwig --extraTrack mm10_refGene.bed

ERROR:hicmatrix.HiCMatrix:Index error
Traceback (most recent call last):
  File "/python3.8/site-packages/hicmatrix/HiCMatrix.py", line 270, in getRegionBinRange
    endbin = sorted(self.interval_trees[chrname][endpos:endpos + 1])[0].data
IndexError: list index out of range
Traceback (most recent call last):
  File "/01.software/hicexplorer/bin/hicPCA", line 7, in <module>
    main()
  File "/python3.8/site-packages/hicexplorer/hicPCA.py", line 337, in main
    vecs_list = correlateEigenvectorWithGeneTrack(ma, vecs_list, args.extraTrack)
  File "/01.software/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicPCA.py", line 161, in correlateEigenvectorWithGeneTrack
    gene_occurrence[bin_id[1]] += 1
TypeError: 'NoneType' object is not subscriptable

Sincerely,
Zheng zhuqing

@joachimwolff
Copy link
Collaborator

See #719. Are you sure for all chromosomes your sizes match the sizes of the reference genome?

joachimwolff added a commit that referenced this issue Jul 12, 2021
Bug fix for hicPCA with new test data and test case. Fix #719 #716 #7
@joachimwolff joachimwolff mentioned this issue Jul 27, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants