Commit 9c552b07 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Merge branch 'feature-delly-merge' into shiva-refactor

Conflicts:
	public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaSvCalling.scala
parents f64fad3c 815a271f
......@@ -25,7 +25,7 @@
<dependencies>
<dependency>
<groupId>nl.lumc.sasc</groupId>
<artifactId>BiopetCore</artifactId>
<artifactId>BiopetExtensions</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package nl.lumc.sasc.biopet.extensions.gatk
import java.io.File
import nl.lumc.sasc.biopet.core.{ Reference, BiopetJavaCommandLineFunction }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class CatVariants(val root: Configurable) extends BiopetJavaCommandLineFunction with Reference {
javaMainClass = classOf[org.broadinstitute.gatk.tools.CatVariants].getClass.getName
@Input(required = true)
var inputFiles: List[File] = Nil
@Output(required = true)
var outputFile: File = null
@Input
var reference: File = null
override def beforeGraph(): Unit = {
super.beforeGraph()
if (reference == null) reference = referenceFasta()
}
override def cmdLine = super.cmdLine +
repeat("-V", inputFiles) +
required("-out", outputFile) +
required("-R", reference)
}
object CatVariants {
def apply(root: Configurable, input: List[File], output: File): CatVariants = {
val cv = new CatVariants(root)
cv.inputFiles = input
cv.outputFile = output
cv
}
}
\ No newline at end of file
......@@ -10,8 +10,6 @@ import org.broadinstitute.gatk.engine.phonehome.GATKRunReport
import org.broadinstitute.gatk.queue.extensions.gatk.CommandLineGATK
trait GatkGeneral extends CommandLineGATK with CommandLineResources with Reference with Version {
memoryLimit = Option(3)
var executable: String = config("java", default = "java", submodule = "java", freeVar = false)
override def subPath = "gatk" :: super.subPath
......
......@@ -13,17 +13,20 @@
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
package nl.lumc.sasc.biopet.extensions.delly
package nl.lumc.sasc.biopet.pipelines.shiva
import java.io.File
import nl.lumc.sasc.biopet.core.{ Reference, BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference }
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.delly.DellyCaller
import nl.lumc.sasc.biopet.extensions.gatk.CatVariants
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.queue.extensions.gatk.CatVariants
class Delly(val root: Configurable) extends QScript with BiopetQScript with Reference {
class Delly(val root: Configurable) extends QScript with Reference with SummaryQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
......@@ -49,9 +52,27 @@ class Delly(val root: Configurable) extends QScript with BiopetQScript with Refe
if (outputVcf == null) outputVcf = new File(workDir, outputName + ".delly.vcf")
}
override def summaryFile: File = new File(workDir, "Delly.summary.json")
override def summaryFiles: Map[String, File] = Map.empty ++
Map("input" -> input) ++
Map("outputVCF" -> outputVcf)
override def summarySettings = {
Map(
"workDir" -> workDir,
"outputName" -> outputName,
"del" -> del,
"dup" -> dup,
"inv" -> inv,
"tra" -> tra
)
}
def biopetScript() {
// write the pipeline here
logger.info("Configuring Delly pipeline")
var outputFiles: Map[String, File] = Map()
var vcfFiles: Map[String, File] = Map()
......@@ -91,15 +112,13 @@ class Delly(val root: Configurable) extends QScript with BiopetQScript with Refe
// we need to merge the vcf's
val finalVCF = if (vcfFiles.size > 1) {
// do merging
// CatVariants is a $org.broadinstitute.gatk.utils.commandline.CommandLineProgram$;
//TODO: convert to biopet extension
val variants = new CatVariants()
variants.variant = vcfFiles.values.toList
val variants = new CatVariants(this)
variants.inputFiles = vcfFiles.values.toList
variants.outputFile = this.outputVcf
variants.reference = referenceFasta()
// variants.reference = referenceFasta()
// add the job
//add(variants)
Some(outputVcf)
add(variants)
Some(variants.outputFile)
} else if (vcfFiles.size == 1) {
// TODO: pretify this
val ln = Ln(this, vcfFiles.head._2, this.outputVcf, relative = true)
......@@ -112,8 +131,6 @@ class Delly(val root: Configurable) extends QScript with BiopetQScript with Refe
}
object Delly extends PipelineCommand {
override val pipeline = "/nl/lumc/sasc/biopet/extensions/svcallers/Delly/Delly.class"
def apply(root: Configurable, input: File, workDir: File): Delly = {
val dellyPipeline = new Delly(root)
dellyPipeline.input = input
......
......@@ -21,15 +21,15 @@ package nl.lumc.sasc.biopet.pipelines.yamsvp
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.{ MultiSampleQScript, PipelineCommand }
import nl.lumc.sasc.biopet.core.{MultiSampleQScript, PipelineCommand}
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.breakdancer.Breakdancer
import nl.lumc.sasc.biopet.extensions.clever.CleverCaller
import nl.lumc.sasc.biopet.extensions.igvtools.IGVToolsCount
import nl.lumc.sasc.biopet.extensions.sambamba.{ SambambaMarkdup, SambambaMerge }
import nl.lumc.sasc.biopet.extensions.sambamba.{SambambaMarkdup, SambambaMerge}
import nl.lumc.sasc.biopet.pipelines.shiva.Delly
import nl.lumc.sasc.biopet.utils.config.Configurable
//import nl.lumc.sasc.biopet.extensions.pindel.Pindel
import nl.lumc.sasc.biopet.extensions.delly.Delly
import nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics
import nl.lumc.sasc.biopet.pipelines.mapping.Mapping
import org.broadinstitute.gatk.queue.QScript
......
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