From f34b4c6b82cf8ee68d08d0172ecb4970af8bf30f Mon Sep 17 00:00:00 2001 From: chartl Date: Thu, 30 Sep 2010 12:48:47 +0000 Subject: [PATCH] Be smarter if the beagle output is set such that getParent() returns null. Up the memory limit. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4389 348d0f76-0448-11de-a6fe-93d51630548a --- scala/qscript/chartl/RefineGenotypesAndMerge.q | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scala/qscript/chartl/RefineGenotypesAndMerge.q b/scala/qscript/chartl/RefineGenotypesAndMerge.q index 7d535afc7..d9403a00e 100755 --- a/scala/qscript/chartl/RefineGenotypesAndMerge.q +++ b/scala/qscript/chartl/RefineGenotypesAndMerge.q @@ -36,11 +36,16 @@ class BeagleGenotypeRefinement extends QScript { @Output(doc="The beagle phased file") var beaglePhasedFile: File = _ @Output(doc="The beagle likelihood file") var beagleLikelihoods: File = _ @Output(doc="The beagle r2 file") var beagleRSquared: File = _ + var beagleOutputDir: String = _ def freezeOutputs = { - val beagleOutputDir = beagleInput.getParent - beaglePhasedFile = new File(beagleOutputDir+beagleOutputBase+"."+beagleInput.getName+".phased") - beagleLikelihoods = new File(beagleOutputDir+beagleOutputBase+"."+beagleInput.getName+".gprobs") + if ( beagleInput.getParent == null ) { + beagleOutputDir = "" + } else { + beagleOutputDir = beagleInput.getParent + } + beaglePhasedFile = new File(beagleOutputDir+beagleOutputBase+"."+beagleInput.getName+".phased.gz") + beagleLikelihoods = new File(beagleOutputDir+beagleOutputBase+"."+beagleInput.getName+".gprobs.gz") beagleRSquared = new File(beagleOutputDir+beagleOutputBase+"."+beagleInput.getName+".r2") } @@ -57,8 +62,8 @@ class BeagleGenotypeRefinement extends QScript { var refine = new BeagleRefinement refine.beagleInput = beagleInput.out refine.beagleOutputBase = beagleBase - refine.beagleMemoryGigs = 4 - refine.memoryLimit = Some(4) + refine.beagleMemoryGigs = 6 + refine.memoryLimit = Some(6) refine.freezeOutputs var vcfConvert = new BeagleOutputToVCF with GATKArgs