Commit 553a7538 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added wgs metrics

parent c081ba52
......@@ -72,6 +72,11 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
add(CollectGcBiasMetrics(this, inputBam, outputDir))
val wgsMetrics = new CollectWgsMetrics(this)
wgsMetrics.input = inputBam
wgsMetrics.output = swapExt(outputDir, inputBam, ".bam", ".rna.metrics")
add(wgsMetrics)
if (rnaMetrics) {
val rnaMetrics = new CollectRnaSeqMetrics(this)
rnaMetrics.input = inputBam
......@@ -135,7 +140,7 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
val coverageFile = new File(targetDir, inputBam.getName.stripSuffix(".bam") + ".coverage")
//FIXME:should use piping
add(BedtoolsCoverage(this, inputBam, intervals.bed, coverageFile, depth = true), isIntermediate = true)
add(BedtoolsCoverage(this, inputBam, intervals.bed, coverageFile, depth = true), true)
add(CoverageStats(this, coverageFile, targetDir))
}
......
......@@ -61,8 +61,8 @@ class CollectMultipleMetrics(val root: Configurable) extends Picard {
override def commandLine = super.commandLine +
required("INPUT=", input, spaceSeparated = false) +
required("OUTPUT=", outputName, spaceSeparated = false) +
required("ASSUME_SORTED=", assumeSorted, spaceSeparated = false) +
required("STOP_AFTER=", stopAfter, spaceSeparated = false) +
conditional(assumeSorted, "ASSUME_SORTED=true") +
optional("STOP_AFTER=", stopAfter, spaceSeparated = false) +
repeat("PROGRAM=", program, spaceSeparated = false)
}
......
......@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Argument, Output, Input}
import org.broadinstitute.gatk.utils.commandline.{ Argument, Output, Input }
/**
* Created by pjvan_thof on 4/16/15.
......
package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Output, Input }
/**
* Created by pjvan_thof on 4/16/15.
*/
class CollectWgsMetrics(val root: Configurable) extends Picard {
javaMainClass = new picard.analysis.CollectWgsMetrics().getClass.getName
@Input(doc = "The input SAM or BAM files to analyze", required = true)
var input: File = null
@Output(doc = "Metrics file", required = true)
var output: File = null
@Input(doc = "Reference", required = true)
var reference: File = config("reference")
@Argument(doc = "MINIMUM_MAPPING_QUALITY", required = false)
var minMapQ: Option[Int] = config("minimum_mapping_quality")
@Argument(doc = "MINIMUM_BASE_QUALITY", required = false)
var minBaseQ: Option[Int] = config("minimum_base_quality")
@Argument(doc = "COVERAGE_CAP", required = false)
var covCap: Option[Int] = config("coverage_cap")
@Argument(doc = "STOP_AFTER", required = false)
var stopAfter: Option[Long] = config("stop_after")
@Argument(doc = "INCLUDE_BQ_HISTOGRAM", required = false)
var includeBqHistogram: Boolean = config("include_bq_histogram", default = false)
override def commandLine = super.commandLine +
required("INPUT=", input, spaceSeparated = false) +
required("OUTPUT=", output, spaceSeparated = false) +
required("REFERENCE_SEQUENCE=", reference, spaceSeparated = false) +
optional("MINIMUM_MAPPING_QUALITY=", minMapQ, spaceSeparated = false) +
optional("MINIMUM_BASE_QUALITY=", minBaseQ, spaceSeparated = false) +
optional("COVERAGE_CAP=", covCap, spaceSeparated = false) +
optional("STOP_AFTER=", stopAfter, spaceSeparated = false) +
conditional(includeBqHistogram, "INCLUDE_BQ_HISTOGRAM=true")
}
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