Fix for calculating read pos rank sum test with reads that are informative but don't actually overlap the variant due to some hard clipping.
-- Updated a few integration tests for HC, UG, and UG general ploidy
This commit is contained in:
parent
8eda0c50df
commit
c025e84c8b
|
|
@ -108,6 +108,9 @@ public class ReadPosRankSumTest extends RankSumTest implements StandardAnnotatio
|
||||||
continue; // read is non-informative
|
continue; // read is non-informative
|
||||||
|
|
||||||
final GATKSAMRecord read = el.getKey();
|
final GATKSAMRecord read = el.getKey();
|
||||||
|
if ( read.getSoftStart() + read.getCigar().getReadLength() <= refLoc ) { // make sure the read actually covers the requested ref loc
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int offset = ReadUtils.getReadCoordinateForReferenceCoordinate( read.getSoftStart(), read.getCigar(), refLoc, ReadUtils.ClippingTail.RIGHT_TAIL, true );
|
final int offset = ReadUtils.getReadCoordinateForReferenceCoordinate( read.getSoftStart(), read.getCigar(), refLoc, ReadUtils.ClippingTail.RIGHT_TAIL, true );
|
||||||
if ( offset == ReadUtils.CLIPPING_GOAL_NOT_REACHED || read.getCigar() == null )
|
if ( offset == ReadUtils.CLIPPING_GOAL_NOT_REACHED || read.getCigar() == null )
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -116,12 +116,12 @@ public class UnifiedGenotyperGeneralPloidyIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testINDEL_maxAltAlleles2_ploidy3_Pools_noRef() {
|
public void testINDEL_maxAltAlleles2_ploidy3_Pools_noRef() {
|
||||||
PC_LSV_Test_NoRef(" -maxAltAlleles 2 -ploidy 3","LSV_INDEL_DISC_NOREF_p3","INDEL","ae70e023e2b5f70d99bde2458f0a1f58");
|
PC_LSV_Test_NoRef(" -maxAltAlleles 2 -ploidy 3","LSV_INDEL_DISC_NOREF_p3","INDEL","3a321896c4b8b6457973c76c486da4d4");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testINDEL_maxAltAlleles2_ploidy1_Pools_noRef() {
|
public void testINDEL_maxAltAlleles2_ploidy1_Pools_noRef() {
|
||||||
PC_LSV_Test_NoRef(" -maxAltAlleles 2 -ploidy 1","LSV_INDEL_DISC_NOREF_p1","INDEL","fed2c8fc5100a388e9773bb98bf98750");
|
PC_LSV_Test_NoRef(" -maxAltAlleles 2 -ploidy 1","LSV_INDEL_DISC_NOREF_p1","INDEL","5812da66811887d834d0379a33e655c0");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
||||||
public void testMismatchedPLs() {
|
public void testMismatchedPLs() {
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
"-T UnifiedGenotyper -R " + b37KGReference + " --no_cmdline_in_header -glm INDEL -I " + privateTestDir + "mismatchedPLs.bam -o %s -L 1:24020341", 1,
|
"-T UnifiedGenotyper -R " + b37KGReference + " --no_cmdline_in_header -glm INDEL -I " + privateTestDir + "mismatchedPLs.bam -o %s -L 1:24020341", 1,
|
||||||
Arrays.asList("0636c9ad2a83713c8d2cb08154043222"));
|
Arrays.asList("de2c5707c1805d17d70acaecd36b7372"));
|
||||||
executeTest("test mismatched PLs", spec);
|
executeTest("test mismatched PLs", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
||||||
@Test
|
@Test
|
||||||
public void testHaplotypeCallerMultiSampleGGAComplex() {
|
public void testHaplotypeCallerMultiSampleGGAComplex() {
|
||||||
HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538",
|
HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538",
|
||||||
"262e4c9a55baf1936a65612cfb1f6f81");
|
"719402122fe92cfe7a3fa6b7cdb66f26");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -113,7 +113,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testHaplotypeCallerMultiSampleComplex() {
|
public void testHaplotypeCallerMultiSampleComplex() {
|
||||||
HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "fa55ef57354d1f69dabae711bc09b62e");
|
HCTestComplexVariants(privateTestDir + "AFR.complex.variants.bam", "", "88ae6e7b34514043bfc78b1ecf29a341");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HCTestSymbolicVariants(String bam, String args, String md5) {
|
private void HCTestSymbolicVariants(String bam, String args, String md5) {
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ public final class AlignmentUtils {
|
||||||
|
|
||||||
switch (ce.getOperator()) {
|
switch (ce.getOperator()) {
|
||||||
case I:
|
case I:
|
||||||
case S:
|
case S: // TODO -- I don't think that soft clips should be treated the same as inserted bases here. Investigation needed.
|
||||||
pos += elementLength;
|
pos += elementLength;
|
||||||
if (pos >= pileupOffset) {
|
if (pos >= pileupOffset) {
|
||||||
return alignmentPos;
|
return alignmentPos;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue