Commit 4ae4de0e authored by Sander Bollen's avatar Sander Bollen

dependency graph is now correct

parent 718bdb25
......@@ -16,100 +16,100 @@ class BcftoolsView(val root: Configurable) extends Bcftools {
@Output(doc = "Output file")
var output: File = _
@Argument(doc = "drop individual genotypes")
@Argument(doc = "drop individual genotypes", required = false)
var dropGenotype: Boolean = false
@Argument(doc = "header only")
@Argument(doc = "header only", required = false)
var headerOnly: Boolean = false
@Argument(doc = "Compression level")
@Argument(doc = "Compression level", required = false)
var compressionLevel: Int = 9
@Argument(doc = "output type")
@Argument(doc = "output type", required = false)
var outputType: String = "z"
@Argument(doc = "regions")
@Argument(doc = "regions", required = false)
var regions: String = _
@Argument(doc = "region file")
@Argument(doc = "region file", required = false)
var regionFile: File = _
@Argument(doc = "targets")
@Argument(doc = "targets", required = false)
var targets: String = _
@Argument(doc = "targets file")
@Argument(doc = "targets file", required = false)
var targetFile: File = _
@Argument(doc = "trim alt alleles")
@Argument(doc = "trim alt alleles", required = false)
var trimAltAlleles: Boolean = false
@Argument(doc = "no update")
@Argument(doc = "no update", required = false)
var noUpdate: Boolean = false
@Argument(doc = "samples")
@Argument(doc = "samples", required = false)
var samples: List[String] = Nil
@Argument(doc = "samples file")
@Argument(doc = "samples file", required = false)
var sampleFile: File = _
@Argument(doc = "minimum allele count")
@Argument(doc = "minimum allele count", required = false)
var minAC: Option[Int] = _
@Argument(doc = "max allele count")
@Argument(doc = "max allele count", required = false)
var maxAC: Option[Int] = _
@Argument(doc = "exclude (expression)")
@Argument(doc = "exclude (expression)", required = false)
var exclude: String = _
@Argument(doc = "apply filters")
@Argument(doc = "apply filters", required = false)
var applyFilters: List[String] = Nil
@Argument(doc = "genotype")
@Argument(doc = "genotype", required = false)
var genotype: String = _
@Argument(doc = "include (expression)")
@Argument(doc = "include (expression)", required = false)
var include: String = _
@Argument(doc = "Known (ID field is not .) only")
@Argument(doc = "Known (ID field is not .) only", required = false)
var known: Boolean = false
@Argument(doc = "min alleles")
@Argument(doc = "min alleles", required = false)
var minAlleles: Option[Int] = _
@Argument(doc = "max alleles")
@Argument(doc = "max alleles", required = false)
var maxAlleles: Option[Int] = _
@Argument(doc = "novel (ID field is .) only")
@Argument(doc = "novel (ID field is .) only", required = false)
var novel: Boolean = false
@Argument(doc = "phased only")
@Argument(doc = "phased only", required = false)
var phased: Boolean = false
@Argument(doc = "exclude phased (only)")
@Argument(doc = "exclude phased (only)", required = false)
var excludePhased: Boolean = false
@Argument(doc = "min allele frequency")
@Argument(doc = "min allele frequency", required = false)
var minAF: Option[Int] = _
@Argument(doc = "max allele frequency")
@Argument(doc = "max allele frequency", required = false)
var maxAF: Option[Int] = _
@Argument(doc = "uncalled only")
@Argument(doc = "uncalled only", required = false)
var uncalled: Boolean = false
@Argument(doc = "exclude uncalled (only)")
@Argument(doc = "exclude uncalled (only)", required = false)
var excludeUncalled: Boolean = false
@Argument(doc = "types")
@Argument(doc = "types", required = false)
var types: String = _
@Argument(doc = "exclude types")
@Argument(doc = "exclude types", required = false)
var excludeTypes: String = _
@Argument(doc = "private (requires samples)")
@Argument(doc = "private (requires samples)", required = false)
var onlyPrivate: Boolean = false
@Argument(doc = "Exclude privates")
@Argument(doc = "Exclude privates", required = false)
var excludePrivate: Boolean = false
override def beforeGraph() = {
......
......@@ -16,7 +16,6 @@ abstract class Manwe extends BiopetCommandLineFunction {
override def defaultCoreMemory = 2.0
override def defaultThreads = 1
@Argument(doc = "Path to manwe config file containing your database settings")
var manweConfig: File = createManweConfig
@Output(doc = "the output file")
......
......@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.extensions.manwe
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Output }
import org.broadinstitute.gatk.utils.commandline.{ Input, Argument, Output }
/**
* Created by ahbbollen on 24-9-15.
......@@ -14,34 +14,34 @@ class ManweSamplesImport(val root: Configurable) extends Manwe {
* Creates sample and imports vcf and bed files immediately
*/
@Argument(doc = "name of sample")
@Argument(doc = "name of sample", required = true)
var name: Option[String] = _
@Argument(doc = "Group uris")
@Argument(doc = "Group uris", required = false)
var group: List[String] = Nil
@Argument(doc = "Vcf files to upload")
@Input(doc = "Vcf files to upload", required = false)
var vcfs: List[File] = Nil
@Argument(doc = "BED files to upload")
@Input(doc = "BED files to upload", required = false)
var beds: List[File] = Nil
@Argument(doc = "flag for data already uploaded")
@Argument(doc = "flag for data already uploaded", required = false)
var alreadyUploaded: Boolean = false
@Argument(doc = "flag to mark sample as public")
@Argument(doc = "flag to mark sample as public", required = false)
var public: Boolean = false
@Argument(doc = "flag if sample has no coverage profile")
@Argument(doc = "flag if sample has no coverage profile", required = false)
var noCoverage: Boolean = false
@Argument(doc = "Prefer genotypes derived from likelihood (PL) fields in stead of GT field")
@Argument(doc = "Prefer genotypes derived from likelihood (PL) fields in stead of GT field", required = false)
var preferLikelihood: Boolean = false
@Argument(doc = "Pool size")
@Argument(doc = "Pool size", required = false)
var poolSize: Option[Int] = _
@Argument(doc = " Flag whether to wait for import to complete on server")
@Argument(doc = " Flag whether to wait for import to complete on server", required = false)
var waitToComplete: Boolean = false
def subCommand = {
......
......@@ -18,13 +18,13 @@ class GvcfToBed(val root: Configurable) extends ToolCommandFuntion {
@Output(doc = "output bed")
var outputBed: File = _
@Argument(doc = "sample")
@Argument(doc = "sample", required = false)
var sample: Option[String] = None
@Argument(doc = "minquality")
@Argument(doc = "minquality", required = false)
var minQuality: Int = 0
@Argument(doc = "inverse")
@Argument(doc = "inverse", required = false)
var inverse: Boolean = false
override def defaultCoreMemory = 4.0
......
......@@ -24,9 +24,13 @@ class ManweActivateAfterAnnotImport(root: Configurable,
override def beforeCmd: Unit = {
super.beforeCmd
val reader = Source.fromFile(imported.output)
this.uri = reader.getLines().toList.head
reader.close()
if (imported.output.exists()) {
val reader = Source.fromFile(imported.output)
this.uri = reader.getLines().toList.head
reader.close()
} else {
this.uri = ""
}
}
}
......@@ -22,9 +22,13 @@ class ManweDownloadAfterAnnotate(root: Configurable,
override def beforeCmd: Unit = {
super.beforeCmd
val reader = Source.fromFile(annotate.output)
this.uri = reader.getLines().toList.head
reader.close()
if (annotate.output.exists()) {
val reader = Source.fromFile(annotate.output)
this.uri = reader.getLines().toList.head
reader.close()
} else {
this.uri = ""
}
}
}
......@@ -117,8 +117,8 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
})
val minGQ = config("minimumGenomeQuality", default = 20)
val annotationQueries: List[String] = config("annotationQueries")
val isPublic: Boolean = config("vardaIsPublic")
val annotationQueries: List[String] = config("annotationQueries", default = Nil)
val isPublic: Boolean = config("vardaIsPublic", default = true)
val filteredVcfs = splits.map(x => {
val filter = new VcfFilter(this)
......@@ -154,12 +154,13 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
val annotatedVcf = new ManweDownloadAfterAnnotate(this, annotate)
annotatedVcf.output = swapExt(annotate.output, ".tmp.annot", "tmp.annot.vcf.gz")
add(annotatedVcf)
val imports = for (
(sample: String, bed, vcf) <- (sampleIds, bedTracks, filteredVcfs).zipped
(sample: String, bed, vcf) <- (sampleIds, zippedBedTracks, filteredVcfs).zipped
) yield {
val importing = new ManweSamplesImport(this)
importing.beds = List(bed.outputBed)
importing.beds = List(bed.output)
importing.vcfs = List(vcf.outputVcf)
importing.name = Some(sample)
importing.waitToComplete = true
......
Markdown is supported
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