projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Indicate when desplit_fastq didn't get any files to process
[htsworkflow.git]
/
htsworkflow
/
pipelines
/
desplit_fastq.py
diff --git
a/htsworkflow/pipelines/desplit_fastq.py
b/htsworkflow/pipelines/desplit_fastq.py
index 83a995588079f34088e5b07ac7d098bfb08b3072..c9947a2ef2317b0a05f7c36e966eb152949fc1f3 100644
(file)
--- 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
This is here so we can run via threading/multiprocessing APIs
"""
state = SEQ_HEADER
+ files_read = 0
for stream in self.sources:
for stream in self.sources:
+ files_read += 1
for line in stream:
line = line.rstrip()
if state == SEQ_HEADER:
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)
state = SEQ_HEADER
self.destination.write(os.linesep)
+ if files_read == 0:
+ raise RuntimeError("No files processed")
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()