Commit 6563368e authored by Sander Bollen's avatar Sander Bollen
Browse files

xhmm matrix

parent 03af79a2
package nl.lumc.sasc.biopet.extensions.xhmm
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Argument, Input, Output}
/**
* Created by Sander Bollen on 23-11-16.
*/
class XhmmMatrix(val root: Configurable) extends Xhmm {
@Input
var inputMatrix: File = _
@Output
var outputMatrix: File = _
@Output(required = false)
var outputExcludedTargets: Option[File] = None
@Output(required = false)
var outputExcludedSamples: Option[File] = None
@Input(required = false)
var inputExcludeTargets: List[File] = Nil
@Input(required = false)
var inputExcludeSamples: List[File] = Nil
@Argument
var minTargetSize: Int = config("min_target_size", namespace = "xhmm", default = 10)
@Argument
var maxTargetSize: Int = config("max_target_size", namespace = "xhmm", default = 10000)
@Argument
var minMeanTargetRD: Int = config("min_mean_target_rd", namespace = "xhmm", default = 10)
@Argument
var maxMeanTargetRD: Int = config("max_mean_target_rd", namespace = "xhmm", default = 500)
@Argument
var minMeanSampleRD: Int = config("min_mean_sample_rd", namespace = "xhmm", default = 25)
@Argument
var maxMeanSampleRD: Int = config("max_mean_sample_rd", namespace = "xhmm", default = 200)
@Argument
var maxSdSampleRD: Int = config("max_sd_sample_rd", namespace = "xhmm", default = 150)
@Argument
var maxsdTargetRD: Int = config("max_sd_target_rd", namespace = "xhmm", default = 30)
@Argument
var centerData: Boolean = false
@Argument
var centerType: String = "sample"
@Argument
var zScoreData: Boolean = false
private def subCmdLine = {
if (inputExcludeSamples.nonEmpty && inputExcludeTargets.nonEmpty) {
repeat("--excludeTargets", inputExcludeTargets) + repeat("--excludeSamples", inputExcludeSamples)
} else if (centerData && zScoreData) {
conditional(centerData, "--centerData") + conditional(zScoreData, "--centerData") + required("--maxSdTargetRD", maxsdTargetRD)
} else {
required("--minTargetSize", minTargetSize) +
required("--maxTargetSize", maxTargetSize) +
required("--minMeanTargetRD", minMeanTargetRD) +
required("--maxMeanTargetRD", maxMeanTargetRD) +
required("--minMeanSampleRd", minMeanSampleRD) +
required("--maxMeanSampleRd", maxMeanSampleRD) +
required("--maxSdSampleRD", maxSdSampleRD)
}
}
def cmdLine = {
executable + required("--matrix") +
required("-r", inputMatrix) +
required("-o", outputMatrix) +
optional("--excludedTargets", outputExcludedTargets) +
optional("--excludedSamples", outputExcludedSamples) + subCmdLine
}
}
......@@ -17,7 +17,7 @@ class XhmmMergeGatkDepths(val root: Configurable) extends Xhmm {
var output: File = _
def cmdLine = {
executable + repeat("--GATKdepths", gatkDepthsFiles) + required("-o", output)
executable + required("--mergeGATKdepths") + repeat("--GATKdepths", gatkDepthsFiles) + required("-o", output)
}
}
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