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

Added output file to snptest

parent 495a62d3
No related branches found
No related tags found
No related merge requests found
......@@ -2,15 +2,15 @@ package nl.lumc.sasc.biopet.extensions
import java.io.File
import nl.lumc.sasc.biopet.core.{Version, Reference, BiopetCommandLineFunction}
import nl.lumc.sasc.biopet.core.{ Version, Reference, BiopetCommandLineFunction }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Output, Input}
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
import scala.util.matching.Regex
/**
* Created by pjvan_thof on 3/25/16.
*/
* Created by pjvan_thof on 3/25/16.
*/
class Snptest(val root: Configurable) extends BiopetCommandLineFunction with Reference with Version {
@Input(required = true)
var inputGenotypes: List[File] = Nil
......
......@@ -5,7 +5,7 @@ import java.util
import htsjdk.samtools.reference.FastaSequenceFile
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, BiopetQScript }
import nl.lumc.sasc.biopet.extensions.{Snptest, Cat}
import nl.lumc.sasc.biopet.extensions.{ Snptest, Cat }
import nl.lumc.sasc.biopet.extensions.gatk.{ SelectVariants, CombineVariants }
import nl.lumc.sasc.biopet.extensions.tools.GensToVcf
import nl.lumc.sasc.biopet.utils.Logging
......@@ -104,6 +104,7 @@ class GwasTest(val root: Configurable) extends QScript with BiopetQScript with R
val snptest = new Snptest(this)
snptest.inputGenotypes :+= sv.outputFile
snptest.inputSampleFiles :+= phenotypeFile
snptest.outputFile = Some(new File(regionDir, s"${region.chr}-${region.start + 1}-${region.end}.snptest"))
add(snptest)
region -> snptest
}
......
......@@ -58,21 +58,17 @@ object ImputeOutput {
else if (summaryLines.contains(NO_TYPE_2)) {
Logging.logger.warn(s"No Type 2 SNPs found, skipping this chunk: '${chunk.summary}'")
None
}
else if (summaryLines.exists(ASSESSMENT_HEADER.findFirstIn(_).isDefined)) None
} else if (summaryLines.exists(ASSESSMENT_HEADER.findFirstIn(_).isDefined)) None
else if (!chunk.gens.exists()) {
addError(s"Gens file '${chunk.gens}' does not exist, please check Impute output")
None
}
else if (!chunk.gensInfo.exists()) {
} else if (!chunk.gensInfo.exists()) {
addError(s"GensInfo file '${chunk.gensInfo}' does not exist, please check Impute output")
None
}
else if (!chunk.gensInfoBySample.exists()) {
} else if (!chunk.gensInfoBySample.exists()) {
addError(s"GensInfoBySample file '${chunk.gensInfoBySample}' does not exist, please check Impute output")
None
}
else {
} else {
if (!summaryLines.contains(CORRECT_LOG)) {
Logging.logger.warn(s"Impute says it did not run but the gens files are there, pipeline will still continue")
Logging.logger.warn(s" Please check: ${chunk.summary}")
......
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