Skip to content

Commit 395590e

Browse files
committed
Update logging
1 parent 4e9513e commit 395590e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

sbx_kraken.smk

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ rule kraken2_classify_report:
3636
shell:
3737
"""
3838
if LC_ALL=C gzip -l {input[0]} | awk 'NR==2 {{exit($2!=0)}}'; then
39-
echo "100.00\t0\t0\tR\t1\troot" > {output.report} && \
39+
echo "Empty input, filling with dummy data" > {log}
40+
echo "100.00\t0\t0\tR\t1\troot" > {output.report}
4041
echo "C\tA\t1\t136|136\t1:102 |:| 1:102" > {output.raw}
4142
else
42-
kraken2 --gzip-compressed \
43-
--db {params.db} \
44-
--report {output.report} \
45-
--output {output.raw} \
46-
{params.paired_end} {input} \
47-
2>&1 | tee {log}
43+
kraken2 \
44+
--gzip-compressed \
45+
--db {params.db} \
46+
--report {output.report} \
47+
--output {output.raw} \
48+
{params.paired_end} {input} \
49+
> {log} 2>&1
4850
fi
4951
"""
5052

0 commit comments

Comments
 (0)