Merged bug fix from Stable into Unstable
This commit is contained in:
commit
dd80ffbbbe
|
|
@ -46,6 +46,7 @@ import java.util.*;
|
||||||
public class VariantSummary extends VariantEvaluator implements StandardEval {
|
public class VariantSummary extends VariantEvaluator implements StandardEval {
|
||||||
final protected static Logger logger = Logger.getLogger(VariantSummary.class);
|
final protected static Logger logger = Logger.getLogger(VariantSummary.class);
|
||||||
|
|
||||||
|
/** Indels with size greater than this value are tallied in the CNV column */
|
||||||
private final static int MAX_INDEL_LENGTH = 50;
|
private final static int MAX_INDEL_LENGTH = 50;
|
||||||
private final static double MIN_CNV_OVERLAP = 0.5;
|
private final static double MIN_CNV_OVERLAP = 0.5;
|
||||||
private VariantEvalWalker walker;
|
private VariantEvalWalker walker;
|
||||||
|
|
@ -196,14 +197,16 @@ public class VariantSummary extends VariantEvaluator implements StandardEval {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final boolean overlapsKnownCNV(VariantContext cnv) {
|
private final boolean overlapsKnownCNV(VariantContext cnv) {
|
||||||
final GenomeLoc loc = walker.getGenomeLocParser().createGenomeLoc(cnv, true);
|
if ( knownCNVs != null ) {
|
||||||
IntervalTree<GenomeLoc> intervalTree = knownCNVs.get(loc.getContig());
|
final GenomeLoc loc = walker.getGenomeLocParser().createGenomeLoc(cnv, true);
|
||||||
|
IntervalTree<GenomeLoc> intervalTree = knownCNVs.get(loc.getContig());
|
||||||
|
|
||||||
final Iterator<IntervalTree.Node<GenomeLoc>> nodeIt = intervalTree.overlappers(loc.getStart(), loc.getStop());
|
final Iterator<IntervalTree.Node<GenomeLoc>> nodeIt = intervalTree.overlappers(loc.getStart(), loc.getStop());
|
||||||
while ( nodeIt.hasNext() ) {
|
while ( nodeIt.hasNext() ) {
|
||||||
final double overlapP = loc.reciprocialOverlapFraction(nodeIt.next().getValue());
|
final double overlapP = loc.reciprocialOverlapFraction(nodeIt.next().getValue());
|
||||||
if ( overlapP > MIN_CNV_OVERLAP )
|
if ( overlapP > MIN_CNV_OVERLAP )
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -450,4 +450,21 @@ public class VariantEvalIntegrationTest extends WalkerTest {
|
||||||
);
|
);
|
||||||
executeTest("testIntervalStrat", spec);
|
executeTest("testIntervalStrat", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testModernVCFWithLargeIndels() {
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
buildCommandLine(
|
||||||
|
"-T VariantEval",
|
||||||
|
"-R " + b37KGReference,
|
||||||
|
"-eval " + validationDataLocation + "/NA12878.HiSeq.WGS.b37_decoy.indel.recalibrated.vcf",
|
||||||
|
"-L 20",
|
||||||
|
"-D " + b37dbSNP132,
|
||||||
|
"-o %s"
|
||||||
|
),
|
||||||
|
1,
|
||||||
|
Arrays.asList("a6f8b32fa732632da13dfe3ddcc73cef")
|
||||||
|
);
|
||||||
|
executeTest("testModernVCFWithLargeIndels", spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue