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:
parent
f840d9edbd
commit
dc4dcb4140
|
|
@ -72,7 +72,7 @@ public class DepthPerAlleleBySample extends GenotypeAnnotation implements Standa
|
||||||
ReadBackedPileup pileup = stratifiedContext.getBasePileup();
|
ReadBackedPileup pileup = stratifiedContext.getBasePileup();
|
||||||
for ( PileupElement p : pileup ) {
|
for ( PileupElement p : pileup ) {
|
||||||
if ( alleleCounts.containsKey(p.getBase()) )
|
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
|
// we need to add counts in the correct order
|
||||||
|
|
|
||||||
|
|
@ -438,4 +438,18 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
||||||
Arrays.asList("22c9fd65ce3298bd7fbf400c9c209f29"));
|
Arrays.asList("22c9fd65ce3298bd7fbf400c9c209f29"));
|
||||||
executeTest("test calling on reads with Ns in CIGAR", spec);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue