From acfe83920b8a84f5bc1b596a1b1f85a87ed78213 Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 15 Dec 2010 23:11:46 +0000 Subject: [PATCH] '-L unmapped': adding integration tests for explicitly including (-L unmapped) unmapped reads and explicitly excluding (-XL unmapped) unmapped reads, augmenting the suite of unit tests already put in place. '-L unmapped' seems safe to use; go for it, but please validate results against samtools flagstat when the process finishes. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4849 348d0f76-0448-11de-a6fe-93d51630548a --- .../interval/IntervalIntegrationTest.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java b/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java index bf085e69e..98df83254 100644 --- a/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java @@ -60,4 +60,36 @@ public class IntervalIntegrationTest extends WalkerTest { Arrays.asList(md5)); executeTest("testAllIntervalsExplicit",spec); } + + @Test + public void testUnmappedReadInclusion() { + String md5 = "fcd11cfa8474472c617d400623a30fcd"; + WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( + "-T PrintReads" + + " -I " + validationDataLocation + "MV1994.bam" + + " -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" + + " -L unmapped" + + " -o %s" + + " -U", + 1, // just one output file + Arrays.asList(md5)); + executeTest("testUnmappedReadInclusion",spec); + } + + @Test + public void testUnmappedReadExclusion() { + String md5 = "3153593c9f9ff80a8551fff5655e65ec"; + WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( + "-T PrintReads" + + " -I " + validationDataLocation + "MV1994.bam" + + " -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" + + " -XL unmapped" + + " -o %s" + + " -U", + 1, // just one output file + Arrays.asList(md5)); + executeTest("testUnmappedReadExclusion",spec); + } + + }