Skip to content

Commit 4c528d3

Browse files
committed
Bugfix pindel sanity check
1 parent 72e0dea commit 4c528d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/PindelAnalysis.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,12 @@ else if ("D".equals(type))
376376
ref = sequence.getBaseString().substring(basePriorToStart-1, trueEnd);
377377
alt = sequence.getBaseString().substring(basePriorToStart-1, basePriorToStart);
378378

379-
String predictedPindelAllele = ref + pindelAllele;
379+
// Pindel reports the region over the deletion. so add the leading base to match the reference (VCF-style)
380+
// Our sequence based on coordinates should match what pindel reported
381+
String predictedPindelAllele = alt + pindelAllele;
380382
if (!predictedPindelAllele.equals(ref))
381383
{
382-
throw new IllegalArgumentException("Unexpected pindel allele: " + ref + " / " + predictedPindelAllele);
384+
throw new IllegalArgumentException("Unexpected pindel allele: " + ref + " / " + predictedPindelAllele + " / " + pindelAllele);
383385
}
384386
}
385387

0 commit comments

Comments
 (0)