2009-09-09 23:36:12 +08:00
|
|
|
package org.broadinstitute.sting.gatk.walkers;
|
|
|
|
|
|
|
|
|
|
import org.broadinstitute.sting.WalkerTest;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
|
|
|
|
public class DepthOfCoverageIntegrationTest extends WalkerTest {
|
2009-12-29 15:40:48 +08:00
|
|
|
private static String root = "-L 1:10,164,500-10,164,520 -R " + oneKGLocation + "reference/human_b36_both.fasta -T DepthOfCoverage -I " + validationDataLocation + "NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam";
|
2009-09-09 23:36:12 +08:00
|
|
|
static HashMap<String, String> expectations = new HashMap<String, String>();
|
|
|
|
|
static {
|
2009-12-04 01:01:53 +08:00
|
|
|
expectations.put("-minMAPQ 1", "8b73fad5cce4620907d5da2a985219d5");
|
|
|
|
|
expectations.put("-minMAPQ 100", "1a959892d8ad0523dac2fb097eacb3c2");
|
2009-12-04 10:15:43 +08:00
|
|
|
expectations.put("-minDepth 8", "6d549e5a5c4c55420d68e0221a955a0e");
|
|
|
|
|
expectations.put("-minDepth 10", "a367c894e6a48ebb107d2fe004cdfee7");
|
2009-12-04 01:01:53 +08:00
|
|
|
expectations.put("-bySample", "93358437153b4d65bdff747e33de1d63");
|
|
|
|
|
expectations.put("-byRG", "777e8427eb4bdad300b23800cb7b0592");
|
|
|
|
|
expectations.put("-histogram", "96f15e1d9d598d48191e20ee84715d46");
|
2009-12-04 01:23:59 +08:00
|
|
|
expectations.put("-bases", "baafcb2b90098cad1c5950da9e9932a6");
|
2009-12-04 10:15:43 +08:00
|
|
|
expectations.put("-minMAPQ 1 -bySample -byRG -minDepth 8 -histogram -bases", "bf2094b33e0e10fc11a7216bc1097a8b");
|
2009-09-09 23:36:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testDepthOfCoverage1() {
|
|
|
|
|
|
|
|
|
|
for ( Map.Entry<String, String> entry : expectations.entrySet() ) {
|
|
|
|
|
String extraArgs = entry.getKey();
|
|
|
|
|
String md5 = entry.getValue();
|
|
|
|
|
|
|
|
|
|
WalkerTestSpec spec = new WalkerTestSpec( root + " " + extraArgs + " -o %s",
|
|
|
|
|
1, // just one output file
|
|
|
|
|
Arrays.asList(md5));
|
|
|
|
|
executeTest("testDepthOfCoverage1", spec);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testDepthOfCoverage454() {
|
|
|
|
|
WalkerTestSpec spec = new WalkerTestSpec(
|
2009-12-29 15:40:48 +08:00
|
|
|
"-T DepthOfCoverage -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "NA12873.454.SRP000031.2009_06.chr1.10_20mb.bam -L 1:10,001,890-10,001,895 -o %s",
|
2009-09-09 23:36:12 +08:00
|
|
|
1, // just one output file
|
2009-12-04 01:01:53 +08:00
|
|
|
Arrays.asList("a332d1539b29dff615b198818a3d4dd1"));
|
2009-09-09 23:36:12 +08:00
|
|
|
executeTest("testDepthOfCoverage454", spec);
|
2010-03-05 09:04:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testDepthOfCoverageNoIntervals() {
|
|
|
|
|
WalkerTestSpec spec = new WalkerTestSpec( "-T DepthOfCoverage -R " + validationDataLocation + "human_b36_both.partial.fasta -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -o %s",
|
|
|
|
|
1, // just one output file
|
|
|
|
|
Arrays.asList("7b8fc75dd1995d270831b31c268392a5"));
|
|
|
|
|
executeTest("testDepthOfCoverageNoIntervals", spec);
|
|
|
|
|
}
|
2009-09-09 23:36:12 +08:00
|
|
|
}
|