Commit a1b738e0 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added output files

parent e17daab5
......@@ -179,7 +179,7 @@ class Shiva(val root: Configurable) extends QScript with MultisampleMappingTrait
override def addMultiSampleJobs() = {
super.addMultiSampleJobs()
addAll(dbsnpVcfFile.map(Shiva.makeValidateVcfJobs(this, _, referenceFasta())).getOrElse(Nil))
addAll(dbsnpVcfFile.map(Shiva.makeValidateVcfJobs(this, _, referenceFasta(), new File(outputDir, ".validate"))).getOrElse(Nil))
multisampleVariantCalling.foreach(vc => {
vc.outputDir = new File(outputDir, "variantcalling")
......@@ -262,16 +262,18 @@ object Shiva extends PipelineCommand {
// This is used to only execute 1 validation per vcf file
private var validateVcfSeen: Set[(File, File)] = Set()
def makeValidateVcfJobs(root: Configurable, vcfFile: File, referenceFile: File): List[QFunction] = {
def makeValidateVcfJobs(root: Configurable, vcfFile: File, referenceFile: File, outputDir: File): List[QFunction] = {
if (validateVcfSeen.contains((vcfFile, referenceFile))) Nil
else {
validateVcfSeen ++= Set((vcfFile, referenceFile))
val validateVcf = new ValidateVcf(root)
validateVcf.inputVcf = vcfFile
validateVcf.reference = referenceFile
validateVcf.jobOutputFile = new File(outputDir, vcfFile.getAbsolutePath + ".validateVcf.out")
val checkValidateVcf = new CheckValidateVcf
checkValidateVcf.inputLogFile = validateVcf.jobOutputFile
checkValidateVcf.jobOutputFile = new File(outputDir, vcfFile.getAbsolutePath + ".checkValidateVcf.out")
List(validateVcf, checkValidateVcf)
}
......
......@@ -85,7 +85,7 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
require(inputBams.nonEmpty, "No input bams found")
require(callers.nonEmpty, "must select at least 1 variantcaller, choices are: " + callersList.map(_.name).mkString(", "))
addAll(dbsnpVcfFile.map(Shiva.makeValidateVcfJobs(this, _, referenceFasta())).getOrElse(Nil))
addAll(dbsnpVcfFile.map(Shiva.makeValidateVcfJobs(this, _, referenceFasta(), new File(outputDir, ".validate"))).getOrElse(Nil))
val cv = new CombineVariants(qscript)
cv.out = finalFile
......
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