paulhager / smart-phase

A comprehensive and intelligent clinical phasing tool
GNU General Public License v3.0
13 stars 2 forks source link

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException #15

Closed sli0001 closed 2 months ago

sli0001 commented 2 months ago

Hi,

I'm running smart-phase in explorative mode, specifying a hg19-aligned bam, vardict vcf, and a target bed file:

java -jar smartPhase.jar \
-a ${vcf} \
-g ${target_bed} \
-p ${sample_name} \
-r ${bam} \
-m 30 \
-o ${sample_name}.tsv 

The .vcf from vardict didn't originally contain ##contig in the header, but I have added it using bcftools reheader. I'm now getting this error:

------------------
INTERVAL CONTIG: 14
INTERVAL START: 106805282
INTERVAL END: 106805437
Filtered Variants found in interval: 6
Variants found in interval: 6
Reads examined in interval: 11602
Reads passing QC in interval: 11602
------------------
------------------
INTERVAL CONTIG: 14
INTERVAL START: 106846377
INTERVAL END: 106846565
Filtered Variants found in interval: 3
Variants found in interval: 3
Reads examined in interval: 16251
Reads passing QC in interval: 16251
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 98
    at smartPhase.SmartPhase.updatePhaseCounter(SmartPhase.java:1970)
    at smartPhase.SmartPhase.countEvidence(SmartPhase.java:1887)
    at smartPhase.SmartPhase.phasePIR(SmartPhase.java:1279)
    at smartPhase.SmartPhase.readPhase(SmartPhase.java:1215)
    at smartPhase.SmartPhase.main(SmartPhase.java:657)

The previous INTERVAL CONTIGS (INTERVAL CONTIG: 1... INTERVAL CONTIG: 13) all ran successfully, but it seems to be failing at chromosome 14.

What could be causing this error? Any insight to help troubleshoot would be greatly appreciated, thank you!

King regards, Song

paulhager commented 2 months ago

Hi Song,

I'm sorry to say that I don't work in the field anymore so I won't be able to help you fix this bug. If you manage to debug and fix it by yourself, I would gladly accept a pull request to merge it into the main branch to help others as well!

sli0001 commented 2 months ago

Hi,

No problem, I will try debugging and let you know if I come across a fix. I'll close this off for now -- thanks for your quick response!