Skip to content
Snippets Groups Projects
Commit e42f7355 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Fix compile errors

parent d1384de8
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,7 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit ...@@ -166,7 +166,7 @@ class PindelCaller(val root: Configurable) extends BiopetCommandLineFunction wit
optional("--MIN_DD_CLUSTER_SIZE", MIN_DD_CLUSTER_SIZE) + optional("--MIN_DD_CLUSTER_SIZE", MIN_DD_CLUSTER_SIZE) +
optional("--MIN_DD_BREAKPOINT_SUPPORT", MIN_DD_BREAKPOINT_SUPPORT) + optional("--MIN_DD_BREAKPOINT_SUPPORT", MIN_DD_BREAKPOINT_SUPPORT) +
optional("--MIN_DD_MAP_DISTANCE", MIN_DD_MAP_DISTANCE) + 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 { object PindelCaller {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
* license, please contact us to obtain a separate license. * license, please contact us to obtain a separate license.
*/ */
package nl.lumc.sasc.biopet.extensions.pindel package nl.lumc.sasc.biopet.extensions.pindel
import collection.JavaConversions._
import java.io.{PrintWriter, File} import java.io.{ PrintWriter, File }
import htsjdk.samtools.SamReaderFactory import htsjdk.samtools.SamReaderFactory
import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
...@@ -70,16 +70,13 @@ object PindelConfig extends ToolCommand { ...@@ -70,16 +70,13 @@ object PindelConfig extends ToolCommand {
val commandArgs: Args = argsParser.parse(args, Args()) getOrElse sys.exit(1) val commandArgs: Args = argsParser.parse(args, Args()) getOrElse sys.exit(1)
val input: File = commandArgs.inputbam 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 insertsize: Int = commandArgs.insertsize.getOrElse(0)
val bamReader = SamReaderFactory.makeDefault().open(input) val bamReader = SamReaderFactory.makeDefault().open(input)
val writer = new PrintWriter(output) val writer = new PrintWriter(output)
var sampleName: String = "" for (readgroup <- bamReader.getFileHeader.getReadGroups().toList) {
for( readgroup <- bamReader.getFileHeader.getReadGroups() ) { writer.write(s"${input.getAbsoluteFile}\t${insertsize}\t${readgroup.getSample}\n")
val rg = bamReader.getFileHeader.getReadGroup( readgroup )
writer.write( s"${input.getAbsoluteFile}\t${insertsize}\t${rg.getSample}")
} }
bamReader.close() bamReader.close()
writer.close() writer.close()
......
...@@ -17,8 +17,8 @@ package nl.lumc.sasc.biopet.pipelines.shiva.svcallers ...@@ -17,8 +17,8 @@ package nl.lumc.sasc.biopet.pipelines.shiva.svcallers
import java.io.File import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetQScript, PipelineCommand} import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.pindel.{PindelCaller, PindelCaller$, PindelConfig} import nl.lumc.sasc.biopet.extensions.pindel.{ PindelCaller, PindelCaller$, PindelConfig }
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript import org.broadinstitute.gatk.queue.QScript
...@@ -27,35 +27,12 @@ class Pindel(val root: Configurable) extends SvCaller { ...@@ -27,35 +27,12 @@ class Pindel(val root: Configurable) extends SvCaller {
val name = "pindel" val name = "pindel"
def this() = this(null) 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() { def biopetScript() {
for ((sample, bamFile) <- inputBams) { for ((sample, bamFile) <- inputBams) {
val pindelDir = new File(outputDir, sample) 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) val cfg = new PindelConfig(this)
cfg.input = bamFile cfg.input = bamFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment