From: Diane Trout Date: Mon, 12 May 2014 23:12:08 +0000 (-0700) Subject: Indicate when desplit_fastq didn't get any files to process X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=10c9e90168dae0d301ee6b6ba4afd99b295782f5 Indicate when desplit_fastq didn't get any files to process --- diff --git a/htsworkflow/pipelines/desplit_fastq.py b/htsworkflow/pipelines/desplit_fastq.py index 83a9955..c9947a2 100644 --- a/htsworkflow/pipelines/desplit_fastq.py +++ b/htsworkflow/pipelines/desplit_fastq.py @@ -89,7 +89,9 @@ class DesplitFastq(object): This is here so we can run via threading/multiprocessing APIs """ state = SEQ_HEADER + files_read = 0 for stream in self.sources: + files_read += 1 for line in stream: line = line.rstrip() if state == SEQ_HEADER: @@ -106,6 +108,8 @@ class DesplitFastq(object): state = SEQ_HEADER self.destination.write(os.linesep) + if files_read == 0: + raise RuntimeError("No files processed") if __name__ == "__main__": main()