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

Adding scala docs

parent 5903aff3
No related branches found
No related tags found
No related merge requests found
......@@ -19,46 +19,63 @@ import nl.lumc.sasc.biopet.core.{ PipelineCommand, MultiSampleQScript, BiopetQSc
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/** Template for a multisample pipeline */
class MultisamplePipelineTemplate(val root: Configurable) extends QScript with MultiSampleQScript {
def this() = this(null)
/** Location of summary file */
def summaryFile: File = new File(outputDir, "MultisamplePipelineTemplate.summary.json")
/** File to add to the summary */
def summaryFiles: Map[String, File] = Map()
/** Pipeline settings to add to the summary */
def summarySettings: Map[String, Any] = Map()
/** Function to make a sample */
def makeSample(id: String) = new Sample(id)
/** This class will contain jobs and libraries for a sample */
class Sample(sampleId: String) extends AbstractSample(sampleId) {
/** Sample specific files for summary */
def summaryFiles: Map[String, File] = Map()
/** Sample specific stats for summary */
def summaryStats: Map[String, Any] = Map()
/** Function to make a library */
def makeLibrary(id: String) = new Library(id)
/** This class will contain all jobs for a library */
class Library(libId: String) extends AbstractLibrary(libId) {
/** Library specific files for summary */
def summaryFiles: Map[String, File] = Map()
/** Library specific stats for summary */
def summaryStats: Map[String, Any] = Map()
/** Method to add library jobs */
protected def addJobs(): Unit = {
// Library jobs
}
}
/** Method to add sample jobs */
protected def addJobs(): Unit = {
// Sample jobs
}
}
/** Method where multisample jobs are added */
def addMultiSampleJobs(): Unit = {
}
/** This is executed before the script starts */
def init(): Unit = {
}
/** Method where jobs must be added */
def biopetScript() {
}
}
/** Object to let to generate a main method */
object MultisamplePipelineTemplate extends PipelineCommand
\ No newline at end of file
......@@ -20,14 +20,18 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.queue.QScript
import org.broadinstitute.gatk.queue.function._
/** Template for a pipeline */
class PipelineTemplate(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
/** This is executed before the script starts */
def init() {
}
/** Method where jobs must be added */
def biopetScript() {
}
}
/** Object to let to generate a main method */
object PipelineTemplate extends PipelineCommand
......@@ -32,6 +32,13 @@ object VcfUtils {
alleles(longestAlleleId)
}
/**
* Method will extend a allele till a new length
* @param bases Allele
* @param newSize New size of allele
* @param fillWith Char to fill gap
* @return
*/
def fillAllele(bases: String, newSize: Int, fillWith: Char = '-'): String = {
bases + (Array.fill[Char](newSize - bases.size)(fillWith)).mkString
}
......
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