Commit c2b02cda authored by Peter van 't Hof's avatar Peter van 't Hof

Merge remote-tracking branch 'origin/develop' into feature-report

parents 20f17046 5ea97ae7
......@@ -122,7 +122,10 @@ object ShivaTest {
"samtools" -> Map("exe" -> "test"),
"macs2" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"wigtobigwig" -> Map("exe" -> "test")
"wigtobigwig" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test")
)
val sample1 = Map(
......
......@@ -125,6 +125,9 @@ object ShivaVariantcallingTest {
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
"bcftools" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test"),
"input_alleles" -> "test"
)
}
\ No newline at end of file
......@@ -96,6 +96,7 @@ object BamMetricsTest {
"refFlat" -> "bla.refFlat",
"reference_fasta" -> (outputDir + File.separator + "ref.fa"),
"samtools" -> Map("exe" -> "test"),
"bedtools" -> Map("exe" -> "test")
"bedtools" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test")
)
}
......@@ -119,7 +119,8 @@ object CarpTest {
"samtools" -> Map("exe" -> "test"),
"macs2" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"wigtobigwig" -> Map("exe" -> "test")
"wigtobigwig" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test")
)
val sample1 = Map(
......
......@@ -101,6 +101,7 @@ object FlexiprepTest {
"fastqc" -> Map("exe" -> "test"),
"seqtk" -> Map("exe" -> "test"),
"sickle" -> Map("exe" -> "test"),
"cutadapt" -> Map("exe" -> "test")
"cutadapt" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test")
)
}
......@@ -236,39 +236,42 @@ trait GearsTrait extends MultiSampleQScript with SummaryQScript { qscript =>
case _ => None
}
}).flatten.toList)
lazy val alnFileDirty: File = sampleAlnJob.output
lazy val alnFile: File = sampleAlnJob.output
def alnFile: File = sampleBamLinkJob.output
/** Job for combining all library BAMs */
private def sampleAlnJob: CombineFileFunction =
private def sampleBamLinkJob: Ln =
makeCombineJob(libraries.values.map(_.alnFile).toList, createFile(".bam"))
/** Super type of Ln and MergeSamFiles */
private type CombineFileFunction = QFunction { def output: File }
/** Ln or MergeSamFile job, depending on how many inputs are supplied */
private def makeCombineJob(inFiles: List[File], outFile: File,
mergeSortOrder: String = "coordinate"): CombineFileFunction = {
mergeSortOrder: String = "coordinate"): Ln = {
require(inFiles.nonEmpty, "At least one input files for combine job")
if (inFiles.size == 1) {
val job = new Ln(qscript)
job.input = inFiles.head
job.output = outFile
job
} else {
val job = new MergeSamFiles(qscript)
job.input = inFiles
job.output = outFile
job.sortOrder = mergeSortOrder
job
val input: File = {
if (inFiles.size == 1) inFiles.head
else {
val mergedBam = createFile(".merged.bam")
val mergejob = new MergeSamFiles(qscript)
mergejob.input = inFiles
mergejob.output = mergedBam
mergejob.sortOrder = mergeSortOrder
add(mergejob)
mergejob.output
}
}
val linkJob = new Ln(qscript)
linkJob.input = input
linkJob.output = outFile
linkJob
}
/** This will add sample jobs */
def addJobs(): Unit = {
addPerLibJobs()
// merge or symlink per-library alignments
add(sampleAlnJob)
add(sampleBamLinkJob)
if (preProcessBam.isDefined) {
val bamMetrics = new BamMetrics(qscript)
......
......@@ -210,7 +210,7 @@ object GentrapTest {
// mapping executables
"star", "bowtie", "samtools", "gsnap", "tophat",
// gentrap executables
"cufflinks", "htseqcount", "grep", "pdflatex", "rscript", "tabix", "bgzip", "bedtoolscoverage",
"cufflinks", "htseqcount", "grep", "pdflatex", "rscript", "tabix", "bgzip", "bedtoolscoverage", "md5sum",
// bam2wig executables
"igvtools", "wigtobigwig"
).map { case exe => exe -> Map("exe" -> "test") }.toMap
......
......@@ -155,6 +155,7 @@ object MappingTest {
"star" -> Map("exe" -> "test"),
"bowtie" -> Map("exe" -> "test"),
"stampy" -> Map("exe" -> "test", "genome" -> "test", "hash" -> "test"),
"samtools" -> Map("exe" -> "test")
"samtools" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test")
)
}
\ No newline at end of file
......@@ -117,7 +117,10 @@ object ShivaTest {
"samtools" -> Map("exe" -> "test"),
"macs2" -> Map("exe" -> "test"),
"igvtools" -> Map("exe" -> "test"),
"wigtobigwig" -> Map("exe" -> "test")
"wigtobigwig" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test")
)
val sample1 = Map(
......
......@@ -106,6 +106,9 @@ object ShivaVariantcallingTest {
"gatk_jar" -> "test",
"samtools" -> Map("exe" -> "test"),
"bcftools" -> Map("exe" -> "test"),
"freebayes" -> Map("exe" -> "test")
"freebayes" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test")
)
}
\ No newline at end of file
Markdown is supported
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