Commit e98f7409 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added scala docs for bedtools

parent c58fbc6a
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.extensions.bedtools
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
/** General abstract class for bedtools extensions */
abstract class Bedtools extends BiopetCommandLineFunction {
override def subPath = "bedtools" :: super.subPath
executable = config("exe", default = "bedtools", submodule = "bedtools")
......
......@@ -19,6 +19,7 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
/** Extension for bedtools coverage */
class BedtoolsCoverage(val root: Configurable) extends Bedtools {
@Input(doc = "Input file (bed/gff/vcf/bam)")
var input: File = _
......@@ -44,6 +45,7 @@ class BedtoolsCoverage(val root: Configurable) extends Bedtools {
if (input.getName.endsWith(".bam")) inputTag = "-abam"
}
/** Returns command to execute */
def cmdLine = required(executable) + required("coverage") +
required(inputTag, input) +
required("-b", intersectFile) +
......@@ -54,6 +56,7 @@ class BedtoolsCoverage(val root: Configurable) extends Bedtools {
}
object BedtoolsCoverage {
/** Returns defaul bedtools coverage */
def apply(root: Configurable, input: File, intersect: File, output: File,
depth: Boolean = true, sameStrand: Boolean = false, diffStrand: Boolean = false): BedtoolsCoverage = {
val bedtoolsCoverage = new BedtoolsCoverage(root)
......@@ -63,6 +66,6 @@ object BedtoolsCoverage {
bedtoolsCoverage.depth = depth
bedtoolsCoverage.sameStrand = sameStrand
bedtoolsCoverage.diffStrand = diffStrand
return bedtoolsCoverage
bedtoolsCoverage
}
}
\ No newline at end of file
......@@ -19,6 +19,7 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
/** Extension for bedtools intersect */
class BedtoolsIntersect(val root: Configurable) extends Bedtools {
@Input(doc = "Input file (bed/gff/vcf/bam)")
var input: File = _
......@@ -41,6 +42,7 @@ class BedtoolsIntersect(val root: Configurable) extends Bedtools {
if (input.getName.endsWith(".bam")) inputTag = "-abam"
}
/** Returns command to execute */
def cmdLine = required(executable) + required("intersect") +
required(inputTag, input) +
required("-b", intersectFile) +
......@@ -50,6 +52,7 @@ class BedtoolsIntersect(val root: Configurable) extends Bedtools {
}
object BedtoolsIntersect {
/** Returns default bedtools intersect */
def apply(root: Configurable, input: File, intersect: File, output: File,
minOverlap: Double = 0, count: Boolean = false): BedtoolsIntersect = {
val bedtoolsIntersect = new BedtoolsIntersect(root)
......
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