Allow disabling of BadMateFilter in HaplotypeCaller
This commit is contained in:
parent
bb87730ddc
commit
f092e1438d
|
|
@ -530,7 +530,6 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
*/
|
*/
|
||||||
private static final int MINIMUM_PUTATIVE_PLOIDY_FOR_ACTIVE_REGION_DISCOVERY = 2;
|
private static final int MINIMUM_PUTATIVE_PLOIDY_FOR_ACTIVE_REGION_DISCOVERY = 2;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads with length lower than this number, after clipping off overhands outside the active region,
|
* Reads with length lower than this number, after clipping off overhands outside the active region,
|
||||||
* won't be considered for genotyping.
|
* won't be considered for genotyping.
|
||||||
|
|
@ -550,6 +549,11 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
|
|
||||||
ReferenceConfidenceModel referenceConfidenceModel = null;
|
ReferenceConfidenceModel referenceConfidenceModel = null;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is the bad mate filter disabled by the argument -drf BadMate?
|
||||||
|
*/
|
||||||
|
private boolean isBadMateFilterDisabled = false;
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
//// Deprecated Arguments ////
|
//// Deprecated Arguments ////
|
||||||
|
|
@ -735,6 +739,8 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
|
|
||||||
trimmer.initialize(getToolkit().getGenomeLocParser(), HCAC.DEBUG,
|
trimmer.initialize(getToolkit().getGenomeLocParser(), HCAC.DEBUG,
|
||||||
HCAC.genotypingOutputMode == GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES,emitReferenceConfidence());
|
HCAC.genotypingOutputMode == GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES,emitReferenceConfidence());
|
||||||
|
|
||||||
|
isBadMateFilterDisabled = toolkit.getArguments().disabledReadFilters.contains("BadMate");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeReferenceConfidenceModel(final SampleList samples, final Set<VCFHeaderLine> headerInfo) {
|
private void initializeReferenceConfidenceModel(final SampleList samples, final Set<VCFHeaderLine> headerInfo) {
|
||||||
|
|
@ -1226,7 +1232,7 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
private Set<GATKSAMRecord> filterNonPassingReads( final ActiveRegion activeRegion ) {
|
private Set<GATKSAMRecord> filterNonPassingReads( final ActiveRegion activeRegion ) {
|
||||||
final Set<GATKSAMRecord> readsToRemove = new LinkedHashSet<>();
|
final Set<GATKSAMRecord> readsToRemove = new LinkedHashSet<>();
|
||||||
for( final GATKSAMRecord rec : activeRegion.getReads() ) {
|
for( final GATKSAMRecord rec : activeRegion.getReads() ) {
|
||||||
if( rec.getReadLength() < READ_LENGTH_FILTER_THRESHOLD || rec.getMappingQuality() < READ_QUALITY_FILTER_THRESHOLD || BadMateFilter.hasBadMate(rec) || (keepRG != null && !rec.getReadGroup().getId().equals(keepRG)) ) {
|
if( rec.getReadLength() < READ_LENGTH_FILTER_THRESHOLD || rec.getMappingQuality() < READ_QUALITY_FILTER_THRESHOLD || (!isBadMateFilterDisabled && BadMateFilter.hasBadMate(rec)) || (keepRG != null && !rec.getReadGroup().getId().equals(keepRG)) ) {
|
||||||
readsToRemove.add(rec);
|
readsToRemove.add(rec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,11 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
||||||
HCTest(CEUTRIO_BAM, "", "ad472fbd63864caacf5bc018dcae9df9");
|
HCTest(CEUTRIO_BAM, "", "ad472fbd63864caacf5bc018dcae9df9");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testHaplotypeCallerMultiSampleNoBadMateFilter() throws IOException {
|
||||||
|
HCTest(CEUTRIO_BAM, "-drf BadMate", "bb6b14675d62ff5b86430508ed688776");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testHaplotypeCallerSingleSample() throws IOException {
|
public void testHaplotypeCallerSingleSample() throws IOException {
|
||||||
|
|
||||||
|
|
@ -471,7 +476,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
||||||
1, UserException.CommandLineException.class));
|
1, UserException.CommandLineException.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testHaplotypeCallerMergeVariantsViaLDException(){
|
public void testHaplotypeCallerMergeVariantsViaLDException(){
|
||||||
executeTest("HaplotypeCallerMergeVariantsViaLDException",
|
executeTest("HaplotypeCallerMergeVariantsViaLDException",
|
||||||
new WalkerTest.WalkerTestSpec(
|
new WalkerTest.WalkerTestSpec(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue