hartwigmedical / hmftools

Various algorithms for analysing genomics data
GNU General Public License v3.0
193 stars 59 forks source link

GRIPSS 2.3: fatal exception when parsing non-chromosome contigs #332

Closed toddajohnson closed 2 years ago

toddajohnson commented 2 years ago

Ran GRIDSS-2.13.2 VCF output through GRIPSS-2.3 and it failed with:

12:37:53.644 [INFO ] applying soft-filters and realignment Exception in thread "main" java.lang.NumberFormatException: For input string: "14_GL000194v1_random" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Integer.parseInt(Integer.java:652) at java.base/java.lang.Integer.parseInt(Integer.java:770) at com.hartwig.hmftools.common.genome.chromosome.HumanChromosome.chromosomeRank(HumanChromosome.java:146) at com.hartwig.hmftools.gripss.BreakendRealigner.centreAlignConfidenceIntervals(BreakendRealigner.java:92) at com.hartwig.hmftools.gripss.BreakendRealigner.realign(BreakendRealigner.java:39) at com.hartwig.hmftools.gripss.GripssApplication.processVcf(GripssApplication.java:190) at com.hartwig.hmftools.gripss.GripssApplication.run(GripssApplication.java:121) at com.hartwig.hmftools.gripss.GripssApplication.main(GripssApplication.java:374)

whereas with GRIPSS-2.2 it ran to completion:

12:35:24.439 [INFO ] applying soft-filters and realignment 12:35:25.253 [INFO ] soft-filtered(16736) hotspots(0) realigned(959) 12:35:25.372 [INFO ] applying PON filters 12:35:25.493 [INFO ] finding assembly links 12:35:25.501 [INFO ] finding alternative paths and transitive links 12:35:25.519 [INFO ] deduplication of paired end single breakends 12:35:25.525 [INFO ] finding double stranded break links 12:35:25.548 [INFO ] rescuing linked variants 12:35:26.865 [INFO ] Gripss run complete

I examined the exception details, and it looks like com.hartwig.hmftools.common.genome.chromosome.HumanChromosome.chromosomeRank has changed between GRIPSS-2.2 and 2.3; the previous version had code that would assign a rank of -1 to chromosomes that are not in the standard chromosome list:if(!HumanChromosome.contains(chromosome)) return -1;

charlesshale commented 2 years ago

I have reverted to the behaviour where the method chromosomeRank will return -1 for chromosome values outside those in HumanChromosome. Will be used in Gripss v2.4, due for release in a few weeks.