BedtoolsSort.scala 681 Bytes
Newer Older
Sander Bollen's avatar
Sander Bollen committed
1
2
3
4
5
6
package nl.lumc.sasc.biopet.extensions.bedtools

import java.io.File

import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.utils.config.Configurable
Sander Bollen's avatar
Sander Bollen committed
7
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
Sander Bollen's avatar
Sander Bollen committed
8
9

/**
Sander Bollen's avatar
Sander Bollen committed
10
11
 * Created by Sander Bollen on 26-5-16.
 */
Sander Bollen's avatar
Sander Bollen committed
12
13
14
15
16
17
18
19
20
21
22
23
24
class BedtoolsSort(val root: Configurable) extends Bedtools with Reference {

  @Input
  var input: File = null

  @Output
  var output: File = null

  @Argument(required = false)
  var faidx: File = referenceFai

  def cmdLine = required(executable) + required("sort") + required("-i", input) +
    optional("-faidx", faidx) +
Sander Bollen's avatar
Sander Bollen committed
25
    (if (outputAsStsout) "" else " > " + required(output))
Sander Bollen's avatar
Sander Bollen committed
26
27

}