From 23578b74021557a140ed7a695d71c6c71125cfb2 Mon Sep 17 00:00:00 2001 From: kshakir Date: Sat, 29 Jan 2011 19:44:03 +0000 Subject: [PATCH] Pipeline tests will only start from scratch after "ant clean", making it faster to debug downstream issues when re-running "ant pipelinetest -Dpipeline.run=run". Updated the FCP, the test, and the ADPR to handle an issue with the ADPR locating the yaml generated by the FCPTest. Does not solve the ADPR error: Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5126 348d0f76-0448-11de-a6fe-93d51630548a --- R/DataProcessingReport/GetTearsheetStats.R | 5 +++-- scala/qscript/playground/fullCallingPipeline.q | 15 +++++++++------ .../sting/queue/pipeline/PipelineTest.scala | 2 +- .../playground/FullCallingPipelineTest.scala | 10 +++++----- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/R/DataProcessingReport/GetTearsheetStats.R b/R/DataProcessingReport/GetTearsheetStats.R index 2590153ec..fa8d24a5a 100644 --- a/R/DataProcessingReport/GetTearsheetStats.R +++ b/R/DataProcessingReport/GetTearsheetStats.R @@ -16,6 +16,7 @@ suppressMessages(library(ROracle)); cmdargs = gsa.getargs( list( + yaml = list(value=NA, doc="pipeline YAML file"), bamlist = list(value=NA, doc="list of BAM files"), evalroot = list(value=NA, doc="VariantEval root"), tearout = list(value=NA, doc="Output path for tearsheet PDF")#, @@ -26,8 +27,8 @@ cmdargs = gsa.getargs( bamlist = scan(cmdargs$bamlist, "character"); -print(paste("grep SQUID ", sub("cleaned.BamFiles.list", "yaml",cmdargs$bamlist) , ' |grep "C..." -o', sep="")) -squids <- system(paste("grep SQUID ", sub("cleaned.BamFiles.list", "yaml",cmdargs$bamlist) , ' |grep "C..." -o', sep=""), intern=TRUE) +print(paste("grep SQUID ", cmdargs$yaml, ' |grep "C..." -o', sep="")) +squids <- system(paste("grep SQUID ", cmdargs$yaml, ' |grep "C..." -o', sep=""), intern=TRUE) fclanes = c(); for (bam in bamlist) { bamheader = system(paste("samtools view -H", bam), intern=TRUE); diff --git a/scala/qscript/playground/fullCallingPipeline.q b/scala/qscript/playground/fullCallingPipeline.q index 805b79632..c20c5b3fb 100755 --- a/scala/qscript/playground/fullCallingPipeline.q +++ b/scala/qscript/playground/fullCallingPipeline.q @@ -385,20 +385,23 @@ class fullCallingPipeline extends QScript { // 6. Run the ADPR and make pretty stuff class rCommand extends CommandLineFunction{ - @Argument(doc="R script") - var script: File = _ - @Argument(doc="list of bams") - var bamlist: File =_ + @Input(doc="R script") + var script: File = _ + @Input(doc="pipeline yaml") + var yaml: File = _ + @Input(doc="list of bams") + var bamlist: File =_ @Input(doc="Eval files root") var evalroot: File =_ @Output(doc="tearsheet loc") var tearsheet: File =_ - def commandLine = "Rscript %s -bamlist %s -evalroot %s -tearout %s" - .format(script, bamlist, evalroot, tearsheet) + def commandLine = "Rscript %s -yaml %s -bamlist %s -evalroot %s -tearout %s" + .format(script, yaml, bamlist, evalroot, tearsheet) } val adpr = new rCommand adpr.bamlist = listOfBams + adpr.yaml = qscript.yamlFile.getAbsoluteFile adpr.script = tearScript adpr.evalroot = eval.reportLocation adpr.jobOutputFile = new File(".queue/logs/SNPCalling/adpr.out") diff --git a/scala/test/org/broadinstitute/sting/queue/pipeline/PipelineTest.scala b/scala/test/org/broadinstitute/sting/queue/pipeline/PipelineTest.scala index 6c6d7a49f..36556628a 100644 --- a/scala/test/org/broadinstitute/sting/queue/pipeline/PipelineTest.scala +++ b/scala/test/org/broadinstitute/sting/queue/pipeline/PipelineTest.scala @@ -120,7 +120,7 @@ object PipelineTest { // add the logging level to each of the integration test commands - command = Utils.appendArray(command, "-bsub", "-l", "WARN", "-startFromScratch", "-tempDir", tempDir(name), "-runDir", runDir(name)) + command = Utils.appendArray(command, "-bsub", "-l", "WARN", "-tempDir", tempDir(name), "-runDir", runDir(name)) if (jobQueue == null) command = Utils.appendArray(command, "-jobQueue", "hour") diff --git a/scala/test/org/broadinstitute/sting/queue/pipeline/playground/FullCallingPipelineTest.scala b/scala/test/org/broadinstitute/sting/queue/pipeline/playground/FullCallingPipelineTest.scala index c777101f1..c47ff56ca 100644 --- a/scala/test/org/broadinstitute/sting/queue/pipeline/playground/FullCallingPipelineTest.scala +++ b/scala/test/org/broadinstitute/sting/queue/pipeline/playground/FullCallingPipelineTest.scala @@ -95,7 +95,7 @@ class FullCallingPipelineTest { def testFullCallingPipeline(dataset: PipelineDataset) = { val projectName = dataset.pipeline.getProject.getName val testName = "fullCallingPipeline-" + projectName - val yamlFile = writeTempYaml(dataset.pipeline) + val yamlFile = writeYaml(testName, dataset.pipeline) var cleanType = "cleaned" // Run the pipeline with the expected inputs. @@ -134,9 +134,9 @@ class FullCallingPipelineTest { override def toString = pipeline.getProject.getName } - private def writeTempYaml(pipeline: Pipeline) = { - val tempFile = BaseTest.createTempFile(pipeline.getProject.getName + "-", ".yaml") - YamlUtils.dump(pipeline, tempFile) - tempFile + private def writeYaml(testName: String, pipeline: Pipeline) = { + val yamlFile = new File(PipelineTest.runDir(testName), pipeline.getProject.getName + ".yaml") + YamlUtils.dump(pipeline, yamlFile) + yamlFile } }