Commit 8c08d89b authored by Sander van der Zeeuw's avatar Sander van der Zeeuw

Merge branch 'feature-yamsvp' into 'develop'

Feature yamsvp

Merging into develop to change the extensions/tools section

keep yamsvp branch for development!

See merge request !122
parents 2015429b 4d46a85e
......@@ -15,21 +15,18 @@
# license, please contact us to obtain a separate license.
#
__copyright__ = """
Copyright (C) 2013 - Tim te Beek
Copyright (C) 2013 - Wai Yi Leung
Copyright (C) 2013 AllBio (see AUTHORS file)
"""
__desc__ = """Convert breakdancer output to pseudo .vcf file format."""
__desc__ = """Convert breakdancer output to VCF v4.2 .file format."""
__created__ = "Mar 18, 2013"
__author__ = "tbeek"
__author__ = "tbeek,wyleung"
import argparse
import csv
import os.path
import sys
import datetime
......@@ -43,16 +40,10 @@ def main(tsvfile, vcffile):
with open(tsvfile) as reader:
# Parse file
dictreader = _parse_tsvfile(reader)
print dictreader.fieldnames
# Write out file
_format_vcffile(dictreader, vcffile)
# Quick output
with open(vcffile) as reader:
print reader.read(1000)
def _parse_tsvfile(readable):
'''
Read readable using csv.Sniffer and csv.DictReader
......@@ -111,7 +102,38 @@ VCF_HEADER = """##fileformat=VCFv4.1
##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of Samples With Data">
##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency">
##INFO=<ID=SVLEN,Number=1,Type=Integer,Description="Length of variation">
##INFO=<ID=IMPRECISE,Number=0,Type=Flag,Description="Imprecise structural variation">
##INFO=<ID=NOVEL,Number=0,Type=Flag,Description="Indicates a novel structural variation">
##INFO=<ID=SVEND,Number=1,Type=Integer,Description="End position of the variant described in this record">
##INFO=<ID=END,Number=1,Type=Integer,Description="End position of the variant described in this record">
##INFO=<ID=SVTYPE,Number=1,Type=String,Description="Type of structural variant">
##INFO=<ID=SVLEN,Number=.,Type=Integer,Description="Difference in length between REF and ALT alleles">
##INFO=<ID=CIPOS,Number=2,Type=Integer,Description="Confidence interval around POS for imprecise variants">
##INFO=<ID=CIEND,Number=2,Type=Integer,Description="Confidence interval around END for imprecise variants">
##INFO=<ID=HOMLEN,Number=.,Type=Integer,Description="Length of base pair identical micro-homology at event breakpoints">
##INFO=<ID=HOMSEQ,Number=.,Type=String,Description="Sequence of base pair identical micro-homology at event breakpoints">
##INFO=<ID=BKPTID,Number=.,Type=String,Description="ID of the assembled alternate allele in the assembly file">
##INFO=<ID=MEINFO,Number=4,Type=String,Description="Mobile element info of the form NAME,START,END,POLARITY">
##INFO=<ID=METRANS,Number=4,Type=String,Description="Mobile element transduction info of the form CHR,START,END,POLARITY">
##INFO=<ID=DGVID,Number=1,Type=String,Description="ID of this element in Database of Genomic Variation">
##INFO=<ID=DBVARID,Number=1,Type=String,Description="ID of this element in DBVAR">
##INFO=<ID=DBRIPID,Number=1,Type=String,Description="ID of this element in DBRIP">
##INFO=<ID=MATEID,Number=.,Type=String,Description="ID of mate breakends">
##INFO=<ID=PARID,Number=1,Type=String,Description="ID of partner breakend">
##INFO=<ID=EVENT,Number=1,Type=String,Description="ID of event associated to breakend">
##INFO=<ID=CILEN,Number=2,Type=Integer,Description="Confidence interval around the inserted material between breakends">
##INFO=<ID=DP,Number=1,Type=Integer,Description="Read Depth of segment containing breakend">
##INFO=<ID=DPADJ,Number=.,Type=Integer,Description="Read Depth of adjacency">
##INFO=<ID=CN,Number=1,Type=Integer,Description="Copy number of segment containing breakend">
##INFO=<ID=CNADJ,Number=.,Type=Integer,Description="Copy number of adjacency">
##INFO=<ID=CICN,Number=2,Type=Integer,Description="Confidence interval around copy number for the segment">
##INFO=<ID=CICNADJ,Number=.,Type=Integer,Description="Confidence interval around copy number for the adjacency">
##FORMAT=<ID=CN,Number=1,Type=Integer,Description="Copy number genotype for imprecise events">
##FORMAT=<ID=CNQ,Number=1,Type=Float,Description="Copy number genotype quality for imprecise events">
##FORMAT=<ID=CNL,Number=.,Type=Float,Description="Copy number genotype likelihood for imprecise events">
##FORMAT=<ID=NQ,Number=1,Type=Integer,Description="Phred style probability score that the variant is novel">
##FORMAT=<ID=HAP,Number=1,Type=Integer,Description="Unique haplotype identifier">
##FORMAT=<ID=AHAP,Number=1,Type=Integer,Description="Unique identifier of ancestral haplotype">
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth">""".format( filedate=TS_NOW.strftime( "%Y%m%d" ) )
......@@ -140,6 +162,7 @@ def _format_vcffile(dictreader, vcffile):
if line['Type'] not in ['CTX']:
INFO += ';SVLEN={}'.format(int(line['Size']))
INFO += ";SVEND={}".format(SVEND)
INFO += ";END={}".format(SVEND)
# write alternate ALT field for Intrachromosomal translocations
if line['Type'] in ['CTX']:
......
/**
* 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.breakdancer
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import org.broadinstitute.gatk.queue.QScript
/// Breakdancer is actually a mini pipeline executing binaries from the breakdancer package
class Breakdancer(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
var input: File = _
@Input(doc = "Reference Fasta file")
var reference: File = _
@Argument(doc = "Work directory")
var workdir: String = _
var deps: List[File] = Nil
@Output(doc = "Breakdancer config")
lazy val configfile: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.cfg")
}
@Output(doc = "Breakdancer raw output")
lazy val outputraw: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.tsv")
}
@Output(doc = "Breakdancer VCF output")
lazy val outputvcf: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.vcf")
}
override def init() {
}
def biopetScript() {
// read config and set all parameters for the pipeline
logger.info("Starting Breakdancer configuration")
val bdcfg = BreakdancerConfig(this, input, this.configfile)
bdcfg.deps = this.deps
outputFiles += ("cfg" -> bdcfg.output)
add(bdcfg)
val breakdancer = BreakdancerCaller(this, bdcfg.output, this.outputraw)
add(breakdancer)
outputFiles += ("tsv" -> breakdancer.output)
val bdvcf = BreakdancerVCF(this, breakdancer.output, this.outputvcf)
add(bdvcf)
outputFiles += ("vcf" -> bdvcf.output)
}
}
object Breakdancer extends PipelineCommand {
def apply(root: Configurable, input: File, reference: File, runDir: String): Breakdancer = {
val breakdancer = new Breakdancer(root)
breakdancer.input = input
breakdancer.reference = reference
breakdancer.workdir = runDir
breakdancer.init
breakdancer.biopetScript
return breakdancer
}
}
\ No newline at end of file
/**
* 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.svcallers
package nl.lumc.sasc.biopet.extensions.breakdancer
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import org.broadinstitute.gatk.queue.QScript
import nl.lumc.sasc.biopet.core.BiopetQScript
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
class BreakdancerConfig(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", default = "bam2cfg.pl", freeVar = false)
@Input(doc = "Bam File")
var input: File = _
@Output(doc = "Output File")
var output: File = _
var min_mq: Option[Int] = config("min_mq", default = 20) // minimum of MQ to consider for taking read into histogram
var use_mq: Boolean = config("use_mq", default = false)
var min_insertsize: Option[Int] = config("min_insertsize", default = 450)
var solid_data: Boolean = config("solid", default = false)
var sd_cutoff: Option[Int] = config("sd_cutoff", default = 4) // Cutoff in unit of standard deviation [4]
// we set this to a higher number to avoid biases in small numbers in sorted bams
var min_observations: Option[Int] = config("min_observations", default = 10000) // Number of observation required to estimate mean and s.d. insert size [10_000]
var coefvar_cutoff: Option[Int] = config("coef_cutoff", default = 1) // Cutoff on coefficients of variation [1]
var histogram_bins: Option[Int] = config("histogram_bins", default = 50) // Number of bins in the histogram [50]
def cmdLine = required(executable) +
optional("-q", min_mq) +
conditional(use_mq, "-m") +
optional("-s", min_insertsize) +
conditional(solid_data, "-s") +
optional("-c", sd_cutoff) +
optional("-n", min_observations) +
optional("-v", coefvar_cutoff) +
optional("-b", histogram_bins) +
required(input) + " 1> " + required(output)
}
object BreakdancerConfig {
def apply(root: Configurable, input: File, output: File): BreakdancerConfig = {
val bdconf = new BreakdancerConfig(root)
bdconf.input = input
bdconf.output = output
return bdconf
}
def apply(root: Configurable, input: File, outputDir: String): BreakdancerConfig = {
val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
val outputFile = new File(dir + swapExtension(input.getName))
return apply(root, input, outputFile)
}
def apply(root: Configurable, input: File): BreakdancerConfig = {
return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
}
private def swapExtension(inputFile: String) = inputFile.substring(0, inputFile.lastIndexOf(".bam")) + ".breakdancer.cfg"
}
/*
* The caller
*
**/
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class BreakdancerCaller(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", default = "breakdancer-max", freeVar = false)
override val defaultCoreMemory = 4.0
override val defaultThreads = 1 // breakdancer can only work on 1 single thread
override val versionRegex = """.*[Vv]ersion:? (.*)""".r
......@@ -101,7 +25,7 @@ class BreakdancerCaller(val root: Configurable) extends BiopetCommandLineFunctio
var output: File = _
/*
Options:
Options:
-o STRING operate on a single chromosome [all chromosome]
-s INT minimum length of a region [7]
-c INT cutoff in unit of standard deviation [3]
......@@ -165,65 +89,3 @@ object BreakdancerCaller {
return bdcaller
}
}
/// Breakdancer is actually a mini pipeline executing binaries from the breakdancer package
class Breakdancer(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
var input: File = _
@Input(doc = "Reference Fasta file")
var reference: File = _
@Argument(doc = "Work directory")
var workdir: String = _
var deps: List[File] = Nil
@Output(doc = "Breakdancer config")
lazy val configfile: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.cfg")
}
@Output(doc = "Breakdancer raw output")
lazy val outputraw: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.tsv")
}
@Output(doc = "Breakdancer VCF output")
lazy val outputvcf: File = {
new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".breakdancer.vcf")
}
override def init() {
}
def biopetScript() {
// read config and set all parameters for the pipeline
logger.info("Starting Breakdancer configuration")
val bdcfg = BreakdancerConfig(this, input, this.configfile)
bdcfg.deps = this.deps
outputFiles += ("cfg" -> bdcfg.output)
add(bdcfg)
val breakdancer = BreakdancerCaller(this, bdcfg.output, this.outputraw)
add(breakdancer)
outputFiles += ("tsv" -> breakdancer.output)
val bdvcf = BreakdancerVCF(this, breakdancer.output, this.outputvcf)
add(bdvcf)
outputFiles += ("vcf" -> bdvcf.output)
}
}
object Breakdancer extends PipelineCommand {
def apply(root: Configurable, input: File, reference: File, runDir: String): Breakdancer = {
val breakdancer = new Breakdancer(root)
breakdancer.input = input
breakdancer.reference = reference
breakdancer.workdir = runDir
breakdancer.init
breakdancer.biopetScript
return breakdancer
}
}
\ No newline at end of file
package nl.lumc.sasc.biopet.extensions.breakdancer
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class BreakdancerConfig(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", default = "bam2cfg.pl", freeVar = false)
@Input(doc = "Bam File")
var input: File = _
@Output(doc = "Output File")
var output: File = _
var min_mq: Option[Int] = config("min_mq", default = 20) // minimum of MQ to consider for taking read into histogram
var use_mq: Boolean = config("use_mq", default = false)
var min_insertsize: Option[Int] = config("min_insertsize", default = 450)
var solid_data: Boolean = config("solid", default = false)
var sd_cutoff: Option[Int] = config("sd_cutoff", default = 4) // Cutoff in unit of standard deviation [4]
// we set this to a higher number to avoid biases in small numbers in sorted bams
var min_observations: Option[Int] = config("min_observations", default = 10000) // Number of observation required to estimate mean and s.d. insert size [10_000]
var coefvar_cutoff: Option[Int] = config("coef_cutoff", default = 1) // Cutoff on coefficients of variation [1]
var histogram_bins: Option[Int] = config("histogram_bins", default = 50) // Number of bins in the histogram [50]
def cmdLine = required(executable) +
optional("-q", min_mq) +
conditional(use_mq, "-m") +
optional("-s", min_insertsize) +
conditional(solid_data, "-s") +
optional("-c", sd_cutoff) +
optional("-n", min_observations) +
optional("-v", coefvar_cutoff) +
optional("-b", histogram_bins) +
required(input) + " 1> " + required(output)
}
object BreakdancerConfig {
def apply(root: Configurable, input: File, output: File): BreakdancerConfig = {
val bdconf = new BreakdancerConfig(root)
bdconf.input = input
bdconf.output = output
return bdconf
}
def apply(root: Configurable, input: File, outputDir: String): BreakdancerConfig = {
val dir = if (outputDir.endsWith("/")) outputDir else outputDir + "/"
val outputFile = new File(dir + swapExtension(input.getName))
return apply(root, input, outputFile)
}
def apply(root: Configurable, input: File): BreakdancerConfig = {
return apply(root, input, new File(swapExtension(input.getAbsolutePath)))
}
private def swapExtension(inputFile: String) = inputFile.substring(0, inputFile.lastIndexOf(".bam")) + ".breakdancer.cfg"
}
......@@ -13,17 +13,13 @@
* 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.svcallers
package nl.lumc.sasc.biopet.extensions.breakdancer
import java.io.File
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import argonaut._, Argonaut._
import scalaz._, Scalaz._
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.PythonCommandLineFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class BreakdancerVCF(val root: Configurable) extends PythonCommandLineFunction {
setPythonScript("breakdancer2vcf.py")
......
/**
* 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.clever
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import org.broadinstitute.gatk.queue.QScript
class Clever(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
var input: File = _
@Input(doc = "Reference")
var reference: File = _
@Argument(doc = "Work directory")
var workdir: String = _
@Argument(doc = "Current working directory")
var cwd: String = _
override def init() {
}
def biopetScript() {
// write the pipeline here
logger.info("Starting Clever Pipeline")
/// start clever and then copy the vcf into the root directory "<sample>.clever/"
val clever = CleverCaller(this, input, reference, cwd, workdir)
outputFiles += ("clever_vcf" -> clever.outputvcf)
add(clever)
}
}
object Clever extends PipelineCommand {
override val pipeline = "/nl/lumc/sasc/biopet/extensions/svcallers/Clever/Clever.class"
def apply(root: Configurable, input: File, runDir: String): Clever = {
val cleverpipeline = new Clever(root)
cleverpipeline.input = input
cleverpipeline.workdir = runDir
cleverpipeline.init
cleverpipeline.biopetScript
return cleverpipeline
}
}
\ No newline at end of file
/**
* 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.svcallers
package nl.lumc.sasc.biopet.extensions.clever
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import org.broadinstitute.gatk.queue.QScript
import nl.lumc.sasc.biopet.core.BiopetQScript
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.PipelineCommand
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import java.io.File
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
class Clever(val root: Configurable) extends BiopetCommandLineFunction {
class CleverCaller(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", default = "clever")
private lazy val versionexecutable: File = config("version_exe", default = (new File(executable).getParent + "/ctk-version"))
override val defaultCoreMemory = 3.0
override val defaultThreads = 8
override def versionCommand = versionexecutable.getAbsolutePath
......@@ -81,56 +63,13 @@ class Clever(val root: Configurable) extends BiopetCommandLineFunction {
required(this.workdir)
}
object Clever {
def apply(root: Configurable, input: File, reference: File, svDir: String, runDir: String): Clever = {
val clever = new Clever(root)
object CleverCaller {
def apply(root: Configurable, input: File, reference: File, svDir: String, runDir: String): CleverCaller = {
val clever = new CleverCaller(root)
clever.input = input
clever.reference = reference
clever.cwd = svDir
clever.workdir = runDir
return clever
}
}
class CleverPipeline(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
var input: File = _
@Input(doc = "Reference")
var reference: File = _
@Argument(doc = "Work directory")
var workdir: String = _
@Argument(doc = "Current working directory")
var cwd: String = _
override def init() {
}
def biopetScript() {
// write the pipeline here
logger.info("Starting Clever Pipeline")
/// start clever and then copy the vcf into the root directory "<sample>.clever/"
val clever = Clever(this, input, reference, cwd, workdir)
outputFiles += ("clever_vcf" -> clever.outputvcf)
add(clever)
}
}
object CleverPipeline extends PipelineCommand {
override val pipeline = "/nl/lumc/sasc/biopet/extensions/svcallers/Clever/Clever.class"
def apply(root: Configurable, input: File, runDir: String): CleverPipeline = {
val cleverpipeline = new CleverPipeline(root)
cleverpipeline.input = input
cleverpipeline.workdir = runDir
cleverpipeline.init
cleverpipeline.biopetScript
return cleverpipeline
}
}
\ No newline at end of file
package nl.lumc.sasc.biopet.extensions.delly
import java.io.File
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.queue.extensions.gatk.CatVariants
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
import nl.lumc.sasc.biopet.core.BiopetQScript
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.Ln
class Delly(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
@Input(doc = "Input file (bam)")
var input: File = _
@Argument(doc = "Work directory")
var workdir: String = _
@Output(doc = "Delly result VCF")
var outputvcf: File = _
var outputBaseName: String = _
// select the analysis types DEL,DUP,INV,TRA
var del: Boolean = config("DEL", default = false)
var dup: Boolean = config("DUP", default = false)
var inv: Boolean = config("INV", default = false)
var tra: Boolean = config("TRA", default = false)
override def init() {
}
def biopetScript() {
// write the pipeline here
logger.info("Configuring Delly pipeline")
var outputFiles: Map[String, File] = Map()
var vcfFiles: Map[String, File] = Map()
this.outputBaseName = workdir + input.getName.substring(0, input.getName.lastIndexOf(".bam"))
this.outputvcf = outputBaseName + ".delly.vcf"
/// start delly and then copy the vcf into the root directory "<sample>.delly/"
if (del) {
val delly = new DellyCaller(this)
delly.input = input
delly.analysistype = "DEL"
delly.outputvcf = outputBaseName + ".delly.del.vcf"