Commit 8ba20e15 authored by peguerin's avatar peguerin
Browse files

prevent empty file

parent 2d087661
...@@ -40,7 +40,12 @@ rule clean_pcrerr_samples: ...@@ -40,7 +40,12 @@ rule clean_pcrerr_samples:
params: params:
r=config["clean_pcrerr_samples"]["r"] r=config["clean_pcrerr_samples"]["r"]
shell: shell:
'''obiclean -r {params.r} {input} > {output} 2> {log}''' '''if [ -s {input} ]
then
obiclean -r {params.r} {input} > {output} 2> {log}
else
touch {output} 2> {log}
fi'''
### Remove sequence which are classified as 'internal' by obiclean ### Remove sequence which are classified as 'internal' by obiclean
rule rm_internal_samples: rule rm_internal_samples:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment