From 860b172ef122451bb24b1ddbb9e4892022795af2 Mon Sep 17 00:00:00 2001 From: kshakir Date: Thu, 17 Feb 2011 21:13:14 +0000 Subject: [PATCH] Defaulting the MFCP to run without a tear script. Added a missing virtual output for the inner FCP, so that Queue can tell a run of the FCP is dot-done. Enabled the MCFPTest for the first time, running without the tear script. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5264 348d0f76-0448-11de-a6fe-93d51630548a --- .../playground/MultiFullCallingPipeline.scala | 17 ++++++++++++----- .../MultiFullCallingPipelineTest.scala | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/scala/qscript/playground/MultiFullCallingPipeline.scala b/scala/qscript/playground/MultiFullCallingPipeline.scala index d83e0324f..2650f5b5c 100644 --- a/scala/qscript/playground/MultiFullCallingPipeline.scala +++ b/scala/qscript/playground/MultiFullCallingPipeline.scala @@ -28,13 +28,16 @@ class MultiFullCallingPipeline extends QScript { @Argument(doc="pipeline priority", shortName="PP", required = false) var pipelinePriority: Option[Int] = None + @Argument(doc="run with -tearScript", shortName="TS") + var runWithTearScript = false + def script { // Global arguments for all pipeline runs stingHome = IOUtils.absolute(stingHome) val queueJar = new File(stingHome, "dist/Queue.jar") val pipelineScript = new File(stingHome, "scala/qscript/playground/FullCallingPipeline.q") val gatkJar = new File(stingHome, "dist/GenomeAnalysisTK.jar") - val tearScript = new File(stingHome, "R/DataProcessingReport/GetTearsheetStats.R") + val tearScript = if (runWithTearScript) new File(stingHome, "R/DataProcessingReport/GetTearsheetStats.R") else null // Parse the yaml list var yamls = List.empty[File] @@ -64,23 +67,27 @@ class MultiFullCallingPipeline extends QScript { * run has produced the passed in output file. */ class RunPipeline(yamlFile: File, lastOutput: File) extends JarCommandLineFunction { + private var yamlName = yamlFile.getName.stripSuffix(".yaml") + @Input(doc="output file to wait for", required=false) var waitJobOutputFile = lastOutput + @Output(doc="virtual output file tagging this pipeline as complete") + var pipelineComplete = new File(yamlFile.getParentFile, yamlName + ".mfcp") + commandDirectory = yamlFile.getParentFile jobOutputFile = IOUtils.absolute(commandDirectory, "queue.out") jarFile = queueJar memoryLimit = Some(1) - private var yamlName = yamlFile.getName.stripSuffix(".yaml") - override def commandLine = super.commandLine + optional(" -statusTo ", qscript.pipelineStatusTo) + optional(" -jobQueue ", qscript.pipelineJobQueue) + optional(" -shortJobQueue ", qscript.pipelineShortQueue) + optional(" -jobPriority ", qscript.pipelinePriority) + - " -S %s --gatkjar %s -tearScript %s -jobProject %s -jobPrefix %s -Y %s -bsub -run" - .format(pipelineScript, gatkJar, tearScript, yamlName, yamlName, yamlFile) + optional(" -tearScript ", tearScript) + + " -S %s --gatkjar %s -jobProject %s -jobPrefix %s -Y %s -bsub -run" + .format(pipelineScript, gatkJar, yamlName, yamlName, yamlFile) override def dotString = "Queue: " + yamlName } diff --git a/scala/test/org/broadinstitute/sting/queue/pipeline/playground/MultiFullCallingPipelineTest.scala b/scala/test/org/broadinstitute/sting/queue/pipeline/playground/MultiFullCallingPipelineTest.scala index ab064b588..987f393f8 100644 --- a/scala/test/org/broadinstitute/sting/queue/pipeline/playground/MultiFullCallingPipelineTest.scala +++ b/scala/test/org/broadinstitute/sting/queue/pipeline/playground/MultiFullCallingPipelineTest.scala @@ -54,7 +54,7 @@ class MultiFullCallingPipelineTest { final def convertDatasets: Array[Array[AnyRef]] = datasets.map(dataset => Array(dataset.asInstanceOf[AnyRef])).toArray - @Test(dataProvider="datasets", enabled=false) + @Test(dataProvider="datasets") def testMultiFullCallingPipeline(dataset: MultiPipelineDataset) = { val projectName = dataset.name val testName = "MultiFullCallingPipeline-" + projectName