HiCExplorer
HiCExplorer copied to clipboard
hic ERROR:hicmatrix.HiCMatrix:Index error
Welcome to the HiCExplorer GitHub repository! Before opening the issue please check that the following requirements are met :
-
[ ] Search whether this issue (or a similar issue) has been solved before using the search tab above. Link the previous issue if appropriate below.
-
[ ] Paste your HiCExplorer version (
hicInfo --version) and your python version (python --version) below. -
[ ] Have you checked our documentation on hicexplorer.readthedocs.io?
-
[ ] Do you use conda to install HiCExplorer?
-
[ ] Do you use the latest HiCExplorer release? If not, please install it via a conda environment:
conda create --name hicexplorer hicexplorer=3.6 python=3.8 -c bioconda -c conda-forgeand activate the environment:conda activate hicexplorer. Retry your command. You can exit a conda environment viaconda deactivate. To learn more about conda and environments, please consider the following documentation.
Retry your command, is it solved now? If not please continue with the following:
-
[ ] Paste the full HiCExplorer command that produces the issue below (ignore if you simply spotted the issue in the code/documentation).
-
[ ] Paste the output printed on screen from the command that produces the issue below (ignore if you simply spotted the issue in the code/documentation).
Hi,
I'm running hicPCA with the extraTrack option to assign eigenvector signal based on gene density with this command:
hicPCA
-m HiCExplorer_outputs/BCRpos_neg_5000/hicMergeMatrixBins/BCRpos_raw_200kb_normICEcorrected.h5
-o HiCExplorer_outputs/BCRpos_neg_5000/Compartments/BCRpos_raw_200kb_normICEcorrected_pca1_genecorrected.bedgraph HiCExplorer_outputs/BCRpos_neg_5000/Compartments/BCRpos_raw_200kb_normICEcorrected_pca2_genecorrected.bedgraph
--format bedgraph
--method dist_norm
--extraTrack mm10newgenes_filtered_sorted.bed
--pearsonMatrix HiCExplorer_outputs/BCRpos_neg_5000/Compartments/BCRpos_raw_200kb_normICEcorrected_pearsonMatrix_genecorrected.h5
--obsexpMatrix HiCExplorer_outputs/BCRpos_neg_5000/Compartments/BCRpos_raw_200kb_normICEcorrected_obsexpMatrix_genecorrected.h5
ERROR:hicmatrix.HiCMatrix:Index error
Traceback (most recent call last):
File "/storage/home/rsilva/anaconda3/envs/hicexplorer/lib/python3.8/site-packages/hicmatrix/HiCMatrix.py", line 271, 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 "/storage/home/rsilva/anaconda3/envs/hicexplorer/bin/hicPCA", line 7, in
I looked for this error before and found this issue in a hicAdjustmatrix
https://github.com/deeptools/HiCExplorer/issues/487
so I checked length of chr with the HicINFO and verified whether i had regions outside the values from bedfile
Matrix information file. Created with HiCExplorer's hicInfo version 3.6
File: HiCExplorer_outputs/BCRpos_neg_5000/hicMergeMatrixBins/BCRpos_raw_200kb_normICEcorrected.h5 Size: 13,170 Bin_length: 200000 Sum of matrix: 299607655.71638775 Chromosomes:length: chr1: 195400000 bp; chr2: 182113224 bp; chr3: 160000000 bp; chr4: 156508116 bp; chr5: 151800000 bp; chr6: 149736546 bp; chr7: 145400000 bp; chr8: 129400000 bp; chr9: 124595110 bp; chr10: 130600000 bp; chr11: 122000000 bp; chr12: 120129022 bp; chr13: 120400000 bp; chr14: 124902244 bp; chr15: 104000000 bp; chr16: 98200000 bp; chr17: 94987271 bp; chr18: 90702639 bp; chr19: 61431566 bp; chrX: 171000000 bp; Non-zero elements: 55,740,966 Minimum (non zero): 0.43227997314619343 Maximum: 29325.658140330415 NaN bins: 720
I confirmed there are no values in the bed file outside the values of the matrix
awk '{split($1, a, "_"); chr=a[1]; pos=$3} $1!=prev {if (NR>1) print prev_chr, prev_pos; prev=$1; prev_chr=chr} {prev_pos=pos} END {print prev_chr, prev_pos}' mm10newgenes_filtered_sorted.bed
chr1 195176715 chr10 130497379 chr11 121843436 chr12 120021245 chr13 120318261 chr14 124015684 chr15 103899312 chr16 98082439 chr17 94878321 chr18 90543267 chr19 61228418 chr2 182001087 chr3 159935175 chr4 156339496 chr5 151651208 chr6 149563326 chr7 145324059 chr8 129234046 chr9 124476862 chrX 170678054
I'm using conda environment with version hicexplorer 3.6
Any ideas what could be causing this issue?
Many thanks for your support, Raquel