Skip to content

Commit

Permalink
Fix: eliminate potential deadlock
Browse files Browse the repository at this point in the history
Add: direct bcl2fastq command output to files
Update Dockerfile with version
  • Loading branch information
meono committed Nov 20, 2019
1 parent 7af7262 commit bee6bab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN conda install -y python=3.7.3
RUN cd /tmp && \
git clone https://github.com/meono/library_to_samplesheet.git && \
cd library_to_samplesheet && \
git checkout v0.1.3 && \
git checkout v0.1.4 && \
pip install -e .

CMD python run_container.py
Expand Down
10 changes: 7 additions & 3 deletions run_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@
'--processing-threads', '8',
'--loading-threads', '4',
'--writing-threads', '4',
'1>', f'{run_path}/bcl2fastq.out',
'2>', f'{run_path}/bcl2fastq.err'
],
stdout=PIPE, stderr=PIPE)
process_b2f.wait()
stdout, stderr = process_b2f.communicate()

# write stdout and strerr to files
with open(f'{run_path}/bcl2fastq.out', 'w') outfile:
outfile.writelines(stdout.decode())
with open(f'{run_path}/bcl2fastq.err', 'w') errfile:
outfile.writelines(stderr.decode())

# return error message is something went wrong
if process_b2f.returncode != 0:
print(f'Bcl2fastq failed with return code '
Expand Down

0 comments on commit bee6bab

Please sign in to comment.