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

Switched to InProcessFunction, no cluster job needed for ln commands

parent 27ec36f7
No related branches found
No related tags found
No related merge requests found
package nl.lumc.sasc.biopet.wrappers
import nl.lumc.sasc.biopet.core._
import org.broadinstitute.sting.queue.function.CommandLineFunction
//import org.broadinstitute.sting.queue.function.QFunction
import org.broadinstitute.sting.queue.function.InProcessFunction
import org.broadinstitute.sting.commandline._
import java.io.File
import scala.sys.process._
class Ln(val globalConfig: Config) extends CommandLineFunction {
class Ln(val globalConfig: Config) extends InProcessFunction {
def this() = this(new Config(Map()))
this.analysisName = "ln"
val config: Config = Config.mergeConfigs(globalConfig.getAsConfig(analysisName), globalConfig)
logger.debug("Config for " + this.analysisName + ": " + config)
@Input(doc="Input file") var in: File = _
@Output(doc="Link destination") var out: File = _
def commandLine = {
"ln -sf " + required(in) + required(out)
override def run {
val cmd = "ln -s " + in + " " + out
val exitcode = cmd.!
System.out.println("cmd: '" + cmd + "', exitcode: " + exitcode)
}
}
object Ln {
def addLn(input:File, output:File) : Ln = {
return new Ln { this.in = input; this.out = output }
}
}
\ No newline at end of file
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