This along with Mauricio's previous commit (thanks!) fixes GSA-522. There are no longer any modifications to reads in the map calls of ActiveRegion walkers. Added the bam which identified this error as a new integration test.
This commit is contained in:
parent
4d38befe86
commit
35baf0b155
|
|
@ -66,4 +66,12 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
||||||
public void testHaplotypeCallerSingleSampleIndelQualityScores() {
|
public void testHaplotypeCallerSingleSampleIndelQualityScores() {
|
||||||
HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "e1f88fac91424740c0eaac1de48b3970");
|
HCTestIndelQualityScores(NA12878_RECALIBRATED_BAM, "", "e1f88fac91424740c0eaac1de48b3970");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void HCTestProblematicReadsModifiedInActiveRegions() {
|
||||||
|
final String base = String.format("-T HaplotypeCaller -R %s -I %s", REF, privateTestDir + "haplotype-problem-4.bam") + " --no_cmdline_in_header -o %s -minPruning 3";
|
||||||
|
final WalkerTestSpec spec = new WalkerTestSpec(base, Arrays.asList("000fd36d5cf8090386bb2ac15e3ab0b5"));
|
||||||
|
executeTest("HCTestProblematicReadsModifiedInActiveRegions: ", spec);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,7 @@ public class TraverseActiveRegions <M,T> extends TraversalEngine<M,T,ActiveRegio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reads.removeAll( placedReads ); // remove all the reads which have been placed into their active region
|
reads.removeAll( placedReads ); // remove all the reads which have been placed into their active region
|
||||||
|
// WARNING: This hashset relies on reads being exactly equal when they are placed in the list as when they are removed. So the ActiveRegionWalker can't modify the reads in any way.
|
||||||
|
|
||||||
logger.debug(">> Map call with " + activeRegion.getReads().size() + " " + (activeRegion.isActive ? "active" : "inactive") + " reads @ " + activeRegion.getLocation() + " with full extent: " + activeRegion.getReferenceLoc());
|
logger.debug(">> Map call with " + activeRegion.getReads().size() + " " + (activeRegion.isActive ? "active" : "inactive") + " reads @ " + activeRegion.getLocation() + " with full extent: " + activeRegion.getReferenceLoc());
|
||||||
final M x = walker.map( activeRegion, null );
|
final M x = walker.map( activeRegion, null );
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,6 @@ public class GATKSAMRecord extends BAMRecord {
|
||||||
quals = new byte[getBaseQualities().length];
|
quals = new byte[getBaseQualities().length];
|
||||||
Arrays.fill(quals, (byte) 45); // Some day in the future when base insertion and base deletion quals exist the samtools API will
|
Arrays.fill(quals, (byte) 45); // Some day in the future when base insertion and base deletion quals exist the samtools API will
|
||||||
// be updated and the original quals will be pulled here, but for now we assume the original quality is a flat Q45
|
// be updated and the original quals will be pulled here, but for now we assume the original quality is a flat Q45
|
||||||
setBaseQualities(quals, EventType.BASE_INSERTION);
|
|
||||||
}
|
}
|
||||||
return quals;
|
return quals;
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +245,6 @@ public class GATKSAMRecord extends BAMRecord {
|
||||||
quals = new byte[getBaseQualities().length];
|
quals = new byte[getBaseQualities().length];
|
||||||
Arrays.fill(quals, (byte) 45); // Some day in the future when base insertion and base deletion quals exist the samtools API will
|
Arrays.fill(quals, (byte) 45); // Some day in the future when base insertion and base deletion quals exist the samtools API will
|
||||||
// be updated and the original quals will be pulled here, but for now we assume the original quality is a flat Q45
|
// be updated and the original quals will be pulled here, but for now we assume the original quality is a flat Q45
|
||||||
setBaseQualities(quals, EventType.BASE_DELETION);
|
|
||||||
}
|
}
|
||||||
return quals;
|
return quals;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue