UnifiedGenotyper.scala 1.69 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * 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 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
15
16
17
18
19
/**
 * Due to the license issue with GATK, this part of Biopet can only be used inside the
 * LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions
 * on how to use this protected part of biopet or contact us at sasc@lumc.nl
 */
20
package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
21

Peter van 't Hof's avatar
Peter van 't Hof committed
22
import nl.lumc.sasc.biopet.extensions.gatk
23
import nl.lumc.sasc.biopet.extensions.gatk.BqsrGather
24
import nl.lumc.sasc.biopet.utils.config.Configurable
25
26

/** Default mode for UnifiedGenotyper */
Peter van 't Hof's avatar
Peter van 't Hof committed
27
class UnifiedGenotyper(val parent: Configurable) extends Variantcaller {
28
29
30
31
  val name = "unifiedgenotyper"
  protected def defaultPrio = 20

  def biopetScript() {
Peter van 't Hof's avatar
Peter van 't Hof committed
32
    val ug = gatk.UnifiedGenotyper(this, inputBams.values.toList, outputFile)
33
34
35
36
37
38
39
    ug.BQSR = if (inputBqsrFiles.isEmpty) None else {
      val gather = new BqsrGather
      gather.inputBqsrFiles = inputBqsrFiles.values.toList
      gather.outputBqsrFile = new File(outputDir, "bqsr.merge")
      add(gather)
      Some(gather.outputBqsrFile)
    }
40
41
42
    add(ug)
  }
}