From e98f74093f4e07ccc452b424ad3fc590431d4356 Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Thu, 5 Mar 2015 17:14:00 +0100
Subject: [PATCH] Added scala docs for bedtools

---
 .../nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala   | 1 +
 .../sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala   | 5 ++++-
 .../sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala  | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala
index cf7f16e38..d9aa1dd94 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/Bedtools.scala
@@ -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")
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
index 37266ccb1..73ddfc803 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsCoverage.scala
@@ -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
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
index 19071be64..8465efca7 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/bedtools/BedtoolsIntersect.scala
@@ -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)
-- 
GitLab