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:
parent
fa9c21c020
commit
7639692e5b
|
|
@ -25,6 +25,13 @@ class BeagleGenotypeRefinement extends QScript {
|
||||||
this.jarFile = qscript.gatkJar
|
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 {
|
class BeagleRefinement extends CommandLineFunction {
|
||||||
@Input(doc="The beagle input file") var beagleInput: File = _
|
@Input(doc="The beagle input file") var beagleInput: File = _
|
||||||
var beagleOutputBase: String = _
|
var beagleOutputBase: String = _
|
||||||
|
|
@ -66,15 +73,20 @@ class BeagleGenotypeRefinement extends QScript {
|
||||||
refine.memoryLimit = Some(6)
|
refine.memoryLimit = Some(6)
|
||||||
refine.freezeOutputs
|
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
|
var vcfConvert = new BeagleOutputToVCF with GATKArgs
|
||||||
vcfConvert.variantVCF = inputVCF
|
vcfConvert.variantVCF = inputVCF
|
||||||
vcfConvert.rodBind :+= new RodBind("beagleR2","BEAGLE",refine.beagleRSquared)
|
vcfConvert.rodBind :+= new RodBind("beagleR2","BEAGLE",refine.beagleRSquared)
|
||||||
vcfConvert.rodBind :+= new RodBind("beaglePhased","BEAGLE",refine.beaglePhasedFile)
|
vcfConvert.rodBind :+= new RodBind("beaglePhased","BEAGLE",unzipPhased.outp)
|
||||||
vcfConvert.rodBind :+= new RodBind("beagleProbs","BEAGLE",refine.beagleLikelihoods)
|
vcfConvert.rodBind :+= new RodBind("beagleProbs","BEAGLE",unzipProbs.outp)
|
||||||
vcfConvert.out = outputVCF
|
vcfConvert.out = outputVCF
|
||||||
|
|
||||||
commands :+= beagleInput
|
commands :+= beagleInput
|
||||||
commands :+= refine
|
commands :+= refine
|
||||||
|
commands :+= unzipPhased
|
||||||
|
commands :+= unzipProbs
|
||||||
commands :+= vcfConvert
|
commands :+= vcfConvert
|
||||||
|
|
||||||
return commands
|
return commands
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue