Sigh. Fix the source of even more UserErrors in the phone home directory: make sure to gunzip the beagle files before passing them into the conversion walker...

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4399 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2010-10-01 03:28:36 +00:00
parent fa9c21c020
commit 7639692e5b
1 changed files with 14 additions and 2 deletions

View File

@ -25,6 +25,13 @@ class BeagleGenotypeRefinement extends QScript {
this.jarFile = qscript.gatkJar
}
class GunzipFile(in: File, out:File ) extends CommandLineFunction {
@Input(doc="file to gunzip") var inp = in
@Output(doc="file to gunzip to") var outp = out
def commandLine = "gunzip -c %s > %s".format(inp.getAbsolutePath, outp.getAbsolutePath)
}
class BeagleRefinement extends CommandLineFunction {
@Input(doc="The beagle input file") var beagleInput: File = _
var beagleOutputBase: String = _
@ -66,15 +73,20 @@ class BeagleGenotypeRefinement extends QScript {
refine.memoryLimit = Some(6)
refine.freezeOutputs
var unzipPhased = new GunzipFile(refine.beaglePhasedFile,swapExt(refine.beaglePhasedFile,".gz",".bgl"))
var unzipProbs = new GunzipFile(refine.beagleLikelihoods,swapExt(refine.beagleLikelihoods,".gz",".bgl"))
var vcfConvert = new BeagleOutputToVCF with GATKArgs
vcfConvert.variantVCF = inputVCF
vcfConvert.rodBind :+= new RodBind("beagleR2","BEAGLE",refine.beagleRSquared)
vcfConvert.rodBind :+= new RodBind("beaglePhased","BEAGLE",refine.beaglePhasedFile)
vcfConvert.rodBind :+= new RodBind("beagleProbs","BEAGLE",refine.beagleLikelihoods)
vcfConvert.rodBind :+= new RodBind("beaglePhased","BEAGLE",unzipPhased.outp)
vcfConvert.rodBind :+= new RodBind("beagleProbs","BEAGLE",unzipProbs.outp)
vcfConvert.out = outputVCF
commands :+= beagleInput
commands :+= refine
commands :+= unzipPhased
commands :+= unzipProbs
commands :+= vcfConvert
return commands