fixed AD annotation for a ReducedReads BAM file. Added an integration test for this case with a new reduced BAM in private/testdata

This commit is contained in:
Yossi Farjoun 2012-10-05 14:20:07 -04:00
parent f840d9edbd
commit dc4dcb4140
2 changed files with 15 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class DepthPerAlleleBySample extends GenotypeAnnotation implements Standa
ReadBackedPileup pileup = stratifiedContext.getBasePileup();
for ( PileupElement p : pileup ) {
if ( alleleCounts.containsKey(p.getBase()) )
alleleCounts.put(p.getBase(), alleleCounts.get(p.getBase())+1);
alleleCounts.put(p.getBase(), alleleCounts.get(p.getBase())+p.getRepresentativeCount());
}
// we need to add counts in the correct order

View File

@ -438,4 +438,18 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
Arrays.asList("22c9fd65ce3298bd7fbf400c9c209f29"));
executeTest("test calling on reads with Ns in CIGAR", spec);
}
// --------------------------------------------------------------------------------------------------------------
//
// testing AD for reduced reads
//
// --------------------------------------------------------------------------------------------------------------
@Test
public void testADAnnotationInReducedBam() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -I " + privateTestDir + "bamExample.ReducedRead.ADAnnotation.bam -o %s -L 1:67,225,396-67,288,518", 1,
Arrays.asList("84486c88a0fd1ae996a6402490db8492"));
executeTest("test AD Annotation when calling on a ReducedRead BAM", spec);
}
}