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