Some basic integration tests detecting breakage in OTF BAM index generation.
Doing it manually for the moment so that there's at least something testing this capability; will followup eventually with Mark to see whether we can shape the VCF index generation code in such a way that it supports BAM index testing as well. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5093 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
466f8f8a3c
commit
4a33cdacde
|
|
@ -247,4 +247,11 @@ public class WalkerTest extends BaseTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected File createTempFileFromBase(String name) {
|
||||||
|
File fl = new File(name);
|
||||||
|
fl.deleteOnExit();
|
||||||
|
return fl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,4 @@ public class DepthOfCoverageIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
execute("testNoCoverageDueToFiltering",spec);
|
execute("testNoCoverageDueToFiltering",spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
public File createTempFileFromBase(String name) {
|
|
||||||
File fl = new File(name);
|
|
||||||
fl.deleteOnExit();
|
|
||||||
return fl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ package org.broadinstitute.sting.utils.interval;
|
||||||
import org.broadinstitute.sting.WalkerTest;
|
import org.broadinstitute.sting.WalkerTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
|
@ -63,31 +64,41 @@ public class IntervalIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUnmappedReadInclusion() {
|
public void testUnmappedReadInclusion() {
|
||||||
String md5 = "fcd11cfa8474472c617d400623a30fcd";
|
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
"-T PrintReads" +
|
"-T PrintReads" +
|
||||||
" -I " + validationDataLocation + "MV1994.bam" +
|
" -I " + validationDataLocation + "MV1994.bam" +
|
||||||
" -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" +
|
" -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" +
|
||||||
" -L unmapped" +
|
" -L unmapped" +
|
||||||
" -o %s" +
|
" -U --index_output_bam_on_the_fly",
|
||||||
" -U",
|
0, // two output files
|
||||||
1, // just one output file
|
Collections.<String>emptyList());
|
||||||
Arrays.asList(md5));
|
|
||||||
|
// our base file
|
||||||
|
File baseOutputFile = createTempFile("testUnmappedReadInclusion",".bam");
|
||||||
|
this.setOutputFileLocation(baseOutputFile);
|
||||||
|
spec.addAuxFile("fcd11cfa8474472c617d400623a30fcd",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
|
||||||
|
spec.addAuxFile("3d1f077727e6b68e20a2095d034e56d7", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));
|
||||||
|
|
||||||
executeTest("testUnmappedReadInclusion",spec);
|
executeTest("testUnmappedReadInclusion",spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = true)
|
@Test(enabled = true)
|
||||||
public void testUnmappedReadExclusion() {
|
public void testUnmappedReadExclusion() {
|
||||||
String md5 = "3153593c9f9ff80a8551fff5655e65ec";
|
|
||||||
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
"-T PrintReads" +
|
"-T PrintReads" +
|
||||||
" -I " + validationDataLocation + "MV1994.bam" +
|
" -I " + validationDataLocation + "MV1994.bam" +
|
||||||
" -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" +
|
" -R " + validationDataLocation + "Escherichia_coli_K12_MG1655.fasta" +
|
||||||
" -XL unmapped" +
|
" -XL unmapped" +
|
||||||
" -o %s" +
|
" -U --index_output_bam_on_the_fly",
|
||||||
" -U",
|
0, // two output files
|
||||||
1, // just one output file
|
Collections.<String>emptyList());
|
||||||
Arrays.asList(md5));
|
|
||||||
|
// our base file
|
||||||
|
File baseOutputFile = createTempFile("testUnmappedReadExclusion",".bam");
|
||||||
|
this.setOutputFileLocation(baseOutputFile);
|
||||||
|
spec.addAuxFile("3153593c9f9ff80a8551fff5655e65ec",createTempFileFromBase(baseOutputFile.getAbsolutePath()));
|
||||||
|
spec.addAuxFile("7fc574ac72211623e4df74d9f75a4e48", createTempFileFromBase(baseOutputFile.getAbsolutePath().substring(0,baseOutputFile.getAbsolutePath().indexOf(".bam"))+".bai"));
|
||||||
|
|
||||||
executeTest("testUnmappedReadExclusion",spec);
|
executeTest("testUnmappedReadExclusion",spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue