Commit 7175df93 authored by Sander Bollen's avatar Sander Bollen

merge comments on xhmm wrappers

parent 5ef60ac7
package nl.lumc.sasc.biopet.extensions.xhmm
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
/**
* Created by Sander Bollen on 23-11-16.
......@@ -10,6 +12,7 @@ import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
abstract class Xhmm extends BiopetCommandLineFunction with Version {
executable = config("exe", namespace = "xhmm", default = "xhmm")
var discoverParamsFile: File = config("discover_params", namespace = "xhmm")
def versionCommand = executable + " --version"
def versionRegex = """xhmm (.*)""".r
......
......@@ -22,16 +22,21 @@ class XhmmDiscover(val root: Configurable) extends Xhmm with Summarizable {
@Input
var r: File = _
@Argument
var discoverParamsFile: File = config("discover_params", namespace = "xhmm")
private var _outputXcnvAuxFile: File = _
private lazy val outputXcnvAuxFile: File = {
new File(outputXcnv.getAbsolutePath + ".aux")
}
@Output
var outputXcnvAuxFile = _outputXcnvAuxFile
@Argument
var xhmmAnalysisName: String = _
override def beforeGraph() = {
super.beforeGraph()
if (outputXcnv == null) {
throw new IllegalStateException("Must set output file")
}
_outputXcnvAuxFile = new File(outputXcnv.getAbsolutePath + ".aux")
}
def cmdLine = {
executable + required("--discover") +
required("-r", inputMatrix) +
......
......@@ -23,8 +23,15 @@ class XhmmGenotype(val root: Configurable) extends Xhmm with Reference {
@Input
var r: File = _
@Argument
var discoverParamsFile: File = config("discover_params", namespace = "xhmm")
@Input
var f: File = _
override def beforeGraph() = {
super.beforeGraph()
if (f == null) {
f = referenceFasta()
}
}
def cmdLine = {
executable + required("--genotype") +
......@@ -32,7 +39,7 @@ class XhmmGenotype(val root: Configurable) extends Xhmm with Reference {
required("-r", inputMatrix) +
required("-R", r) +
required("-g", inputXcnv) +
required("-F", referenceFasta()) +
required("-F", f) +
required("-v", outputVcf)
}
......
......@@ -28,37 +28,26 @@ class XhmmMatrix(val root: Configurable) extends Xhmm {
@Input(required = false)
var inputExcludeSamples: List[File] = Nil
@Argument
var minTargetSize: Int = config("min_target_size", namespace = "xhmm", default = 10)
var minTargetSize: Int = config("min_target_size", namespace = "xhmm_matrix", default = 10)
@Argument
var maxTargetSize: Int = config("max_target_size", namespace = "xhmm", default = 10000)
var maxTargetSize: Int = config("max_target_size", namespace = "xhmm_matrix", default = 10000)
@Argument
var minMeanTargetRD: Int = config("min_mean_target_rd", namespace = "xhmm", default = 10)
var minMeanTargetRD: Int = config("min_mean_target_rd", namespace = "xhmm_matrix", default = 10)
@Argument
var maxMeanTargetRD: Int = config("max_mean_target_rd", namespace = "xhmm", default = 500)
var maxMeanTargetRD: Int = config("max_mean_target_rd", namespace = "xhmm_matrix", default = 500)
@Argument
var minMeanSampleRD: Int = config("min_mean_sample_rd", namespace = "xhmm", default = 25)
var minMeanSampleRD: Int = config("min_mean_sample_rd", namespace = "xhmm_matrix", default = 25)
@Argument
var maxMeanSampleRD: Int = config("max_mean_sample_rd", namespace = "xhmm", default = 200)
var maxMeanSampleRD: Int = config("max_mean_sample_rd", namespace = "xhmm_matrix", default = 200)
@Argument
var maxSdSampleRD: Int = config("max_sd_sample_rd", namespace = "xhmm", default = 150)
var maxSdSampleRD: Int = config("max_sd_sample_rd", namespace = "xhmm_matrix", default = 150)
@Argument
var maxsdTargetRD: Int = config("max_sd_target_rd", namespace = "xhmm", default = 30)
var maxsdTargetRD: Int = config("max_sd_target_rd", namespace = "xhmm_matrix", default = 30)
@Argument
var centerData: Boolean = false
@Argument
var centerType: String = "sample"
@Argument
var zScoreData: Boolean = false
private def subCmdLine = {
......
......@@ -17,7 +17,9 @@ class XhmmMergeGatkDepths(val root: Configurable) extends Xhmm {
var output: File = _
def cmdLine = {
executable + required("--mergeGATKdepths") + repeat("--GATKdepths", gatkDepthsFiles) + required("-o", output)
executable + required("--mergeGATKdepths") +
repeat("--GATKdepths", gatkDepthsFiles) +
required("-o", output)
}
}
......@@ -19,11 +19,9 @@ class XhmmNormalize(val root: Configurable) extends Xhmm {
@Output
var normalizeOutput: File = _
@Argument
var normalizeMethod: String = config("normalize_method", namespace = "xhmm", default = "PVE_mean")
var normalizeMethod: String = config("normalize_method", namespace = "xhmm_normalize", default = "PVE_mean")
@Argument
var pveFactor: Float = config("pve_mean_factor", namespace = "xhmm", default = 0.7)
var pveFactor: Float = config("pve_mean_factor", namespace = "xhmm_normalize", default = 0.7)
def cmdLine = {
executable + required("--normalize") +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment