Skip to content
Snippets Groups Projects
Commit bce349be authored by bow's avatar bow
Browse files

Add more CLI validation

parent 256ca27f
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
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