Clever.scala 1.74 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * 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.
 */
Peter van 't Hof's avatar
Peter van 't Hof committed
16
17
package nl.lumc.sasc.biopet.pipelines.shiva.svcallers

18
19
import nl.lumc.sasc.biopet.extensions.clever.{CleverCaller, CleverFixVCF}
import nl.lumc.sasc.biopet.extensions.picard.SortVcf
Peter van 't Hof's avatar
Peter van 't Hof committed
20
21
22
23
24
25
26
27
28
29
30
31
import nl.lumc.sasc.biopet.utils.config.Configurable

/** Script for sv caler Clever */
class Clever(val root: Configurable) extends SvCaller {
  def name = "clever"

  def biopetScript() {
    //TODO: check double directories
    for ((sample, bamFile) <- inputBams) {
      val cleverDir = new File(outputDir, sample)
      val clever = CleverCaller(this, bamFile, cleverDir)
      add(clever)
32

33
34
      val cleverVCF = new CleverFixVCF(this)
      cleverVCF.input = clever.outputvcf
35
      cleverVCF.output = new File(cleverDir, s".${sample}.clever.vcf")
36
      cleverVCF.sampleName = sample + "_cl"
37
      cleverVCF.isIntermediate = true
38
39
      add(cleverVCF)

40
41
      val sortvcf = new SortVcf(this)
      sortvcf.input = cleverVCF.output
42
      sortvcf.output = new File(cleverDir, s"${sample}.clever.vcf.gz")
43
44
45
      add(sortvcf)

      addVCF(sample, sortvcf.output)
Peter van 't Hof's avatar
Peter van 't Hof committed
46
47
48
    }
  }
}