Skip to content

Commit

Permalink
replacing gzip with pigz
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaOb21 committed Mar 3, 2024
1 parent 9d09a9c commit 34c590f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions workflow/rules/hifi_prep.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ rule hifi_prep:
),
output:
hifi="results/reads/hifi/hifi.fastq.gz",
threads: config["hifi_prep"]["t"]
params:
num_files=len(glob.glob(config["hifi_path"] + "*.fastq.gz")),
log:
"logs/hifi_prep.log",
resources:
mem_mb=config['hifi_prep']['mem_mb'], # access memory from config
conda:
"../envs/basic.yaml"
"../envs/pigz.yaml"
shell:
"""
{{
if [ {params.num_files} -gt 1 ]; then
zcat {input.files} | gzip > {output.hifi}
pigz -dc {input.files} | pigz -p{threads} > {output.hifi}
else
cp {input.files[0]} {output.hifi}
fi
Expand Down

0 comments on commit 34c590f

Please sign in to comment.