Commit f4fb8907 authored by Peter van 't Hof's avatar Peter van 't Hof

Remove "reference" from testing

(cherry picked from commit 8bf162ad)
parent 23a9cd94
......@@ -109,7 +109,6 @@ object ShivaTest {
"dir" -> "test",
"vep_script" -> "test",
"output_dir" -> outputDir,
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
......
......@@ -131,7 +131,6 @@ object ShivaVariantcallingTest {
"cache" -> true,
"dir" -> "test",
"vep_script" -> "test",
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
......
......@@ -17,12 +17,13 @@ package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.summary.Summarizable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
/** Extension for picard CollectAlignmentSummaryMetrics */
class CollectAlignmentSummaryMetrics(val root: Configurable) extends Picard with Summarizable {
class CollectAlignmentSummaryMetrics(val root: Configurable) extends Picard with Summarizable with Reference {
javaMainClass = new picard.analysis.CollectAlignmentSummaryMetrics().getClass.getName
@Input(doc = "The input SAM or BAM files to analyze. Must be coordinate sorted.", required = true)
......@@ -41,7 +42,7 @@ class CollectAlignmentSummaryMetrics(val root: Configurable) extends Picard with
var output: File = _
@Argument(doc = "Reference file", required = false)
var reference: File = config("reference")
var reference: File = _
@Argument(doc = "ASSUME_SORTED", required = false)
var assumeSorted: Boolean = config("assumeSorted", default = true)
......@@ -52,6 +53,11 @@ class CollectAlignmentSummaryMetrics(val root: Configurable) extends Picard with
@Argument(doc = "STOP_AFTER", required = false)
var stopAfter: Option[Long] = config("stopAfter")
override def beforeGraph(): Unit = {
super.beforeGraph()
if (reference == null) reference = referenceFasta()
}
/** Returns command to execute */
override def cmdLine = super.cmdLine +
required("INPUT=", input, spaceSeparated = false) +
......
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.summary.Summarizable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
......@@ -24,7 +25,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
import scala.collection.immutable.Nil
/** Extension for picard CollectInsertSizeMetrics */
class CollectInsertSizeMetrics(val root: Configurable) extends Picard with Summarizable {
class CollectInsertSizeMetrics(val root: Configurable) extends Picard with Summarizable with Reference {
javaMainClass = new picard.analysis.CollectInsertSizeMetrics().getClass.getName
@Input(doc = "The input SAM or BAM files to analyze. Must be coordinate sorted.", required = true)
......@@ -37,7 +38,7 @@ class CollectInsertSizeMetrics(val root: Configurable) extends Picard with Summa
protected var outputHistogram: File = null
@Argument(doc = "Reference file", required = false)
var reference: File = config("reference")
var reference: File = _
@Argument(doc = "DEVIATIONS", required = false)
var deviations: Option[Double] = config("deviations")
......@@ -59,6 +60,7 @@ class CollectInsertSizeMetrics(val root: Configurable) extends Picard with Summa
override def beforeGraph() {
outputHistogram = new File(output + ".pdf")
if (reference == null) reference = referenceFasta()
}
/** Returns command to execute */
......
......@@ -116,7 +116,6 @@ object CarpTest {
copyFile("ref.fa.fai")
val executables = Map(
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"fastqc" -> Map("exe" -> "test"),
"seqtk" -> Map("exe" -> "test"),
......
......@@ -198,7 +198,6 @@ object GentrapTest {
copyFile("ref.fa.fai")
val executables = Map(
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"refFlat" -> "test",
"annotation_gtf" -> "test",
......
......@@ -109,7 +109,6 @@ object ShivaTest {
"cache" -> true,
"dir" -> "test",
"vep_script" -> "test",
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
......
......@@ -112,7 +112,6 @@ object ShivaVariantcallingTest {
"cache" -> true,
"dir" -> "test",
"vep_script" -> "test",
"reference" -> (outputDir + File.separator + "ref.fa"),
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
......
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