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

Fixing null pointer

parent 6025ff20
......@@ -123,7 +123,11 @@ class QcCommand(val parent: Configurable, val fastqc: Fastqc, val read: String)
Some(cutadapt)
} else None
case (None, _) => None
case (c, _) => c
case (Some(c), _) =>
c.fastqInput = seqtk.output
c.fastqOutput = new File(output.getParentFile, input.getName + ".cutadapt.fq")
c.statsOutput = new File(flexiprep.outputDir, s"${flexiprep.sampleId.getOrElse("x")}-${flexiprep.libId.getOrElse("x")}.$read.clip.stats")
Some(c)
}
trim.foreach { t =>
......
......@@ -62,8 +62,11 @@ class FlexiprepTest extends TestNGSuite with Matchers {
private var dirs: List[File] = Nil
@Test(dataProvider = "flexiprepOptions")
def testFlexiprep(f: String, paired: Boolean, skipTrim: Boolean, skipClip: Boolean,
zipped: Boolean, abortOnCorruptFastq: Boolean) = {
def testFlexiprep(f: String, paired: Boolean,
skipTrim: Boolean,
skipClip: Boolean,
zipped: Boolean,
abortOnCorruptFastq: Boolean) = {
val outputDir = FlexiprepTest.outputDir
dirs :+= outputDir
val map = ConfigUtils.mergeMaps(Map("output_dir" -> outputDir,
......
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