Commit 2052cfc3 authored by Sander Bollen's avatar Sander Bollen
Browse files

autostyle changes

parent c2087e09
...@@ -4,11 +4,11 @@ import java.io.File ...@@ -4,11 +4,11 @@ import java.io.File
import nl.lumc.sasc.biopet.core.ToolCommandFunction import nl.lumc.sasc.biopet.core.ToolCommandFunction
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Argument, Input, Output} import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
/** /**
* Created by Sander Bollen on 24-11-16. * Created by Sander Bollen on 24-11-16.
*/ */
class XcnvToBed(val root: Configurable) extends ToolCommandFunction { class XcnvToBed(val root: Configurable) extends ToolCommandFunction {
def toolObject = nl.lumc.sasc.biopet.tools.XcnvToBed def toolObject = nl.lumc.sasc.biopet.tools.XcnvToBed
......
package nl.lumc.sasc.biopet.tools package nl.lumc.sasc.biopet.tools
import java.io.{BufferedWriter, File, FileWriter} import java.io.{ BufferedWriter, File, FileWriter }
import nl.lumc.sasc.biopet.tools.VepNormalizer.Args import nl.lumc.sasc.biopet.tools.VepNormalizer.Args
import nl.lumc.sasc.biopet.utils.ToolCommand import nl.lumc.sasc.biopet.utils.ToolCommand
...@@ -8,8 +8,8 @@ import nl.lumc.sasc.biopet.utils.ToolCommand ...@@ -8,8 +8,8 @@ import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.io.Source import scala.io.Source
/** /**
* Created by Sander Bollen on 24-11-16. * Created by Sander Bollen on 24-11-16.
*/ */
object XcnvToBed extends ToolCommand { object XcnvToBed extends ToolCommand {
def main(args: Array[String]): Unit = { def main(args: Array[String]): Unit = {
...@@ -17,7 +17,6 @@ object XcnvToBed extends ToolCommand { ...@@ -17,7 +17,6 @@ object XcnvToBed extends ToolCommand {
.parse(args, Args()) .parse(args, Args())
.getOrElse(throw new IllegalArgumentException) .getOrElse(throw new IllegalArgumentException)
val writer = new BufferedWriter(new FileWriter(commandArgs.outputBed)) val writer = new BufferedWriter(new FileWriter(commandArgs.outputBed))
Source.fromFile(commandArgs.inputXcnv). Source.fromFile(commandArgs.inputXcnv).
getLines(). getLines().
...@@ -46,7 +45,7 @@ object XcnvToBed extends ToolCommand { ...@@ -46,7 +45,7 @@ object XcnvToBed extends ToolCommand {
} }
} }
case class Args(inputXcnv: File = null, outputBed: File = null , sample: String = null) extends AbstractArgs case class Args(inputXcnv: File = null, outputBed: File = null, sample: String = null) extends AbstractArgs
class OptParser extends AbstractOptParser { class OptParser extends AbstractOptParser {
head("Convert a sample track within an XHMM XCNV file to a BED track. Fourt column indicates deletion (-1), normal (0) or duplication (1) of region") head("Convert a sample track within an XHMM XCNV file to a BED track. Fourt column indicates deletion (-1), normal (0) or duplication (1) of region")
...@@ -58,12 +57,12 @@ object XcnvToBed extends ToolCommand { ...@@ -58,12 +57,12 @@ object XcnvToBed extends ToolCommand {
} text { } text {
"Input XCNV file" "Input XCNV file"
} }
opt[File]('O', "Output") required() valueName "<bed>" action { (x,c) => opt[File]('O', "Output") required () valueName "<bed>" action { (x, c) =>
c.copy(outputBed = x) c.copy(outputBed = x)
} text { } text {
"Output BED file" "Output BED file"
} }
opt[String]('S', "Sample") required() action { (x,c) => opt[String]('S', "Sample") required () action { (x, c) =>
c.copy(sample = x) c.copy(sample = x)
} text { } text {
"The sample which to select" "The sample which to select"
......
...@@ -101,7 +101,7 @@ class XhmmMethod(val root: Configurable) extends CnvMethod with Reference { ...@@ -101,7 +101,7 @@ class XhmmMethod(val root: Configurable) extends CnvMethod with Reference {
// create bed files // create bed files
val bedDir = new File(xhmmDir, "beds") val bedDir = new File(xhmmDir, "beds")
val beds = inputBams.keys.map{ x => val beds = inputBams.keys.map { x =>
val z = new XcnvToBed(this) val z = new XcnvToBed(this)
z.inputXcnv = discover.outputXcnv z.inputXcnv = discover.outputXcnv
z.sample = x z.sample = x
......
Supports Markdown
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