diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala b/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala index f3bbea7c7c21d73744c7d2adf94f9876527427b3..a3204c20f2713a8ddbba0e67399bf9a29b495b01 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala +++ b/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelCaller.scala @@ -166,7 +166,7 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit optional("--MIN_DD_CLUSTER_SIZE", MIN_DD_CLUSTER_SIZE) + optional("--MIN_DD_BREAKPOINT_SUPPORT", MIN_DD_BREAKPOINT_SUPPORT) + optional("--MIN_DD_MAP_DISTANCE", MIN_DD_MAP_DISTANCE) + - optional("--DD_REPORT_DUPLICATION_READS", DD_REPORT_DUPLICATION_READS) + + optional("--DD_REPORT_DUPLICATION_READS", DD_REPORT_DUPLICATION_READS) } object PindelCaller { diff --git a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala b/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala index cef1c6ea23c25aec10a74d5a2311d86c48baf8ff..8255930434ee03d6ea0b3d3268ba4c18785df53f 100644 --- a/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala +++ b/public/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/pindel/PindelConfig.scala @@ -14,8 +14,8 @@ * license, please contact us to obtain a separate license. */ package nl.lumc.sasc.biopet.extensions.pindel - -import java.io.{PrintWriter, File} +import collection.JavaConversions._ +import java.io.{ PrintWriter, File } import htsjdk.samtools.SamReaderFactory import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction @@ -70,16 +70,13 @@ object PindelConfig extends ToolCommand { val commandArgs: Args = argsParser.parse(args, Args()) getOrElse sys.exit(1) val input: File = commandArgs.inputbam - val output: File = commandArgs.output.getOrElse( new File(input.getAbsoluteFile + ".pindel.cfg") ) + val output: File = commandArgs.output.getOrElse(new File(input.getAbsoluteFile + ".pindel.cfg")) val insertsize: Int = commandArgs.insertsize.getOrElse(0) - val bamReader = SamReaderFactory.makeDefault().open(input) val writer = new PrintWriter(output) - var sampleName: String = "" - for( readgroup <- bamReader.getFileHeader.getReadGroups() ) { - val rg = bamReader.getFileHeader.getReadGroup( readgroup ) - writer.write( s"${input.getAbsoluteFile}\t${insertsize}\t${rg.getSample}") + for (readgroup <- bamReader.getFileHeader.getReadGroups().toList) { + writer.write(s"${input.getAbsoluteFile}\t${insertsize}\t${readgroup.getSample}\n") } bamReader.close() writer.close() diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala index 17b669c089543b208e5bff7e06947b97b4d3b2e6..0bccf63d853db3b1f5c8c1129ab1daffd60c82cc 100644 --- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala +++ b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/svcallers/Pindel.scala @@ -17,8 +17,8 @@ package nl.lumc.sasc.biopet.pipelines.shiva.svcallers import java.io.File -import nl.lumc.sasc.biopet.core.{BiopetQScript, PipelineCommand} -import nl.lumc.sasc.biopet.extensions.pindel.{PindelCaller, PindelCaller$, PindelConfig} +import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand } +import nl.lumc.sasc.biopet.extensions.pindel.{ PindelCaller, PindelCaller$, PindelConfig } import nl.lumc.sasc.biopet.utils.config.Configurable import org.broadinstitute.gatk.queue.QScript @@ -27,35 +27,12 @@ class Pindel(val root: Configurable) extends SvCaller { val name = "pindel" 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 = _ -// -// // @Output(doc = "Pindel VCF output") -// // lazy val outputvcf: File = { -// // new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".pindel.vcf") -// // } -// -// @Output(doc = "Pindel config") -// def configfile: File = { -// new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".pindel.cfg") -// } -// @Output(doc = "Pindel raw output") -// def outputvcf: File = { -// new File(workdir + "/" + input.getName.substring(0, input.getName.lastIndexOf(".bam")) + ".pindel.vcf") -// } def biopetScript() { for ((sample, bamFile) <- inputBams) { val pindelDir = new File(outputDir, sample) - val config_file: File = new File( bamFile.getAbsolutePath + ".pindel.cfg" ) + val config_file: File = new File(bamFile.getAbsolutePath + ".pindel.cfg") val cfg = new PindelConfig(this) cfg.input = bamFile