Skip to content
Snippets Groups Projects
Commit db4dcbca authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Style changes

parent 66f1b6ec
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ import org.ggf.drmaa.JobTemplate ...@@ -26,7 +26,6 @@ import org.ggf.drmaa.JobTemplate
import scala.collection.mutable import scala.collection.mutable
import scala.io.Source import scala.io.Source
import scala.sys.process.{ Process, ProcessLogger } import scala.sys.process.{ Process, ProcessLogger }
import scala.util.matching.Regex
import scala.collection.JavaConversions._ import scala.collection.JavaConversions._
/** Biopet command line trait to auto check executable and cluster values */ /** Biopet command line trait to auto check executable and cluster values */
...@@ -50,20 +49,18 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction => ...@@ -50,20 +49,18 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
val writer = new PrintWriter(file) val writer = new PrintWriter(file)
writer.println("set -eubf") writer.println("set -eubf")
writer.println("set -o pipefail") writer.println("set -o pipefail")
lines.foreach(writer.println(_)) lines.foreach(writer.println)
writer.close() writer.close()
} }
// This overrides the default "sh" from queue. For Biopet the default is "bash" // This overrides the default "sh" from queue. For Biopet the default is "bash"
updateJobRun = { updateJobRun = {
case jt: JobTemplate => { case jt: JobTemplate =>
changeScript(new File(jt.getArgs.head.toString)) changeScript(new File(jt.getArgs.head.toString))
jt.setRemoteCommand(remoteCommand) jt.setRemoteCommand(remoteCommand)
} case ps: ProcessSettings =>
case ps: ProcessSettings => {
changeScript(new File(ps.getCommand.tail.head)) changeScript(new File(ps.getCommand.tail.head))
ps.setCommand(Array(remoteCommand) ++ ps.getCommand.tail) ps.setCommand(Array(remoteCommand) ++ ps.getCommand.tail)
}
} }
/** /**
...@@ -135,10 +132,9 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction => ...@@ -135,10 +132,9 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
that.beforeGraph() that.beforeGraph()
that.internalBeforeGraph() that.internalBeforeGraph()
this match { this match {
case p: BiopetPipe => { case p: BiopetPipe =>
p.commands.last._outputAsStdout = true p.commands.last._outputAsStdout = true
new BiopetPipe(p.commands ::: that :: Nil) new BiopetPipe(p.commands ::: that :: Nil)
}
case _ => new BiopetPipe(List(this, that)) case _ => new BiopetPipe(List(this, that))
} }
} }
...@@ -209,7 +205,6 @@ object BiopetCommandLineFunction extends Logging { ...@@ -209,7 +205,6 @@ object BiopetCommandLineFunction extends Logging {
if (executable != null) { if (executable != null) {
if (!BiopetCommandLineFunction.executableCache.contains(executable)) { if (!BiopetCommandLineFunction.executableCache.contains(executable)) {
try { try {
val oldExecutable = executable
val buffer = new StringBuffer() val buffer = new StringBuffer()
val cmd = Seq("which", executable) val cmd = Seq("which", executable)
val process = Process(cmd).run(ProcessLogger(buffer.append(_))) val process = Process(cmd).run(ProcessLogger(buffer.append(_)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment