Skip to content
Snippets Groups Projects
Commit dd71e82b authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added tables and heatmaps to summary

parent 20fe80d7
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,8 @@ trait CufflinksMeasurement extends QScript with Measurement {
id -> cufflinks
}
addMergeTableJob(jobs.values.map(_.outputGenesFpkm).toList, mergeGenesFpkmTable)
addMergeTableJob(jobs.values.map(_.outputIsoformsFpkm).toList, mergeIsoFormFpkmTable)
addMergeTableJob(jobs.values.map(_.outputGenesFpkm).toList, mergeGenesFpkmTable, "genes_fpkm")
addMergeTableJob(jobs.values.map(_.outputIsoformsFpkm).toList, mergeIsoFormFpkmTable, "iso_form")
addHeatmapJob(mergeGenesFpkmTable, genesFpkmHeatmap, "genes_fpkm")
addHeatmapJob(mergeIsoFormFpkmTable, isoFormFpkmHeatmap, "iso_form_fpkm")
......
......@@ -28,7 +28,7 @@ class FragmentsPerGene(val root: Configurable) extends QScript with Measurement
id -> job
}
addMergeTableJob(jobs.values.map(_.output).toList, mergedTable)
addMergeTableJob(jobs.values.map(_.output).toList, mergedTable, "fragments_per_gene")
addHeatmapJob(mergedTable, heatmap, "fragments_per_gene")
}
......
......@@ -36,11 +36,15 @@ trait Measurement extends SummaryQScript with Reference { qscript: QScript =>
require(bamFiles.nonEmpty)
}
private var extraSummaryFiles: Map[String, File] = Map()
def addMergeTableJob(countFiles: List[File],
outputFile: File,
name: String,
args: MergeArgs = mergeArgs): Unit = {
add(MergeTables(this, countFiles, outputFile,
args.idCols, args.valCol, args.numHeaderLines, args.fallback))
extraSummaryFiles += s"${name}_table" -> outputFile
}
def addHeatmapJob(countTable: File, outputFile: File, name: String): Unit = {
......@@ -49,13 +53,14 @@ trait Measurement extends SummaryQScript with Reference { qscript: QScript =>
job.output = outputFile
job.countType = Some(name)
add(job)
extraSummaryFiles += s"${name}_heatmap" -> outputFile
}
/** Must return a map with used settings for this pipeline */
def summarySettings: Map[String, Any] = Map()
/** File to put in the summary for thie pipeline */
def summaryFiles: Map[String, File] = Map() ++ bamFiles.map { case (id, file) => s"input_bam_$id" -> file }
def summaryFiles: Map[String, File] = extraSummaryFiles ++ bamFiles.map { case (id, file) => s"input_bam_$id" -> file }
/** Name of summary output file */
def summaryFile: File = new File(outputDir, s"$name.summary.json")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment