Commit 725ed53a authored by Sander Bollen's avatar Sander Bollen
Browse files

Merge branch 'fix-BIOPET-504' into 'develop'

Added output files

Tiny fix

See merge request !503
parents 409c5382 a1b738e0
......@@ -181,7 +181,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")
......@@ -264,16 +264,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