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

21 lines
614 B
Scala
Executable File

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) = {
if (logger.isDebugEnabled) {
logger.debug(function.commandDirectory + " > " + function.commandLine)
} else {
logger.info(function.commandLine)
}
if (!qGraph.dryRun)
ProcessUtils.runCommandAndWait(function.commandLine, function.commandDirectory)
}
}