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:
Ryan Poplin 2013-02-15 14:46:56 -05:00
parent 8eda0c50df
commit c025e84c8b
5 changed files with 9 additions and 6 deletions

View File

@ -108,6 +108,9 @@ public class ReadPosRankSumTest extends RankSumTest implements StandardAnnotatio
continue; // read is non-informative
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 );
if ( offset == ReadUtils.CLIPPING_GOAL_NOT_REACHED || read.getCigar() == null )
continue;

View File

@ -116,12 +116,12 @@ public class UnifiedGenotyperGeneralPloidyIntegrationTest extends WalkerTest {
@Test(enabled = true)
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)
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)

View File

@ -132,7 +132,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
public void testMismatchedPLs() {
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,
Arrays.asList("0636c9ad2a83713c8d2cb08154043222"));
Arrays.asList("de2c5707c1805d17d70acaecd36b7372"));
executeTest("test mismatched PLs", spec);
}

View File

@ -96,7 +96,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
@Test
public void testHaplotypeCallerMultiSampleGGAComplex() {
HCTestComplexGGA(NA12878_CHR20_BAM, "-L 20:119673-119823 -L 20:121408-121538",
"262e4c9a55baf1936a65612cfb1f6f81");
"719402122fe92cfe7a3fa6b7cdb66f26");
}
@Test
@ -113,7 +113,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest {
@Test
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) {

View File

@ -297,7 +297,7 @@ public final class AlignmentUtils {
switch (ce.getOperator()) {
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;
if (pos >= pileupOffset) {
return alignmentPos;