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

Move script and init to main trait

parent f87d0b5d
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 126 deletions
......@@ -5,13 +5,13 @@ import nl.lumc.sasc.biopet.core.BiopetQScript.InputFile
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
trait AnnotationGtf extends BiopetQScript { qscript: QScript =>
/** GTF reference file */
lazy val annotationGtf: File = {
val file: File = config("annotation_gtf")
inputFiles :+ InputFile(file, config("annotation_gtf_md5"))
val file: File = config("annotation_gtf", freeVar = true)
inputFiles :+ InputFile(file, config("annotation_gtf_md5", freeVar = true))
file
}
}
......@@ -19,8 +19,8 @@ trait AnnotationGtf extends BiopetQScript { qscript: QScript =>
trait AnnotationBed extends BiopetQScript { qscript: QScript =>
/** GTF reference file */
lazy val annotationBed: File = {
val file: File = config("annotation_bed")
inputFiles :+ InputFile(file, config("annotation_bed_md5"))
val file: File = config("annotation_bed", freeVar = true)
inputFiles :+ InputFile(file, config("annotation_bed_md5", freeVar = true))
file
}
}
......@@ -28,8 +28,8 @@ trait AnnotationBed extends BiopetQScript { qscript: QScript =>
trait AnnotationRefFlat extends BiopetQScript { qscript: QScript =>
/** GTF reference file */
lazy val annotationRefFlat: File = {
val file: File = config("annotation_refflat")
inputFiles :+ InputFile(file, config("annotation_refflat_md5"))
val file: File = config("annotation_refflat", freeVar = true)
inputFiles :+ InputFile(file, config("annotation_refflat_md5", freeVar = true))
file
}
}
......@@ -37,8 +37,8 @@ trait AnnotationRefFlat extends BiopetQScript { qscript: QScript =>
trait RibosomalRefFlat extends BiopetQScript { qscript: QScript =>
/** GTF reference file */
lazy val ribosomalRefFlat: File = {
val file: File = config("ribosome_refflat")
inputFiles :+ InputFile(file, config("ribosome_refflat_md5"))
val file: File = config("ribosome_refflat", freeVar = true)
inputFiles :+ InputFile(file, config("ribosome_refflat_md5", freeVar = true))
file
}
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class BasesPerExon(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("BasesPerExon.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,9 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class BasesPerGene(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("BasesPerGene.summary.json")
//TODO: splitting on strand if strandspecific
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class CufflinksBlind(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("CufflinksBlind.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class CufflinksGuided(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("CufflinksGuided.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class CufflinksStrict(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("CufflinksStrict.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class FragmentsPerExon(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("FragmentsPerExon.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -4,21 +4,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
* Created by pjvan_thof on 1/12/16.
*/
class FragmentsPerGene(val root: Configurable) extends QScript with Measurement {
/** Init for pipeline */
def init(): Unit = ???
/** Pipeline itself */
def biopetScript(): Unit = ???
/** 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()
/** Name of summary output file */
def summaryFile: File = new File("FragmentsPerGene.summary.json")
def bamToCountFile(id: String, bamFile: File): (String, File) = ???
}
......@@ -5,13 +5,40 @@ import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import org.broadinstitute.gatk.queue.QScript
/**
* Created by pjvan_thof on 1/12/16.
*/
trait Measurement extends SummaryQScript with Reference { qscript : QScript =>
private var bamFiles: Map[String, File] = Map()
* Created by pjvan_thof on 1/12/16.
*/
trait Measurement extends SummaryQScript with Reference { qscript: QScript =>
protected var bamFiles: Map[String, File] = Map()
def addBamfile(id: String, file: File): Unit = {
require(!bamFiles.contains(id), s"'$id' already exist")
bamFiles += id -> file
}
def name: String = this.getClass.getSimpleName.toLowerCase
lazy val countFiles: Map[String, File] = bamFiles.map { case (id, bamFile) => bamToCountFile(id, bamFile) }
/** Init for pipeline */
def init(): Unit = {
require(bamFiles.nonEmpty)
}
/** Pipeline itself */
def biopetScript(): Unit = {
//TODO: Merging
//TODO: Heatmap
}
def bamToCountFile(id: String, bamFile: File): (String, File)
/** 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()
/** Name of summary output file */
def summaryFile: File = new File(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