Commit afbc2c46 authored by Peter van 't Hof's avatar Peter van 't Hof Committed by GitHub

Merge pull request #39 from biopet/add-wisecondor-wrappers

Add wisecondor extensions
parents 2299e7a9 72896404
package nl.lumc.sasc.biopet.extensions.wisecondor
import java.io.File
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Reference, Version }
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Created by Sander Bollen on 20-3-17.
*/
abstract class Wisecondor extends BiopetCommandLineFunction with Version with Reference {
executable = config("exe", namespace = "wisecondor", default = "wisecondor")
@Input(required = false)
var binFile: Option[File] = config("bin_file", namespace = "wisecondor", default = None)
@Output
var output: File = _
// either binSize or binFile must exist
var binSize: Option[Int] = config("bin_size", namespace = "wisecondor", default = None)
def binCommand: String = {
if (binFile.isDefined && binSize.isEmpty) {
required("-L", binFile)
} else if (binSize.isDefined && binFile.isEmpty) {
required("-B", binSize)
} else {
throw new IllegalStateException("bin_file *or* bin_size must be defined")
}
}
def versionCommand = executable + " --version"
def versionRegex = """.+, version (.*)""".r
}
package nl.lumc.sasc.biopet.extensions.wisecondor
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input
/**
* Created by Sander Bollen on 20-3-17.
*/
class WisecondorCount(val root: Configurable) extends Wisecondor {
@Input
var inputBam: File = _
def cmdLine = executable +
required("count") +
required("-I", inputBam) +
required("-O", output) +
required("-R", referenceFasta()) +
binCommand
}
package nl.lumc.sasc.biopet.extensions.wisecondor
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input
/**
* Created by Sander Bollen on 20-3-17.
*/
class WisecondorGcCorrect(val root: Configurable) extends Wisecondor {
@Input
var inputBed: File = _
var fracN: Option[Float] = config("frac_n", namespace = "wisecondor", default = None)
var fracR: Option[Float] = config("frac_r", namespace = "wisecondor", default = None)
var nIter: Option[Int] = config("iter", namespace = "wisecondor", default = None)
var fracLowess: Option[Float] = config("frac_lowess", namespace = "wisecondor", default = None)
def cmdLine = executable +
required("gc-correct") +
required("-I", inputBed) +
required("-R", referenceFasta()) +
required("-O", output) +
binCommand +
optional("-n", fracN) +
optional("-r", fracR) +
optional("-t", nIter) +
optional("-l", fracLowess)
}
package nl.lumc.sasc.biopet.extensions.wisecondor
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input
/**
* Created by Sander Bollen on 22-3-17.
*/
class WisecondorNewRef(val root: Configurable) extends Wisecondor {
@Input
var inputBeds: List[File] = Nil
var nNeighbourBins: Option[Int] = config("n_neighbour_bins", namespace = "wisecondor", default = None)
def cmdLine = executable +
required("newref") +
repeat("-I", inputBeds) +
required("-O", output) +
required("-R", referenceFasta()) +
binCommand +
optional("-n", nNeighbourBins)
}
package nl.lumc.sasc.biopet.extensions.wisecondor
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input
/**
* Created by Sander Bollen on 20-3-17.
*/
class WisecondorZscore(val root: Configurable) extends Wisecondor {
@Input
var inputBed: File = _
@Input
var referenceDictionary: File = config("reference_dictionary", namespace = "wisecondor")
def cmdLine = executable +
required("zscore") +
required("-I", inputBed) +
required("-O", output) +
required("-R", referenceFasta()) +
required("-D", referenceDictionary) +
binCommand
}
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