GaoLabXDU / HiSV

HiSV: a computational pipeline for structural variation detection from Hi-C data
MIT License
15 stars 1 forks source link

我在全基因组(hg38)预测SV,一直出现这个报错“IndexError: tuple index out of range”,不知道什么原因 #10

Open a50044758 opened 3 months ago

a50044758 commented 3 months ago

我在全基因组(hg38)预测SV,一直出现这个报错,不知道什么原因

HiSV --inter_hic /home/linda/usb/transdate/HSR-2/output/Inter_matrix --intra_hic /home/linda/usb/transdate/HSR-2/output/Intra_matrix --ref /home/linda/reference/UCSC-hg38-2024/UCSC_hg38_sorted.chrom.sizes --name HSR-2 --cores 20 --output result --inter_cutoff 0.6 --intra_cutoff 0.6

我允许这个脚本一直报错,不知道是什么原因 /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chr20_matrix.txt Read Hi-C matrix file: ['chr1', 'chr17'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr17_matrix.txt Read Hi-C matrix file: ['chr2', 'chr21'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chr21_matrix.txt Read Hi-C matrix file: ['chr2', 'chr22'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chr22_matrix.txt Read Hi-C matrix file: ['chr1', 'chr18'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr18_matrix.txt Read Hi-C matrix file: ['chr2', 'chrX'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chrX_matrix.txt Read Hi-C matrix file: ['chr1', 'chr19'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr19_matrix.txt Read Hi-C matrix file: ['chr1', 'chr20'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr20_matrix.txt Read Hi-C matrix file: ['chr1', 'chr21'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr21_matrix.txt Read Hi-C matrix file: ['chr2', 'chrY'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chrY_matrix.txt Read Hi-C matrix file: ['chr1', 'chr22'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chr22_matrix.txt Read Hi-C matrix file: ['chr2', 'chrM'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr2_chrM_matrix.txt Read Hi-C matrix file: ['chr1', 'chrX'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chrX_matrix.txt Read Hi-C matrix file: ['chr1', 'chrY'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chrY_matrix.txt Read Hi-C matrix file: ['chr1', 'chrM'] /home/linda/usb/transdate/HSR-2/output/Inter_matrix/HSR-2_50kb_chr1_chrM_matrix.txt multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/linda/miniconda3/envs/hisv/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/linda/miniconda3/envs/hisv/bin/HiSV", line 173, in call_intra_sv if np.shape(contact_matrix)[0] != chr_inter_count[i] or np.shape(contact_matrix)[1] != chr_inter_count[j]: IndexError: tuple index out of range """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/linda/miniconda3/envs/hisv/bin/HiSV", line 368, in run_HiSV(ref_file, inter_binSize, intra_binSize, win, reg, inter_cutoff, intra_cutoff, n_cores, intra_hicfile, inter_hicfile, name, output) File "/home/linda/miniconda3/envs/hisv/bin/HiSV", line 296, in run_HiSV cur_chrom_result = ar.get() File "/home/linda/miniconda3/envs/hisv/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value IndexError: tuple index out of range

GaoLabXDU commented 2 months ago

不好意思,才看到您的问题。 这个问题的原因是您的reference中包含了chrM,这个长度在binsize为50K的时候构建不了Hi-C矩阵,所以会产生这个问题。建议您在reference的长度文件中删除这个chrM即可。