Commit 6f21013e authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added extension for merge otu maps

parent 9698cb6d
package nl.lumc.sasc.biopet.extensions.qiime
import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
/**
* Created by pjvan_thof on 12/10/15.
*/
class MergeOtuMaps(val root: Configurable) extends BiopetCommandLineFunction with Version {
executable = config("exe", default = "merge_otu_maps.py")
def versionCommand = executable + " --version"
def versionRegex = """Version: (.*)""".r
@Input(required = true)
var input: List[File] = Nil
@Output(required = true)
var outputFile: File = _
var failures_fp: Option[File] = None
override def beforeGraph(): Unit = {
super.beforeGraph()
require(input.nonEmpty)
require(outputFile != null)
}
def cmdLine = executable +
(input match {
case l: List[_] if l.nonEmpty => required("-i", l.mkString(","))
case _ => ""
}) +
required("-o", outputFile) +
optional("--failures_fp", failures_fp)
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment