BedtoolsSort.scala 682 Bytes
Newer Older
Sander Bollen's avatar
Sander Bollen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
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
import org.broadinstitute.gatk.utils.commandline.{Argument, Input, Output}


/**
  * Created by Sander Bollen on 26-5-16.
  */
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) +
    (if(outputAsStsout) "" else " > " + required(output))

}