gatk-3.8/scala/src/org/broadinstitute/sting/queue/engine/CommandLineRunner.scala

18 lines
517 B
Scala
Raw Normal View History

package org.broadinstitute.sting.queue.engine
import org.broadinstitute.sting.queue.util.{Logging, ProcessUtils}
import org.broadinstitute.sting.queue.function.CommandLineFunction
/**
* Runs jobs one at a time locally
*/
trait CommandLineRunner extends Logging {
def run(function: CommandLineFunction, qGraph: QGraph) = {
var commandLine = function.commandLine
logger.info(commandLine)
if (!qGraph.dryRun)
ProcessUtils.runCommandAndWait(function.commandLine, function.commandDirectory)
}
}