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

Added executable to command

parent 1dd927a3
......@@ -2,8 +2,9 @@ package nl.lumc.sasc.biopet.extensions.samtools
import java.io.File
import com.google.common.io.Files
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Output, Input}
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by pjvanthof on 22/09/15.
......@@ -19,12 +20,18 @@ class SamtoolsSort(val root: Configurable) extends Samtools {
var compresion: Option[Int] = config("l")
var outputFormat: Option[String] = config("O")
var sortByName: Boolean = config("sort_by_name", default = false)
val prefix: String = config("prefix", default = new File(qSettings.tempDirectory, output.getAbsolutePath))
var prefix: String = _
def cmdLine = optional("-m", (coreMemeory + "G")) +
override def beforeGraph(): Unit = {
super.beforeGraph()
prefix = config("prefix", default = new File(Files.createTempDir(), output.getAbsolutePath))
}
def cmdLine = executable + required("sort") +
optional("-m", (coreMemeory + "G")) +
optional("-@", threads) +
optional("-O", outputFormat) +
conditional(sortByName, "-n") +
(if (outputAsStsout) "" else required("-o", output)) +
(if (outputAsStsout) "" else required("-o", output)) +
(if (inputAsStdin) "" else required(input))
}
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