Added support to reduce reads to Callable Loci

-- added calls to representativeCount() of the pileup instead of using ++
-- renamed CallableLoci integration test
-- added integration test for reduce read support on callable loci
This commit is contained in:
Mauricio Carneiro 2013-03-21 15:29:27 -04:00
parent c15453542e
commit eb33da6820
2 changed files with 16 additions and 6 deletions

View File

@ -40,7 +40,6 @@ import org.broadinstitute.sting.utils.exceptions.UserException;
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
import org.broadinstitute.sting.utils.help.HelpConstants;
import org.broadinstitute.sting.utils.pileup.PileupElement;
import org.broadinstitute.sting.utils.BaseUtils;
import java.io.File;
import java.io.FileNotFoundException;
@ -314,13 +313,14 @@ public class CallableLoci extends LocusWalker<CallableLoci.CallableBaseState, Ca
// count up the depths of all and QC+ bases
int rawDepth = 0, QCDepth = 0, lowMAPQDepth = 0;
for (PileupElement e : context.getBasePileup()) {
rawDepth++;
final int depth = e.getRepresentativeCount();
rawDepth += depth;
if (e.getMappingQual() <= maxLowMAPQ)
lowMAPQDepth++;
lowMAPQDepth += depth;
if (e.getMappingQual() >= minMappingQuality && (e.getQual() >= minBaseQuality || e.isDeletion())) {
QCDepth++;
QCDepth += depth;
}
}

View File

@ -30,8 +30,9 @@ import org.testng.annotations.Test;
import java.util.Arrays;
public class CallableLociWalkerIntegrationTest extends WalkerTest {
final static String commonArgs = "-R " + b36KGReference + " -T CallableLoci -I " + validationDataLocation + "/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s";
public class CallableLociIntegrationTest extends WalkerTest {
final static String commonArgs = "-R " + b36KGReference + " -T CallableLoci -I " + validationDataLocation + "/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -o %s";
final static String reduceReadArgs = "-R " + b37KGReference + " -T CallableLoci -I " + " private/testdata/NA12878.HiSeq.b37.chr20.10_11mb.reduced.bam -o %s";
final static String SUMMARY_MD5 = "ffdbd9cdcb4169ebed5ae4bec797260f";
@ -66,4 +67,13 @@ public class CallableLociWalkerIntegrationTest extends WalkerTest {
Arrays.asList("46a53379aaaf9803276a0a34b234f6ab", "da431d393f7c2b2b3e27556b86c1dbc7"));
executeTest("formatBed lots of arguments", spec);
}
@Test(enabled=true)
public void testWithReducedRead() {
String gatk_args = reduceReadArgs + " -L 20:10,000,000-11,000,000 -minDepth 10 -maxDepth 100 --minBaseQuality 10 --minMappingQuality 20 -summary %s";
WalkerTestSpec spec = new WalkerTestSpec(gatk_args, 1,
Arrays.asList("684069ffe94a1175051066ed53f0fd9d", "ebc310cf734d98e26d2d83e16b1144d1"));
executeTest("CallableLoci with ReducedRead", spec);
}
}