From 59459ae6757910c432d98873ba7db87b15003c6d Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Tue, 3 Jun 2014 11:40:18 +0200
Subject: [PATCH] Added Ln wrapper

---
 .../nl/lumc/sasc/biopet/wrappers/Ln.scala     | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala

diff --git a/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala
new file mode 100644
index 000000000..f09971730
--- /dev/null
+++ b/biopet-framework/src/main/java/nl/lumc/sasc/biopet/wrappers/Ln.scala
@@ -0,0 +1,25 @@
+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.commandline._
+import java.io.File
+
+class Ln(val globalConfig: Config) extends CommandLineFunction {
+  def this() = this(new Config(Map()))
+  this.analysisName = "ln"
+  val config: Config = globalConfig.getAsConfig(this.analysisName)
+  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 %s %s".format(in, out)
+}
+
+object Ln {
+  def addLn(input:File, output:File) : Ln = {
+    return new Ln { this.in = input; this.out = output }
+  }
+}
\ No newline at end of file
-- 
GitLab