Commit 82437aa9 authored by bow's avatar bow
Browse files

Move Gentrap-specific scripts and their wrappers to the Gentrap package

parent a517be04
......@@ -132,20 +132,20 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
/** Adds output merge jobs for the given expression mode */
// TODO: can we combine the enum with the file extension (to reduce duplication and potential errors)
def makeMergeTableJob(inFunc: (Sample => Option[File]), ext: String, idCols: List[Int], valCol: Int,
outBaseName: String = "all_samples"): Option[MergeTables] = {
outBaseName: String = "all_samples"): Option[MergeTables] = {
val tables = samples.values.map { inFunc }.toList.flatten
tables.nonEmpty
.option {
val job = new MergeTables(qscript)
job.inputTables = tables
job.output = new File(outputDir, outBaseName + ext)
job.idColumnIndices = idCols.map(_.toString)
job.valueColumnIndex = valCol
job.fileExtension = Option(ext)
// TODO: separate the addition into another function?
add(job)
job
}
val job = new MergeTables(qscript)
job.inputTables = tables
job.output = new File(outputDir, outBaseName + ext)
job.idColumnIndices = idCols.map(_.toString)
job.valueColumnIndex = valCol
job.fileExtension = Option(ext)
// TODO: separate the addition into another function?
add(job)
job
}
}
// merge htseq outputs
......
......@@ -7,9 +7,10 @@
package nl.lumc.sasc.biopet.pipelines.gentrap.scripts
import java.io.File
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.RScriptCommandLineFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Wrapper for the aggr_base_count.R script, used internally in Gentrap
......
......@@ -7,9 +7,10 @@
package nl.lumc.sasc.biopet.pipelines.gentrap.scripts
import java.io.File
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.PythonCommandLineFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Wrapper for the hist2count.py script, used internally in Gentrap
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment