Commit 31c70f58 authored by Sander Bollen's avatar Sander Bollen
Browse files

extensions arround extensions!

parent 0b31238b
......@@ -9,10 +9,12 @@ import org.broadinstitute.gatk.utils.commandline.Argument
class ManweDataSourcesDownload(val root: Configurable) extends Manwe {
@Argument(doc = "uri to data source to download")
var uri: Option[String] = _
var uri: String = _
def subCommand = {
required("data-sources") + required("download") + required(uri)
}
this.deps
}
......@@ -11,7 +11,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Output }
class ManweSamplesActivate(val root: Configurable) extends Manwe {
@Argument(doc = "uri to sample to activate")
var uri: Option[String] = _
var uri: String = _
def subCommand = {
required("samples") + required("activate") +
......
package nl.lumc.sasc.biopet.pipelines.toucan
import nl.lumc.sasc.biopet.extensions.manwe.{ManweAnnotateVcf, ManweSamplesActivate, ManweSamplesImport}
import nl.lumc.sasc.biopet.utils.config.Configurable
import scala.io.Source
/**
* Created by ahbbollen on 9-10-15.
* Wrapper for manwe activate after importing and annotating
*/
class ManweActivateAfterAnnotImport(root: Configurable,
annotate: ManweAnnotateVcf,
imported: ManweSamplesImport) extends ManweSamplesActivate(root) {
override def beforeGraph: Unit = {
super.beforeGraph
require(annotate != null, "Annotate should be defined")
require(imported != null, "Imported should be defined")
this.deps :+= annotate.jobOutputFile
this.deps :+= imported.jobOutputFile
}
override def beforeCmd: Unit = {
super.beforeCmd
val reader = Source.fromFile(imported.output)
this.uri = reader.getLines().toList.head
reader.close()
}
}
package nl.lumc.sasc.biopet.pipelines.toucan
import java.io.File
import nl.lumc.sasc.biopet.extensions.manwe.{ManweAnnotateVcf, ManweDataSourcesDownload}
import nl.lumc.sasc.biopet.utils.config.Configurable
import scala.io.Source
/**
* Created by ahbbollen on 9-10-15.
*/
class ManweDownloadAfterAnnotate(root: Configurable,
annotate: ManweAnnotateVcf) extends ManweDataSourcesDownload(root) {
override def beforeGraph: Unit = {
super.beforeGraph
require(annotate != null, "Annotate should be defined")
this.deps :+= annotate.jobOutputFile
}
override def beforeCmd: Unit = {
super.beforeCmd
val reader = Source.fromFile(annotate.output)
this.uri = reader.getLines().toList.head
reader.close()
}
}
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