Now passing in the path to the GATK directory to tests.
Changed tests and scripts to use gatkdir full path instead of relative testdata/qscripts symbolic links.
Although symlinks not created, left the symlink deletion script execution with a comment about future removal.
Re-enabled example UG pipeline queue test.
Replaced all hardcoded strings of {public,private}/testdata with BaseTest variables.
Refactored temp list creation method from ListFileUtilsUnitTest to BaseTest.createTempListFile.
Removed list files with hardcoded paths, now using createTempListFile instead with private test dir variable.
This commit is contained in:
parent
9477a6ab1a
commit
fcb0eca203
175
pom.xml
175
pom.xml
|
|
@ -412,131 +412,10 @@
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- TODO: Remove temporary symbolic link creation, after fixing test paths to use local resources. -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.pyx4j</groupId>
|
<groupId>com.pyx4j</groupId>
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
<artifactId>maven-junction-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
|
||||||
<id>link-public-testdata</id>
|
|
||||||
<goals>
|
|
||||||
<goal>link</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/public/testdata</dst>
|
|
||||||
<src>${gatk.basedir}/public/gatk-engine/src/test/resources</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-testdata</id>
|
|
||||||
<goals>
|
|
||||||
<goal>unlink</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/public/testdata</dst>
|
|
||||||
<src>${gatk.basedir}/public/gatk-engine/src/test/resources</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<goals>
|
|
||||||
<goal>link</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/private/testdata</dst>
|
|
||||||
<src>${gatk.basedir}/private/gatk-tools-private/src/test/resources</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<goals>
|
|
||||||
<goal>unlink</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/private/testdata</dst>
|
|
||||||
<src>${gatk.basedir}/private/gatk-tools-private/src/test/resources</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-qscript</id>
|
|
||||||
<goals>
|
|
||||||
<goal>link</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/public/scala/qscript</dst>
|
|
||||||
<src>${gatk.basedir}/public/gatk-queue-extensions-public/src/main/qscripts</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-qscript</id>
|
|
||||||
<goals>
|
|
||||||
<goal>unlink</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/public/scala/qscript</dst>
|
|
||||||
<src>${gatk.basedir}/public/gatk-queue-extensions-public/src/main/qscripts</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<goals>
|
|
||||||
<goal>link</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/private/scala/qscript</dst>
|
|
||||||
<src>${gatk.basedir}/private/gatk-queue-extensions-internal/src/main/qscripts</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<goals>
|
|
||||||
<goal>unlink</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>none</phase>
|
|
||||||
<configuration>
|
|
||||||
<links>
|
|
||||||
<link>
|
|
||||||
<dst>${basedir}/private/scala/qscript</dst>
|
|
||||||
<src>${gatk.basedir}/private/gatk-queue-extensions-internal/src/main/qscripts</src>
|
|
||||||
</link>
|
|
||||||
</links>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<!--
|
<!--
|
||||||
HACK: Adding the source directory via build-helper-maven-plugin doesn't work with IntelliJ.
|
HACK: Adding the source directory via build-helper-maven-plugin doesn't work with IntelliJ.
|
||||||
Add compatibility link from public's extensions source code to target/generated-sources.
|
Add compatibility link from public's extensions source code to target/generated-sources.
|
||||||
|
|
@ -746,6 +625,11 @@
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
<!--
|
||||||
|
TODO: Remove after 3.3+ release.
|
||||||
|
Until then, will clean out symbolic links from users who download public/protected.
|
||||||
|
Perhaps leave the script even longer.
|
||||||
|
-->
|
||||||
<id>delete-mavens-links</id>
|
<id>delete-mavens-links</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>exec</goal>
|
<goal>exec</goal>
|
||||||
|
|
@ -762,28 +646,6 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
|
@ -869,33 +731,6 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>private</module>
|
<module>private</module>
|
||||||
</modules>
|
</modules>
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<!-- Collection of properties for use during package testing -->
|
<!-- Collection of properties for use during package testing -->
|
||||||
|
|
|
||||||
|
|
@ -231,33 +231,6 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>packagetests-enabled</id>
|
<id>packagetests-enabled</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
|
|
||||||
|
|
@ -134,24 +134,6 @@
|
||||||
<groupId>org.scala-tools</groupId>
|
<groupId>org.scala-tools</groupId>
|
||||||
<artifactId>maven-scala-plugin</artifactId>
|
<artifactId>maven-scala-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-extensions-sources</id>
|
|
||||||
<phase>generate-sources</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-invoker-plugin</artifactId>
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
|
@ -176,42 +158,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -50,18 +50,19 @@ import org.testng.annotations.{DataProvider, Test}
|
||||||
import org.broadinstitute.gatk.queue.pipeline.{QueueTest, QueueTestSpec}
|
import org.broadinstitute.gatk.queue.pipeline.{QueueTest, QueueTestSpec}
|
||||||
import org.broadinstitute.gatk.utils.BaseTest
|
import org.broadinstitute.gatk.utils.BaseTest
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO: Tests are all currently disabled until we fix the paths to use the qscript directory, or as a patch the gatk.basedir as a passed in variable.
|
|
||||||
*/
|
|
||||||
class ExampleUnifiedGenotyperQueueTest {
|
class ExampleUnifiedGenotyperQueueTest {
|
||||||
@Test(timeOut=36000000, enabled=false)
|
private final val exampleUGQScript = QueueTest.protectedQScriptsPackageDir + "examples/ExampleUnifiedGenotyper.scala"
|
||||||
|
private final val exampleFasta = BaseTest.publicTestDir + "exampleFASTA.fasta"
|
||||||
|
private final val exampleBam = BaseTest.publicTestDir + "exampleBAM.bam"
|
||||||
|
|
||||||
|
@Test(timeOut=36000000)
|
||||||
def testUnifiedGenotyper() {
|
def testUnifiedGenotyper() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "unifiedgenotyper"
|
spec.name = "unifiedgenotyper"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleUnifiedGenotyper.scala",
|
" -S " + exampleUGQScript,
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + exampleFasta,
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + exampleBam,
|
||||||
" -filter QD",
|
" -filter QD",
|
||||||
" -filterExpression 'QD < 2.0'").mkString
|
" -filterExpression 'QD < 2.0'").mkString
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
|
|
@ -76,27 +77,27 @@ class ExampleUnifiedGenotyperQueueTest {
|
||||||
Array("vcf_intervals", BaseTest.validationDataLocation + "intervalTest.1.vcf")
|
Array("vcf_intervals", BaseTest.validationDataLocation + "intervalTest.1.vcf")
|
||||||
).asInstanceOf[Array[Array[Object]]]
|
).asInstanceOf[Array[Array[Object]]]
|
||||||
|
|
||||||
@Test(dataProvider = "ugIntervals", timeOut=36000000, enabled=false)
|
@Test(dataProvider = "ugIntervals", timeOut=36000000)
|
||||||
def testUnifiedGenotyperWithIntervals(intervalsName: String, intervalsPath: String) {
|
def testUnifiedGenotyperWithIntervals(intervalsName: String, intervalsPath: String) {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "unifiedgenotyper_with_" + intervalsName
|
spec.name = "unifiedgenotyper_with_" + intervalsName
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleUnifiedGenotyper.scala",
|
" -S " + exampleUGQScript,
|
||||||
" -I " + BaseTest.validationDataLocation + "OV-0930.normal.chunk.bam",
|
|
||||||
" -R " + BaseTest.hg18Reference,
|
" -R " + BaseTest.hg18Reference,
|
||||||
|
" -I " + BaseTest.validationDataLocation + "OV-0930.normal.chunk.bam",
|
||||||
" -L " + intervalsPath).mkString
|
" -L " + intervalsPath).mkString
|
||||||
spec.jobRunners = Seq("Lsf706")
|
spec.jobRunners = Seq("Lsf706")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeOut=36000000, enabled=false)
|
@Test(timeOut=36000000)
|
||||||
def testUnifiedGenotyperNoGCOpt() {
|
def testUnifiedGenotyperNoGCOpt() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "unifiedgenotyper_no_gc_opt"
|
spec.name = "unifiedgenotyper_no_gc_opt"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleUnifiedGenotyper.scala",
|
" -S " + exampleUGQScript,
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + exampleFasta,
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + exampleBam,
|
||||||
" -noGCOpt").mkString
|
" -noGCOpt").mkString
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -105,27 +106,27 @@ class ExampleUnifiedGenotyperQueueTest {
|
||||||
@DataProvider(name="resMemReqParams")
|
@DataProvider(name="resMemReqParams")
|
||||||
def getResMemReqParam = Array(Array("mem_free"), Array("virtual_free")).asInstanceOf[Array[Array[Object]]]
|
def getResMemReqParam = Array(Array("mem_free"), Array("virtual_free")).asInstanceOf[Array[Array[Object]]]
|
||||||
|
|
||||||
@Test(dataProvider = "resMemReqParams", timeOut=36000000, enabled=false)
|
@Test(dataProvider = "resMemReqParams", timeOut=36000000)
|
||||||
def testUnifiedGenotyperResMemReqParam(reqParam: String) {
|
def testUnifiedGenotyperResMemReqParam(reqParam: String) {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "unifiedgenotyper_" + reqParam
|
spec.name = "unifiedgenotyper_" + reqParam
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleUnifiedGenotyper.scala",
|
" -S " + exampleUGQScript,
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + exampleFasta,
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + exampleBam,
|
||||||
" -resMemReqParam " + reqParam).mkString
|
" -resMemReqParam " + reqParam).mkString
|
||||||
spec.jobRunners = Seq("GridEngine")
|
spec.jobRunners = Seq("GridEngine")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeOut=36000000, enabled=false)
|
@Test(timeOut=36000000)
|
||||||
def testUnifiedGenotyperLogDirectory() {
|
def testUnifiedGenotyperLogDirectory() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "unifiedgenotyper_with_log_directory"
|
spec.name = "unifiedgenotyper_with_log_directory"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleUnifiedGenotyper.scala",
|
" -S " + exampleUGQScript,
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + exampleFasta,
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + exampleBam,
|
||||||
" -logDir exampleUGLogDir").mkString
|
" -logDir exampleUGLogDir").mkString
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
spec.expectedFilePaths :+= "exampleUGLogDir/exampleBAM.unfiltered.vcf.out"
|
spec.expectedFilePaths :+= "exampleUGLogDir/exampleBAM.unfiltered.vcf.out"
|
||||||
|
|
|
||||||
|
|
@ -238,41 +238,6 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>packagetests-enabled</id>
|
<id>packagetests-enabled</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
|
|
||||||
|
|
@ -107,34 +107,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
package org.broadinstitute.gatk.engine.walkers.diffengine;
|
package org.broadinstitute.gatk.engine.walkers.diffengine;
|
||||||
|
|
||||||
import org.broadinstitute.gatk.engine.walkers.WalkerTest;
|
import org.broadinstitute.gatk.engine.walkers.WalkerTest;
|
||||||
|
import org.broadinstitute.gatk.utils.BaseTest;
|
||||||
import org.testng.annotations.DataProvider;
|
import org.testng.annotations.DataProvider;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
|
@ -84,7 +85,7 @@ public class DiffObjectsIntegrationTest extends WalkerTest {
|
||||||
@Test(enabled = true, dataProvider = "data")
|
@Test(enabled = true, dataProvider = "data")
|
||||||
public void testDiffs(TestParams params) {
|
public void testDiffs(TestParams params) {
|
||||||
WalkerTestSpec spec = new WalkerTestSpec(
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
"-T DiffObjects -R public/testdata/exampleFASTA.fasta "
|
"-T DiffObjects -R " + publicTestDir + "exampleFASTA.fasta "
|
||||||
+ " -m " + params.master
|
+ " -m " + params.master
|
||||||
+ " -t " + params.test
|
+ " -t " + params.test
|
||||||
+ (params.doPairwise ? " -doPairwise " : "")
|
+ (params.doPairwise ? " -doPairwise " : "")
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,11 @@ import java.util.Arrays;
|
||||||
public class PairHMMProbabilityBugIntegrationTest extends WalkerTest {
|
public class PairHMMProbabilityBugIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
private static final File REFERENCE = new File("/humgen/gsa-hpprojects/GATK/bundle/current/hg19/ucsc.hg19.fasta").getAbsoluteFile();
|
private static final File REFERENCE = new File("/humgen/gsa-hpprojects/GATK/bundle/current/hg19/ucsc.hg19.fasta").getAbsoluteFile();
|
||||||
private static final File BAM = new File ("private/testdata", "pairhmm_prob_bug.bam").getAbsoluteFile();
|
private static final File BAM = new File (privateTestDir, "pairhmm_prob_bug.bam").getAbsoluteFile();
|
||||||
private static final File INTERVAL = new File ("private/testdata", "pairhmm_prob_bug.interval.bed").getAbsoluteFile();
|
private static final File INTERVAL = new File (privateTestDir, "pairhmm_prob_bug.interval.bed").getAbsoluteFile();
|
||||||
|
|
||||||
private static final File UG_BAM = new File("private/testdata", "pairhmm_prob_bug.ug.bam").getAbsoluteFile();
|
private static final File UG_BAM = new File(privateTestDir, "pairhmm_prob_bug.ug.bam").getAbsoluteFile();
|
||||||
private static final File UG_INTERVAL = new File("private/testdata", "pairhmm_prob_bug.ug.intervals.bed").getAbsoluteFile();
|
private static final File UG_INTERVAL = new File(privateTestDir, "pairhmm_prob_bug.ug.intervals.bed").getAbsoluteFile();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@
|
||||||
<failIfNoTests>false</failIfNoTests>
|
<failIfNoTests>false</failIfNoTests>
|
||||||
<!-- Pass various system properties -->
|
<!-- Pass various system properties -->
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
|
<gatkdir>${gatk.basedir}</gatkdir>
|
||||||
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -204,6 +205,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*UnitTest.class</include>
|
<include>**/*UnitTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>unit</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
@ -220,6 +224,7 @@
|
||||||
<failIfNoTests>false</failIfNoTests>
|
<failIfNoTests>false</failIfNoTests>
|
||||||
<!-- Pass various system properties -->
|
<!-- Pass various system properties -->
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
|
<gatkdir>${gatk.basedir}</gatkdir>
|
||||||
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -236,6 +241,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*IntegrationTest.class</include>
|
<include>**/*IntegrationTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>integrationtest</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
||||||
|
|
@ -91,35 +91,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -141,20 +141,6 @@
|
||||||
<groupId>org.scala-tools</groupId>
|
<groupId>org.scala-tools</groupId>
|
||||||
<artifactId>maven-scala-plugin</artifactId>
|
<artifactId>maven-scala-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-invoker-plugin</artifactId>
|
<artifactId>maven-invoker-plugin</artifactId>
|
||||||
|
|
@ -179,42 +165,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class ExampleCountLociQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "countloci"
|
spec.name = "countloci"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleCountLoci.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExampleCountLoci.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
||||||
" -o " + testOut).mkString
|
" -o " + testOut).mkString
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class ExampleCountReadsQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "countreads"
|
spec.name = "countreads"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleCountReads.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExampleCountReads.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam").mkString
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam").mkString
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class ExamplePrintReadsQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "devnulloutput"
|
spec.name = "devnulloutput"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExamplePrintReads.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExamplePrintReads.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
||||||
" -out /dev/null").mkString
|
" -out /dev/null").mkString
|
||||||
|
|
@ -72,7 +72,7 @@ class ExamplePrintReadsQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "cleanupbai"
|
spec.name = "cleanupbai"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExamplePrintReads.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExamplePrintReads.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
||||||
" -out exampleOut.bam").mkString
|
" -out exampleOut.bam").mkString
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class ExampleReadFilterQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "examplereadfilter"
|
spec.name = "examplereadfilter"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleReadFilter.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExampleReadFilter.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam").mkString
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam").mkString
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class ExampleRetryMemoryLimitQueueTest {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "RetryMemoryLimit"
|
spec.name = "RetryMemoryLimit"
|
||||||
spec.args = Array(
|
spec.args = Array(
|
||||||
" -S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/ExampleRetryMemoryLimit.scala",
|
" -S " + QueueTest.publicQScriptsPackageDir + "examples/ExampleRetryMemoryLimit.scala",
|
||||||
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
" -R " + BaseTest.publicTestDir + "exampleFASTA.fasta",
|
||||||
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
" -I " + BaseTest.publicTestDir + "exampleBAM.bam",
|
||||||
" -retry 1").mkString
|
" -retry 1").mkString
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorld() {
|
def testHelloWorld() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorld"
|
spec.name = "HelloWorld"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala"
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +42,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithRunName() {
|
def testHelloWorldWithRunName() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithRunName"
|
spec.name = "HelloWorldWithRunName"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -runName HelloWorld"
|
" -runName HelloWorld"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -52,7 +52,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithMemoryLimit() {
|
def testHelloWorldWithMemoryLimit() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldMemoryLimit"
|
spec.name = "HelloWorldMemoryLimit"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -memLimit 1.25"
|
" -memLimit 1.25"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -62,7 +62,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithPriority() {
|
def testHelloWorldWithPriority() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithPriority"
|
spec.name = "HelloWorldWithPriority"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -jobPriority 100"
|
" -jobPriority 100"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -72,7 +72,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithLsfResource() {
|
def testHelloWorldWithLsfResource() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithLsfResource"
|
spec.name = "HelloWorldWithLsfResource"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -jobResReq rusage[iodine_io=1] -jobResReq select[swp>0] -jobResReq order[swp]"
|
" -jobResReq rusage[iodine_io=1] -jobResReq select[swp>0] -jobResReq order[swp]"
|
||||||
spec.jobRunners = Seq("Lsf706")
|
spec.jobRunners = Seq("Lsf706")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -82,7 +82,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithLsfResourceAndMemoryLimit() {
|
def testHelloWorldWithLsfResourceAndMemoryLimit() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithLsfResourceAndMemoryLimit"
|
spec.name = "HelloWorldWithLsfResourceAndMemoryLimit"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -memLimit 1.25 -jobResReq rusage[iodine_io=1] -jobResReq select[swp>0] -jobResReq order[swp]"
|
" -memLimit 1.25 -jobResReq rusage[iodine_io=1] -jobResReq select[swp>0] -jobResReq order[swp]"
|
||||||
spec.jobRunners = Seq("Lsf706")
|
spec.jobRunners = Seq("Lsf706")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -92,7 +92,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithLsfEnvironment() {
|
def testHelloWorldWithLsfEnvironment() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithLsfEnvironment"
|
spec.name = "HelloWorldWithLsfEnvironment"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -jobEnv tv"
|
" -jobEnv tv"
|
||||||
spec.jobRunners = Seq("Lsf706")
|
spec.jobRunners = Seq("Lsf706")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -102,7 +102,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithGridEngineResource() {
|
def testHelloWorldWithGridEngineResource() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithGridEngineResource"
|
spec.name = "HelloWorldWithGridEngineResource"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -jobResReq s_core=1000M"
|
" -jobResReq s_core=1000M"
|
||||||
spec.jobRunners = Seq("GridEngine")
|
spec.jobRunners = Seq("GridEngine")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -112,7 +112,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithGridEngineResourceAndMemoryLimit() {
|
def testHelloWorldWithGridEngineResourceAndMemoryLimit() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithGridEngineResourceAndMemoryLimit"
|
spec.name = "HelloWorldWithGridEngineResourceAndMemoryLimit"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -memLimit 1.25 -jobResReq s_core=1000M"
|
" -memLimit 1.25 -jobResReq s_core=1000M"
|
||||||
spec.jobRunners = Seq("GridEngine")
|
spec.jobRunners = Seq("GridEngine")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -122,7 +122,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithGridEngineEnvironment() {
|
def testHelloWorldWithGridEngineEnvironment() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithGridEngineEnvironment"
|
spec.name = "HelloWorldWithGridEngineEnvironment"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -jobEnv \"make 1\""
|
" -jobEnv \"make 1\""
|
||||||
spec.jobRunners = Seq("GridEngine")
|
spec.jobRunners = Seq("GridEngine")
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -133,7 +133,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithWalltime() {
|
def testHelloWorldWithWalltime() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithWalltime"
|
spec.name = "HelloWorldWithWalltime"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -wallTime 100"
|
" -wallTime 100"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
QueueTest.executeTest(spec)
|
QueueTest.executeTest(spec)
|
||||||
|
|
@ -143,7 +143,7 @@ class HelloWorldQueueTest {
|
||||||
def testHelloWorldWithLogDirectory() {
|
def testHelloWorldWithLogDirectory() {
|
||||||
val spec = new QueueTestSpec
|
val spec = new QueueTestSpec
|
||||||
spec.name = "HelloWorldWithLogDirectory"
|
spec.name = "HelloWorldWithLogDirectory"
|
||||||
spec.args = "-S public/scala/qscript/org/broadinstitute/gatk/queue/qscripts/examples/HelloWorld.scala" +
|
spec.args = "-S " + QueueTest.publicQScriptsPackageDir + "examples/HelloWorld.scala" +
|
||||||
" -logDir pipelineLogDir"
|
" -logDir pipelineLogDir"
|
||||||
spec.jobRunners = QueueTest.allJobRunners
|
spec.jobRunners = QueueTest.allJobRunners
|
||||||
spec.expectedFilePaths = Seq("pipelineLogDir/HelloWorld-1.out")
|
spec.expectedFilePaths = Seq("pipelineLogDir/HelloWorld-1.out")
|
||||||
|
|
|
||||||
|
|
@ -60,20 +60,6 @@
|
||||||
<groupId>org.scala-tools</groupId>
|
<groupId>org.scala-tools</groupId>
|
||||||
<artifactId>maven-scala-plugin</artifactId>
|
<artifactId>maven-scala-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-public-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-public-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
|
@ -118,42 +104,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-qscript</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-qscript</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,12 @@ import org.apache.commons.io.filefilter.WildcardFileFilter
|
||||||
|
|
||||||
object QueueTest extends BaseTest with Logging {
|
object QueueTest extends BaseTest with Logging {
|
||||||
|
|
||||||
|
private final val qscriptsSrcDir = "src/main/qscripts/"
|
||||||
|
private final val qscriptsPackageDir = qscriptsSrcDir + "org/broadinstitute/gatk/queue/qscripts/"
|
||||||
|
final val publicQScriptsPackageDir = BaseTest.gatkDirectory + "public/gatk-queue-extensions-public/" + qscriptsPackageDir
|
||||||
|
final val protectedQScriptsPackageDir = BaseTest.gatkDirectory + "protected/gatk-queue-extensions-distribution/" + qscriptsPackageDir
|
||||||
|
final val privateQScriptsPackageDir = BaseTest.gatkDirectory + "private/gatk-queue-extensions-internal/" + qscriptsPackageDir
|
||||||
|
|
||||||
private val validationReportsDataLocation = "/humgen/gsa-hpprojects/GATK/validationreports/submitted/"
|
private val validationReportsDataLocation = "/humgen/gsa-hpprojects/GATK/validationreports/submitted/"
|
||||||
private val md5DB = new MD5DB()
|
private val md5DB = new MD5DB()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -401,6 +401,7 @@
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
|
<gatkdir>${gatk.basedir}</gatkdir>
|
||||||
<clover.pertest.coverage>diff</clover.pertest.coverage>
|
<clover.pertest.coverage>diff</clover.pertest.coverage>
|
||||||
<java.awt.headless>true</java.awt.headless>
|
<java.awt.headless>true</java.awt.headless>
|
||||||
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
<java.io.tmpdir>${java.io.tmpdir}</java.io.tmpdir>
|
||||||
|
|
@ -424,6 +425,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*UnitTest.class</include>
|
<include>**/*UnitTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>unit</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
@ -451,6 +455,7 @@
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<systemPropertyVariables>
|
<systemPropertyVariables>
|
||||||
|
<gatkdir>${gatk.basedir}</gatkdir>
|
||||||
<clover.pertest.coverage>diff</clover.pertest.coverage>
|
<clover.pertest.coverage>diff</clover.pertest.coverage>
|
||||||
<java.awt.headless>true</java.awt.headless>
|
<java.awt.headless>true</java.awt.headless>
|
||||||
<!-- TODO: Fix BaseTest to not error out if this property is missing. -->
|
<!-- TODO: Fix BaseTest to not error out if this property is missing. -->
|
||||||
|
|
@ -474,6 +479,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*IntegrationTest.class</include>
|
<include>**/*IntegrationTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>integration</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
@ -491,6 +499,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*QueueTest.class</include>
|
<include>**/*QueueTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>queue</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
@ -507,6 +518,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*LargeScaleTest.class</include>
|
<include>**/*LargeScaleTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>largescale</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
@ -523,6 +537,9 @@
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*KnowledgeBaseTest.class</include>
|
<include>**/*KnowledgeBaseTest.class</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<testType>knowledgebasetests</testType>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|
|
||||||
|
|
@ -78,34 +78,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ public class EngineFeaturesIntegrationTest extends WalkerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testBadCompressArgument(final int compress) {
|
private void testBadCompressArgument(final int compress) {
|
||||||
WalkerTestSpec spec = new WalkerTestSpec("-T PrintReads -R " + b37KGReference + " -I private/testdata/NA12878.1_10mb_2_10mb.bam -o %s -compress " + compress,
|
WalkerTestSpec spec = new WalkerTestSpec("-T PrintReads -R " + b37KGReference + " -I " + privateTestDir + "NA12878.1_10mb_2_10mb.bam -o %s -compress " + compress,
|
||||||
1, UserException.class);
|
1, UserException.class);
|
||||||
executeTest("badCompress " + compress, spec);
|
executeTest("badCompress " + compress, spec);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,8 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest {
|
||||||
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
||||||
|
|
||||||
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
|
|
||||||
testEngine.setSAMFileIDs(samFiles);
|
testEngine.setSAMFileIDs(samFiles);
|
||||||
testEngine.checkForDuplicateSamFiles();
|
testEngine.checkForDuplicateSamFiles();
|
||||||
|
|
@ -86,10 +86,10 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest {
|
||||||
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
||||||
|
|
||||||
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleNORG.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleNORG.bam"), new Tags()));
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
samFiles.add(new SAMReaderID(new File("public/testdata/exampleNORG.bam"), new Tags()));
|
samFiles.add(new SAMReaderID(new File(publicTestDir + "exampleNORG.bam"), new Tags()));
|
||||||
|
|
||||||
testEngine.setSAMFileIDs(samFiles);
|
testEngine.setSAMFileIDs(samFiles);
|
||||||
testEngine.checkForDuplicateSamFiles();
|
testEngine.checkForDuplicateSamFiles();
|
||||||
|
|
@ -99,7 +99,7 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest {
|
||||||
public void testDuplicateSamFileHandlingAbsoluteVsRelativePath() {
|
public void testDuplicateSamFileHandlingAbsoluteVsRelativePath() {
|
||||||
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine();
|
||||||
|
|
||||||
final File relativePathToBAMFile = new File("public/testdata/exampleBAM.bam");
|
final File relativePathToBAMFile = new File(publicTestDir + "exampleBAM.bam");
|
||||||
final File absolutePathToBAMFile = new File(relativePathToBAMFile.getAbsolutePath());
|
final File absolutePathToBAMFile = new File(relativePathToBAMFile.getAbsolutePath());
|
||||||
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
Collection<SAMReaderID> samFiles = new ArrayList<SAMReaderID>();
|
||||||
samFiles.add(new SAMReaderID(relativePathToBAMFile, new Tags()));
|
samFiles.add(new SAMReaderID(relativePathToBAMFile, new Tags()));
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class SAMReaderIDUnitTest extends BaseTest {
|
||||||
public void testSAMReaderIDHashingAndEquality() {
|
public void testSAMReaderIDHashingAndEquality() {
|
||||||
// Test to make sure that two SAMReaderIDs that point at the same file via an absolute vs. relative
|
// Test to make sure that two SAMReaderIDs that point at the same file via an absolute vs. relative
|
||||||
// path are equal according to equals() and have the same hash code
|
// path are equal according to equals() and have the same hash code
|
||||||
final File relativePathToBAMFile = new File("public/testdata/exampleBAM.bam");
|
final File relativePathToBAMFile = new File(publicTestDir + "exampleBAM.bam");
|
||||||
final File absolutePathToBAMFile = new File(relativePathToBAMFile.getAbsolutePath());
|
final File absolutePathToBAMFile = new File(relativePathToBAMFile.getAbsolutePath());
|
||||||
final SAMReaderID relativePathSAMReaderID = new SAMReaderID(relativePathToBAMFile, new Tags());
|
final SAMReaderID relativePathSAMReaderID = new SAMReaderID(relativePathToBAMFile, new Tags());
|
||||||
final SAMReaderID absolutePathSAMReaderID = new SAMReaderID(absolutePathToBAMFile, new Tags());
|
final SAMReaderID absolutePathSAMReaderID = new SAMReaderID(absolutePathToBAMFile, new Tags());
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,10 @@ import java.io.IOException;
|
||||||
public class CatVariantsIntegrationTest {
|
public class CatVariantsIntegrationTest {
|
||||||
private final MD5DB md5db = new MD5DB();
|
private final MD5DB md5db = new MD5DB();
|
||||||
private final File CatVariantsDir = new File(BaseTest.privateTestDir, "CatVariants");
|
private final File CatVariantsDir = new File(BaseTest.privateTestDir, "CatVariants");
|
||||||
|
private final File CatVariantsVcf1 = new File(CatVariantsDir, "CatVariantsTest1.vcf");
|
||||||
|
private final File CatVariantsVcf2 = new File(CatVariantsDir, "CatVariantsTest2.vcf");
|
||||||
|
private final File CatVariantsBcf1 = new File(CatVariantsDir, "CatVariantsTest1.bcf");
|
||||||
|
private final File CatVariantsBcf2 = new File(CatVariantsDir, "CatVariantsTest2.bcf");
|
||||||
|
|
||||||
private class CatVariantsTestProvider extends BaseTest.TestDataProvider {
|
private class CatVariantsTestProvider extends BaseTest.TestDataProvider {
|
||||||
private final File file1;
|
private final File file1;
|
||||||
|
|
@ -50,11 +54,11 @@ public class CatVariantsIntegrationTest {
|
||||||
public final File outputFile;
|
public final File outputFile;
|
||||||
public final String md5;
|
public final String md5;
|
||||||
|
|
||||||
private CatVariantsTestProvider(final String file1, final String file2, final File outputFile, final String md5) {
|
private CatVariantsTestProvider(final File file1, final File file2, final File outputFile, final String md5) {
|
||||||
super(CatVariantsTestProvider.class);
|
super(CatVariantsTestProvider.class);
|
||||||
|
|
||||||
this.file1 = new File(CatVariantsDir, file1);
|
this.file1 = file1;
|
||||||
this.file2 = new File(CatVariantsDir, file2);
|
this.file2 = file2;
|
||||||
this.outputFile = outputFile;
|
this.outputFile = outputFile;
|
||||||
this.md5 = md5;
|
this.md5 = md5;
|
||||||
}
|
}
|
||||||
|
|
@ -72,16 +76,23 @@ public class CatVariantsIntegrationTest {
|
||||||
|
|
||||||
@DataProvider(name = "ExtensionsTest")
|
@DataProvider(name = "ExtensionsTest")
|
||||||
public Object[][] makeExtensionsTestProvider() {
|
public Object[][] makeExtensionsTestProvider() {
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.vcf", "CatVariantsTest2.vcf", BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
final File catVariantsTempList1 = BaseTest.createTempListFile("CatVariantsTest1", CatVariantsVcf1.getAbsolutePath());
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.bcf", "CatVariantsTest2.bcf", BaseTest.createTempFile("CatVariantsTest", ".bcf"), "6a57fcbbf3cae490896d13a288670d83");
|
final File catVariantsTempList2 = BaseTest.createTempListFile("CatVariantsTest2", CatVariantsVcf2.getAbsolutePath());
|
||||||
|
|
||||||
for (String extension : AbstractFeatureReader.BLOCK_COMPRESSED_EXTENSIONS)
|
new CatVariantsTestProvider(CatVariantsVcf1, CatVariantsVcf2, BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.vcf" + extension, "CatVariantsTest2.vcf" + extension, BaseTest.createTempFile("CatVariantsTest", ".vcf" + extension), "33f728ac5c70ce2994f3619a27f47088");
|
new CatVariantsTestProvider(CatVariantsBcf1, CatVariantsBcf2, BaseTest.createTempFile("CatVariantsTest", ".bcf"), "6a57fcbbf3cae490896d13a288670d83");
|
||||||
|
|
||||||
|
for (String extension : AbstractFeatureReader.BLOCK_COMPRESSED_EXTENSIONS) {
|
||||||
|
final File file1 = new File(CatVariantsDir, "CatVariantsTest1.vcf" + extension);
|
||||||
|
final File file2 = new File(CatVariantsDir, "CatVariantsTest2.vcf" + extension);
|
||||||
|
final File outputFile = BaseTest.createTempFile("CatVariantsTest", ".vcf" + extension);
|
||||||
|
new CatVariantsTestProvider(file1, file2, outputFile, "33f728ac5c70ce2994f3619a27f47088");
|
||||||
|
}
|
||||||
|
|
||||||
//Test list parsing functionality
|
//Test list parsing functionality
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.list", "CatVariantsTest2.vcf", BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
new CatVariantsTestProvider(catVariantsTempList1, CatVariantsVcf2, BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.vcf", "CatVariantsTest2.list", BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
new CatVariantsTestProvider(CatVariantsVcf1, catVariantsTempList2, BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
||||||
new CatVariantsTestProvider("CatVariantsTest1.list", "CatVariantsTest2.list", BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
new CatVariantsTestProvider(catVariantsTempList1, catVariantsTempList2, BaseTest.createTempFile("CatVariantsTest", ".vcf"), "d0d81eb7fd3905256c4ac7c0fc480094");
|
||||||
|
|
||||||
return CatVariantsTestProvider.getTests(CatVariantsTestProvider.class);
|
return CatVariantsTestProvider.getTests(CatVariantsTestProvider.class);
|
||||||
}
|
}
|
||||||
|
|
@ -107,8 +118,8 @@ public class CatVariantsIntegrationTest {
|
||||||
StringUtils.join(RuntimeUtils.getAbsoluteClassPaths(), File.pathSeparatorChar),
|
StringUtils.join(RuntimeUtils.getAbsoluteClassPaths(), File.pathSeparatorChar),
|
||||||
CatVariants.class.getCanonicalName(),
|
CatVariants.class.getCanonicalName(),
|
||||||
BaseTest.b37KGReference,
|
BaseTest.b37KGReference,
|
||||||
new File(CatVariantsDir, "CatVariantsTest1.vcf"),
|
CatVariantsVcf1,
|
||||||
new File(CatVariantsDir, "CatVariantsTest2.vcf"),
|
CatVariantsVcf2,
|
||||||
BaseTest.createTempFile("CatVariantsTest", ".bcf"));
|
BaseTest.createTempFile("CatVariantsTest", ".bcf"));
|
||||||
|
|
||||||
ProcessController pc = ProcessController.getThreadLocal();
|
ProcessController pc = ProcessController.getThreadLocal();
|
||||||
|
|
@ -123,8 +134,8 @@ public class CatVariantsIntegrationTest {
|
||||||
StringUtils.join(RuntimeUtils.getAbsoluteClassPaths(), File.pathSeparatorChar),
|
StringUtils.join(RuntimeUtils.getAbsoluteClassPaths(), File.pathSeparatorChar),
|
||||||
CatVariants.class.getCanonicalName(),
|
CatVariants.class.getCanonicalName(),
|
||||||
BaseTest.b37KGReference,
|
BaseTest.b37KGReference,
|
||||||
new File(CatVariantsDir, "CatVariantsTest1.vcf"),
|
CatVariantsVcf1,
|
||||||
new File(CatVariantsDir, "CatVariantsTest2.bcf"),
|
CatVariantsBcf2,
|
||||||
BaseTest.createTempFile("CatVariantsTest", ".vcf"));
|
BaseTest.createTempFile("CatVariantsTest", ".vcf"));
|
||||||
|
|
||||||
ProcessController pc = ProcessController.getThreadLocal();
|
ProcessController pc = ProcessController.getThreadLocal();
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import java.util.Arrays;
|
||||||
|
|
||||||
public class CallableLociIntegrationTest extends WalkerTest {
|
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 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 = "a6f5963669f19d9d137ced87d65834b0";
|
final static String SUMMARY_MD5 = "a6f5963669f19d9d137ced87d65834b0";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import org.testng.SkipException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -87,6 +88,12 @@ public abstract class BaseTest {
|
||||||
/** our log, which we want to capture anything from org.broadinstitute.sting */
|
/** our log, which we want to capture anything from org.broadinstitute.sting */
|
||||||
public static final Logger logger = CommandLineUtils.getStingLogger();
|
public static final Logger logger = CommandLineUtils.getStingLogger();
|
||||||
|
|
||||||
|
private static final String CURRENT_DIRECTORY = System.getProperty("user.dir");
|
||||||
|
public static final String gatkDirectory = System.getProperty("gatkdir", CURRENT_DIRECTORY) + "/";
|
||||||
|
public static final String baseDirectory = System.getProperty("basedir", CURRENT_DIRECTORY) + "/";
|
||||||
|
public static final String testType = System.getProperty("testType"); // May be null
|
||||||
|
public static final String testTypeSubDirectory = testType == null ? "" : ("/" + testType); // May be empty
|
||||||
|
|
||||||
public static final String hg18Reference = "/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta";
|
public static final String hg18Reference = "/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta";
|
||||||
public static final String hg19Reference = "/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta";
|
public static final String hg19Reference = "/seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta";
|
||||||
public static final String b36KGReference = "/humgen/1kg/reference/human_b36_both.fasta";
|
public static final String b36KGReference = "/humgen/1kg/reference/human_b36_both.fasta";
|
||||||
|
|
@ -123,12 +130,12 @@ public abstract class BaseTest {
|
||||||
private static final boolean networkTempDirRootExists = new File(networkTempDirRoot).exists();
|
private static final boolean networkTempDirRootExists = new File(networkTempDirRoot).exists();
|
||||||
private static final File networkTempDirFile;
|
private static final File networkTempDirFile;
|
||||||
|
|
||||||
private static final String privateTestDirRelative = "private/testdata/";
|
private static final String privateTestDirRelative = "private/gatk-tools-private/src/test/resources/";
|
||||||
public static final String privateTestDir = new File(privateTestDirRelative).getAbsolutePath() + "/";
|
public static final String privateTestDir = new File(gatkDirectory, privateTestDirRelative).getAbsolutePath() + "/";
|
||||||
protected static final String privateTestDirRoot = privateTestDir.replace(privateTestDirRelative, "");
|
protected static final String privateTestDirRoot = privateTestDir.replace(privateTestDirRelative, "");
|
||||||
|
|
||||||
private static final String publicTestDirRelative = "public/testdata/";
|
private static final String publicTestDirRelative = "public/gatk-engine/src/test/resources/";
|
||||||
public static final String publicTestDir = new File(publicTestDirRelative).getAbsolutePath() + "/";
|
public static final String publicTestDir = new File(gatkDirectory, publicTestDirRelative).getAbsolutePath() + "/";
|
||||||
protected static final String publicTestDirRoot = publicTestDir.replace(publicTestDirRelative, "");
|
protected static final String publicTestDirRoot = publicTestDir.replace(publicTestDirRelative, "");
|
||||||
|
|
||||||
public static final String keysDataLocation = validationDataLocation + "keys/";
|
public static final String keysDataLocation = validationDataLocation + "keys/";
|
||||||
|
|
@ -307,6 +314,28 @@ public abstract class BaseTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a temp list file that will be deleted on exit after tests are complete.
|
||||||
|
* @param tempFilePrefix Prefix of the file.
|
||||||
|
* @param lines lines to write to the file.
|
||||||
|
* @return A list file in the temporary directory starting with tempFilePrefix, which will be deleted after the program exits.
|
||||||
|
*/
|
||||||
|
public static File createTempListFile(final String tempFilePrefix, final String... lines) {
|
||||||
|
try {
|
||||||
|
final File tempListFile = createTempFile(tempFilePrefix, ".list");
|
||||||
|
|
||||||
|
final PrintWriter out = new PrintWriter(tempListFile);
|
||||||
|
for (final String line : lines) {
|
||||||
|
out.println(line);
|
||||||
|
}
|
||||||
|
out.close();
|
||||||
|
|
||||||
|
return tempListFile;
|
||||||
|
} catch (IOException ex) {
|
||||||
|
throw new ReviewedGATKException("Cannot create temp file: " + ex.getMessage(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a temp file that will be deleted on exit after tests are complete.
|
* Creates a temp file that will be deleted on exit after tests are complete.
|
||||||
* @param name Name of the file.
|
* @param name Name of the file.
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ public class MD5DB {
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
diffEngineOutput = baos.toString();
|
diffEngineOutput = baos.toString();
|
||||||
BaseTest.log(diffEngineOutput);
|
BaseTest.log(diffEngineOutput);
|
||||||
System.out.printf("Note that the above list is not comprehensive. At most 20 lines of output, and 10 specific differences will be listed. Please use -T DiffObjects -R public/testdata/exampleFASTA.fasta -m %s -t %s to explore the differences more freely%n",
|
System.out.printf("Note that the above list is not comprehensive. At most 20 lines of output, and 10 specific differences will be listed. Please use -T DiffObjects -R " + BaseTest.publicTestDir + "exampleFASTA.fasta -m %s -t %s to explore the differences more freely%n",
|
||||||
pathToExpectedMD5File, pathToFileMD5File);
|
pathToExpectedMD5File, pathToFileMD5File);
|
||||||
}
|
}
|
||||||
ps.close();
|
ps.close();
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ public class ArgumentTypeDescriptorUnitTest extends BaseTest {
|
||||||
final ParsingEngine parser = new ParsingEngine(new ATDTestCommandLineProgram());
|
final ParsingEngine parser = new ParsingEngine(new ATDTestCommandLineProgram());
|
||||||
|
|
||||||
//A list file containing a single VCF
|
//A list file containing a single VCF
|
||||||
final File listFile = new File(privateTestDir+"oneVCF.list");
|
final File listFile = createTempListFile("oneVCF", privateTestDir + "empty.vcf");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object result = ArgumentTypeDescriptor.getRodBindingsCollection(listFile,
|
Object result = ArgumentTypeDescriptor.getRodBindingsCollection(listFile,
|
||||||
|
|
@ -197,8 +197,7 @@ public class ArgumentTypeDescriptorUnitTest extends BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
//The same file, now with an extra blank line
|
//The same file, now with an extra blank line
|
||||||
final File listFileWithBlank = new File(privateTestDir+"oneVCFwithBlankLine.list");
|
final File listFileWithBlank = createTempListFile("oneVCFwithBlankLine", privateTestDir + "empty.vcf", "");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object result = ArgumentTypeDescriptor.getRodBindingsCollection(listFileWithBlank,
|
Object result = ArgumentTypeDescriptor.getRodBindingsCollection(listFileWithBlank,
|
||||||
parser,
|
parser,
|
||||||
|
|
|
||||||
|
|
@ -933,9 +933,8 @@ public class ParsingEngineUnitTest extends BaseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void argumentListTest() throws IOException {
|
public void argumentListTest() throws IOException {
|
||||||
File argsFile = BaseTest.createTempFile("args.", ".list");
|
File argsFile = BaseTest.createTempListFile("args.", "-I na12878.bam");
|
||||||
try {
|
try {
|
||||||
FileUtils.write(argsFile, "-I na12878.bam");
|
|
||||||
final String[] commandLine = new String[] {"-args", argsFile.getPath()};
|
final String[] commandLine = new String[] {"-args", argsFile.getPath()};
|
||||||
parsingEngine.addArgumentSource(InputFileArgProvider.class);
|
parsingEngine.addArgumentSource(InputFileArgProvider.class);
|
||||||
parsingEngine.parse(commandLine);
|
parsingEngine.parse(commandLine);
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class RodBindingCollectionUnitTest extends BaseTest {
|
||||||
|
|
||||||
private static final String defaultTagString = "VCF";
|
private static final String defaultTagString = "VCF";
|
||||||
private static final String testVCFFileName = privateTestDir + "empty.vcf";
|
private static final String testVCFFileName = privateTestDir + "empty.vcf";
|
||||||
private static final String testListFileName = privateTestDir + "oneVCF.list";
|
private static final String testListFileName = createTempListFile("oneVCF", testVCFFileName).getAbsolutePath();
|
||||||
|
|
||||||
@BeforeMethod
|
@BeforeMethod
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
|
|
@ -84,16 +84,13 @@ public class RodBindingCollectionUnitTest extends BaseTest {
|
||||||
final RodBindingCollectionArgProvider argProvider = new RodBindingCollectionArgProvider();
|
final RodBindingCollectionArgProvider argProvider = new RodBindingCollectionArgProvider();
|
||||||
parsingEngine.loadArgumentsIntoObject( argProvider );
|
parsingEngine.loadArgumentsIntoObject( argProvider );
|
||||||
|
|
||||||
Assert.assertEquals(argProvider.input.getRodBindings().iterator().next().getSource(), "private/testdata/empty.vcf", "Argument is not correctly initialized");
|
Assert.assertEquals(argProvider.input.getRodBindings().iterator().next().getSource(), testVCFFileName, "Argument is not correctly initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDefaultTagsInFile() throws IOException {
|
public void testDefaultTagsInFile() throws IOException {
|
||||||
|
|
||||||
final File testFile = createTempFile("RodBindingCollectionUnitTest.defaultTags", ".list");
|
final File testFile = createTempListFile("RodBindingCollectionUnitTest.defaultTags", testVCFFileName);
|
||||||
final FileWriter writer = new FileWriter(testFile);
|
|
||||||
writer.write(testVCFFileName, 0, testVCFFileName.length());
|
|
||||||
writer.close();
|
|
||||||
|
|
||||||
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
||||||
|
|
||||||
|
|
@ -108,29 +105,21 @@ public class RodBindingCollectionUnitTest extends BaseTest {
|
||||||
@Test(expectedExceptions = UserException.BadArgumentValue.class)
|
@Test(expectedExceptions = UserException.BadArgumentValue.class)
|
||||||
public void testDuplicateEntriesInFile() throws IOException {
|
public void testDuplicateEntriesInFile() throws IOException {
|
||||||
|
|
||||||
final File testFile = createTempFile("RodBindingCollectionUnitTest.variantListWithDuplicates", ".list");
|
final File testFile = createTempListFile("RodBindingCollectionUnitTest.variantListWithDuplicates", testVCFFileName, testVCFFileName);
|
||||||
final FileWriter writer = new FileWriter(testFile);
|
|
||||||
writer.write(testVCFFileName + "\n");
|
|
||||||
writer.write(testVCFFileName + "\n");
|
|
||||||
writer.close();
|
|
||||||
|
|
||||||
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions = UserException.BadArgumentValue.class)
|
@Test(expectedExceptions = UserException.BadArgumentValue.class)
|
||||||
public void testValidateEmptyFile() throws IOException {
|
public void testValidateEmptyFile() throws IOException {
|
||||||
final File testFile = createTempFile("RodBindingCollectionUnitTest.emptyVCFList", ".list");
|
final File testFile = createTempListFile("RodBindingCollectionUnitTest.emptyVCFList");
|
||||||
|
|
||||||
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOverrideTagsInFile() throws IOException {
|
public void testOverrideTagsInFile() throws IOException {
|
||||||
final File testFile = createTempFile("RodBindingCollectionUnitTest.overrideTags", ".list");
|
final File testFile = createTempListFile("RodBindingCollectionUnitTest.overrideTags", "foo " + testVCFFileName);
|
||||||
final FileWriter writer = new FileWriter(testFile);
|
|
||||||
final String textToWrite = "foo " + testVCFFileName;
|
|
||||||
writer.write(textToWrite, 0, textToWrite.length());
|
|
||||||
writer.close();
|
|
||||||
|
|
||||||
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
ArgumentTypeDescriptor.getRodBindingsCollection(testFile, parsingEngine, VariantContext.class, "foo", mytags, "input");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1043,7 +1043,7 @@ public class IntervalUtilsUnitTest extends BaseTest {
|
||||||
@DataProvider(name="invalidIntervalTestData")
|
@DataProvider(name="invalidIntervalTestData")
|
||||||
public Object[][] invalidIntervalDataProvider() throws Exception {
|
public Object[][] invalidIntervalDataProvider() throws Exception {
|
||||||
GATKArgumentCollection argCollection = new GATKArgumentCollection();
|
GATKArgumentCollection argCollection = new GATKArgumentCollection();
|
||||||
File fastaFile = new File("public/testdata/exampleFASTA.fasta");
|
File fastaFile = new File(publicTestDir + "exampleFASTA.fasta");
|
||||||
GenomeLocParser genomeLocParser = new GenomeLocParser(new IndexedFastaSequenceFile(fastaFile));
|
GenomeLocParser genomeLocParser = new GenomeLocParser(new IndexedFastaSequenceFile(fastaFile));
|
||||||
|
|
||||||
return new Object[][] {
|
return new Object[][] {
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,12 @@ public class ListFileUtilsUnitTest extends BaseTest {
|
||||||
public void testIgnoreBlankLinesInBAMListFiles() throws Exception {
|
public void testIgnoreBlankLinesInBAMListFiles() throws Exception {
|
||||||
File tempListFile = createTempListFile("testIgnoreBlankLines",
|
File tempListFile = createTempListFile("testIgnoreBlankLines",
|
||||||
"",
|
"",
|
||||||
"public/testdata/exampleBAM.bam",
|
publicTestDir + "exampleBAM.bam",
|
||||||
" "
|
" "
|
||||||
);
|
);
|
||||||
|
|
||||||
List<SAMReaderID> expectedBAMFileListAfterUnpacking = new ArrayList<SAMReaderID>();
|
List<SAMReaderID> expectedBAMFileListAfterUnpacking = new ArrayList<SAMReaderID>();
|
||||||
expectedBAMFileListAfterUnpacking.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
expectedBAMFileListAfterUnpacking.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
|
|
||||||
performBAMListFileUnpackingTest(tempListFile, expectedBAMFileListAfterUnpacking);
|
performBAMListFileUnpackingTest(tempListFile, expectedBAMFileListAfterUnpacking);
|
||||||
}
|
}
|
||||||
|
|
@ -61,30 +61,30 @@ public class ListFileUtilsUnitTest extends BaseTest {
|
||||||
public void testCommentSupportInBAMListFiles() throws Exception {
|
public void testCommentSupportInBAMListFiles() throws Exception {
|
||||||
File tempListFile = createTempListFile("testCommentSupport",
|
File tempListFile = createTempListFile("testCommentSupport",
|
||||||
"#",
|
"#",
|
||||||
"public/testdata/exampleBAM.bam",
|
publicTestDir + "exampleBAM.bam",
|
||||||
"#public/testdata/foo.bam",
|
"#" + publicTestDir + "foo.bam",
|
||||||
" # public/testdata/bar.bam"
|
" # " + publicTestDir + "bar.bam"
|
||||||
);
|
);
|
||||||
|
|
||||||
List<SAMReaderID> expectedBAMFileListAfterUnpacking = new ArrayList<SAMReaderID>();
|
List<SAMReaderID> expectedBAMFileListAfterUnpacking = new ArrayList<SAMReaderID>();
|
||||||
expectedBAMFileListAfterUnpacking.add(new SAMReaderID(new File("public/testdata/exampleBAM.bam"), new Tags()));
|
expectedBAMFileListAfterUnpacking.add(new SAMReaderID(new File(publicTestDir + "exampleBAM.bam"), new Tags()));
|
||||||
|
|
||||||
performBAMListFileUnpackingTest(tempListFile, expectedBAMFileListAfterUnpacking);
|
performBAMListFileUnpackingTest(tempListFile, expectedBAMFileListAfterUnpacking);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUnpackSet() throws Exception {
|
public void testUnpackSet() throws Exception {
|
||||||
Set<String> expected = new HashSet<String>(Arrays.asList("public/testdata/exampleBAM.bam"));
|
Set<String> expected = new HashSet<String>(Arrays.asList(publicTestDir + "exampleBAM.bam"));
|
||||||
Set<String> actual;
|
Set<String> actual;
|
||||||
|
|
||||||
actual = ListFileUtils.unpackSet(Arrays.asList("public/testdata/exampleBAM.bam"));
|
actual = ListFileUtils.unpackSet(Arrays.asList(publicTestDir + "exampleBAM.bam"));
|
||||||
Assert.assertEquals(actual, expected);
|
Assert.assertEquals(actual, expected);
|
||||||
|
|
||||||
File tempListFile = createTempListFile("testUnpackSet",
|
File tempListFile = createTempListFile("testUnpackSet",
|
||||||
"#",
|
"#",
|
||||||
"public/testdata/exampleBAM.bam",
|
publicTestDir + "exampleBAM.bam",
|
||||||
"#public/testdata/foo.bam",
|
"#" + publicTestDir + "foo.bam",
|
||||||
" # public/testdata/bar.bam"
|
" # " + publicTestDir + "bar.bam"
|
||||||
);
|
);
|
||||||
actual = ListFileUtils.unpackSet(Arrays.asList(tempListFile.getAbsolutePath()));
|
actual = ListFileUtils.unpackSet(Arrays.asList(tempListFile.getAbsolutePath()));
|
||||||
Assert.assertEquals(actual, expected);
|
Assert.assertEquals(actual, expected);
|
||||||
|
|
@ -142,18 +142,6 @@ public class ListFileUtilsUnitTest extends BaseTest {
|
||||||
return new HashSet<T>(Arrays.asList(args));
|
return new HashSet<T>(Arrays.asList(args));
|
||||||
}
|
}
|
||||||
|
|
||||||
private File createTempListFile( String tempFilePrefix, String... lines ) throws Exception {
|
|
||||||
File tempListFile = createTempFile(tempFilePrefix, ".list");
|
|
||||||
|
|
||||||
PrintWriter out = new PrintWriter(tempListFile);
|
|
||||||
for ( String line : lines ) {
|
|
||||||
out.println(line);
|
|
||||||
}
|
|
||||||
out.close();
|
|
||||||
|
|
||||||
return tempListFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void performBAMListFileUnpackingTest( File tempListFile, List<SAMReaderID> expectedUnpackedFileList ) throws Exception {
|
private void performBAMListFileUnpackingTest( File tempListFile, List<SAMReaderID> expectedUnpackedFileList ) throws Exception {
|
||||||
List<String> bamFiles = new ArrayList<String>();
|
List<String> bamFiles = new ArrayList<String>();
|
||||||
bamFiles.add(tempListFile.getAbsolutePath());
|
bamFiles.add(tempListFile.getAbsolutePath());
|
||||||
|
|
|
||||||
|
|
@ -189,33 +189,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>private-testdata</id>
|
|
||||||
<activation>
|
|
||||||
<file>
|
|
||||||
<exists>${basedir}/../../private/pom.xml</exists>
|
|
||||||
</file>
|
|
||||||
</activation>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<!-- TODO: All tests require access to private. For now. -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.pyx4j</groupId>
|
|
||||||
<artifactId>maven-junction-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>link-private-testdata</id>
|
|
||||||
<phase>process-test-resources</phase>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>unlink-private-testdata</id>
|
|
||||||
<phase>clean</phase>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue