diff --git a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala index d53b1afd0fc6b5ca8e86b4af7e018607afcc1ea6..72cf7be799231142397dab1163b9a4bc0c13f2c4 100644 --- a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala +++ b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/ExtractAlignedFastq.scala @@ -208,8 +208,12 @@ object ExtractAlignedFastq extends ToolCommand { |This tool creates FASTQ file(s) containing reads mapped to the given alignment intervals. """.stripMargin) - checkConfig { c=> - if (c.inputFastq2 != null && c.outputFastq2 == null) + checkConfig { c => + if (!c.inputBam.exists) + failure("Input BAM file not found") + else if (!c.inputFastq1.exists) + failure("Input FASTQ file 1 not found") + else if (c.inputFastq2 != null && c.outputFastq2 == null) failure("Missing output FASTQ file 2") else if (c.inputFastq2 == null && c.outputFastq2 != null) failure("Missing input FASTQ file 2")