Commit 2a6a08ee authored by bow's avatar bow

Merge branch 'feature-igvtools' into 'develop'

Fix igvtools

This starts igvtools directly from the jar instead using the wrapper from igvtools itself

See merge request !448
parents 0db306c4 3a302742
......@@ -14,16 +14,17 @@
*/
package nl.lumc.sasc.biopet.extensions.igvtools
import nl.lumc.sasc.biopet.core.{ Version, BiopetCommandLineFunction }
import nl.lumc.sasc.biopet.core.{ BiopetJavaCommandLineFunction, Version }
/**
* General igvtools extension
*
* Created by wyleung on 5-1-15
*/
abstract class IGVTools extends BiopetCommandLineFunction with Version {
executable = config("exe", default = "igvtools", namespace = "igvtools", freeVar = false)
def versionCommand = executable + " version"
abstract class IGVTools extends BiopetJavaCommandLineFunction with Version {
jarFile = config("igvtools_jar", namespace = "igvtools")
def versionCommand = executable + s" -jar ${jarFile.getAbsolutePath} version"
def versionRegex = """IGV Version:? ([\w\.]*) .*""".r
override def versionExitcode = List(0)
}
\ No newline at end of file
......@@ -76,25 +76,23 @@ class IGVToolsCount(val root: Configurable) extends IGVTools {
}
/** Returns command to execute */
def cmdLine = {
required(executable) +
required("count") +
optional("--maxZoom", maxZoom) +
optional("--windowSize", windowSize) +
optional("--extFactor", extFactor) +
optional("--preExtFactor", preExtFactor) +
optional("--postExtFactor", postExtFactor) +
optional("--windowFunctions", windowFunctions) +
optional("--strands", strands) +
conditional(bases, "--bases") +
optional("--query", query) +
optional("--minMapQuality", minMapQuality) +
conditional(includeDuplicates, "--includeDuplicates") +
conditional(pairs, "--pairs") +
required(input) +
required(outputArg) +
required(genomeChromSizes)
}
override def cmdLine = super.cmdLine +
required("count") +
optional("--maxZoom", maxZoom) +
optional("--windowSize", windowSize) +
optional("--extFactor", extFactor) +
optional("--preExtFactor", preExtFactor) +
optional("--postExtFactor", postExtFactor) +
optional("--windowFunctions", windowFunctions) +
optional("--strands", strands) +
conditional(bases, "--bases") +
optional("--query", query) +
optional("--minMapQuality", minMapQuality) +
conditional(includeDuplicates, "--includeDuplicates") +
conditional(pairs, "--pairs") +
required(input) +
required(outputArg) +
required(genomeChromSizes)
/** This part should never fail, these values are set within this wrapper */
private def outputArg: String = {
......
......@@ -125,7 +125,7 @@ object CarpTest {
"bwa" -> Map("exe" -> "test"),
"samtools" -> Map("exe" -> "test"),
"macs2" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test", "igvtools_jar" -> "test"),
"wigtobigwig" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test")
)
......
......@@ -194,6 +194,7 @@ object GentrapTest {
"ribosome_refflat" -> (outputDir + File.separator + "ref.fa"),
"varscan_jar" -> "test",
"rscript" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test", "igvtools_jar" -> "test"),
"gatk_jar" -> "test"
) ++ Seq(
// fastqc executables
......@@ -203,7 +204,7 @@ object GentrapTest {
// gentrap executables
"cufflinks", "htseqcount", "grep", "pdflatex", "rscript", "tabix", "bgzip", "bedtoolscoverage", "md5sum",
// bam2wig executables
"igvtools", "wigtobigwig"
"wigtobigwig"
).map { case exe => exe -> Map("exe" -> "test") }.toMap
val sample1: Map[String, Any] = Map(
......
......@@ -126,6 +126,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
"skip_metrics" -> skipMetrics,
"skip_flexiprep" -> skipFlexiprep,
"skip_markduplicates" -> skipMarkduplicates,
"paired" -> inputR2.isDefined,
"aligner" -> aligner,
"chunking" -> chunking,
"number_of_chunks" -> (if (chunking) numberChunks.getOrElse(1) else None)
......
......@@ -49,6 +49,8 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
val wgsExecuted = summary.getSampleValues("bammetrics", "stats", "wgs").values.exists(_.isDefined)
val rnaExecuted = summary.getSampleValues("bammetrics", "stats", "rna").values.exists(_.isDefined)
val insertsizeExecuted = summary.getSampleValues("bammetrics", "stats", "CollectInsertSizeMetrics", "metrics").values.exists(_ != Some(None))
val mappingExecuted = summary.getLibraryValues("mapping").nonEmpty
val pairedFound = !mappingExecuted || summary.getLibraryValues("mapping", "settings", "paired").exists(_._2 == Some(true))
val flexiprepExecuted = summary.getLibraryValues("flexiprep")
.exists { case ((sample, lib), value) => value.isDefined }
......@@ -71,7 +73,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
List("Alignment" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp",
Map("sampleLevel" -> true, "showPlot" -> true, "showTable" -> false)
)) ++
(if (insertsizeExecuted) List("Insert Size" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp",
(if (pairedFound) List("Insert Size" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp",
Map("sampleLevel" -> true, "showPlot" -> true, "showTable" -> false)))
else Nil) ++
(if (wgsExecuted) List("Whole genome coverage" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/wgsHistogram.ssp",
......
......@@ -194,7 +194,7 @@ object MultisampleMappingTestTrait {
"cutadapt" -> Map("exe" -> "test"),
"bwa" -> Map("exe" -> "test"),
"samtools" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test", "igvtools_jar" -> "test"),
"wigtobigwig" -> Map("exe" -> "test"),
"kraken" -> Map("exe" -> "test", "db" -> "test"),
"krakenreport" -> Map("exe" -> "test", "db" -> "test"),
......
......@@ -210,7 +210,7 @@ object ShivaTest {
"bwa" -> Map("exe" -> "test"),
"samtools" -> Map("exe" -> "test"),
"macs2" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test", "igvtools_jar" -> "test"),
"wigtobigwig" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
......
......@@ -134,7 +134,7 @@ object TinyCapTest {
"cutadapt" -> Map("exe" -> "test"),
"bowtie" -> Map("exe" -> "test"),
"htseqcount" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test", "igvtools_jar" -> "test"),
"wigtobigwig" -> 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