RscriptCommandLineFunction.scala 1.23 KB
Newer Older
bow's avatar
bow 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.
 */
16
package nl.lumc.sasc.biopet.core.extensions
Wai Yi Leung's avatar
Wai Yi Leung committed
17

18
import java.io.{ File, FileOutputStream }
Wai Yi Leung's avatar
Wai Yi Leung committed
19 20

import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
21
import nl.lumc.sasc.biopet.utils.rscript.Rscript
Peter van 't Hof's avatar
Peter van 't Hof committed
22

Peter van 't Hof's avatar
Peter van 't Hof committed
23
import scala.sys.process._
Wai Yi Leung's avatar
Wai Yi Leung committed
24 25

/**
Peter van 't Hof's avatar
Peter van 't Hof committed
26 27
 * General rscript extension
 *
Wai Yi Leung's avatar
Wai Yi Leung committed
28 29
 * Created by wyleung on 17-2-15.
 */
30
trait RscriptCommandLineFunction extends BiopetCommandLineFunction with Rscript {
Wai Yi Leung's avatar
Wai Yi Leung committed
31

32
  executable = rscriptExecutable
Wai Yi Leung's avatar
Wai Yi Leung committed
33

Peter van 't Hof's avatar
Peter van 't Hof committed
34
  override def beforeGraph(): Unit = {
35
    checkScript(Some(jobTempDir))
Peter van 't Hof's avatar
Peter van 't Hof committed
36
  }
Wai Yi Leung's avatar
Wai Yi Leung committed
37

38
  def cmdLine: String = repeat(cmd)
Wai Yi Leung's avatar
Wai Yi Leung committed
39
}