Skip to content

Commit 90e07ea

Browse files
authored
Merge pull request #50 from metagenlab/gzip
Compress reads in simulators rule
2 parents d3fd914 + 13c994b commit 90e07ea

5 files changed

Lines changed: 5 additions & 30 deletions

File tree

mess/workflow/envs/conda/pigz.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

mess/workflow/envs/containers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ art: docker://quay.io/biocontainers/art:2016.06.05--heacdb12_11
22
assembly_finder: docker://ghcr.io/metagenlab/assembly_finder:v0.8.0
33
bioconvert: docker://quay.io/biocontainers/bioconvert:1.1.1--pyhdfd78af_0
44
curl: docker://quay.io/biocontainers/curl:7.80.0
5-
pigz: docker://quay.io/biocontainers/pigz:2.8
65
pbccs: docker://quay.io/biocontainers/pbccs:6.4.0--h9ee0642_0
76
pbsim3: docker://quay.io/biocontainers/pbsim3:3.0.4--h4ac6f70_0
87
seqkit: docker://quay.io/biocontainers/seqkit:2.8.2--h9ee0642_0

mess/workflow/rules/processing/reads.smk

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -340,26 +340,6 @@ rule get_cami_profile:
340340
"""
341341

342342

343-
rule compress_contig_fastqs:
344-
input:
345-
fastq,
346-
output:
347-
fastq_gz,
348-
resources:
349-
mem_mb=config.resources.sml.mem,
350-
mem=str(config.resources.sml.mem) + "MB",
351-
time=config.resources.sml.time,
352-
threads: config.resources.sml.cpu
353-
conda:
354-
os.path.join(dir.conda, "pigz.yml")
355-
container:
356-
containers.pigz
357-
shell:
358-
"""
359-
pigz -p {threads} {input}
360-
"""
361-
362-
363343
sample_fastq_out = []
364344
if SKIP_SHUFFLE:
365345
if PAIRED:

mess/workflow/rules/simulate/long_reads.smk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if PASSES > 1:
1212
pbsim3_out = temp(prefix + ".sam")
1313
rename = f"mv {prefix}_0001.sam {prefix}.sam"
1414
else:
15-
pbsim3_out = temp(prefix + ".fq")
16-
rename = f"mv {prefix}_0001.fastq {prefix}.fq"
15+
pbsim3_out = temp(prefix + ".fq.gz")
16+
rename = f"gzip -c {prefix}_0001.fastq > {prefix}.fq.gz"
1717

1818

1919
rule pbsim3:

mess/workflow/rules/simulate/short_reads.smk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ if ERRFREE:
3737

3838

3939
fastq_out = [
40-
temp(fq_prefix + "1.fq"),
41-
temp(fq_prefix + "2.fq"),
40+
temp(fq_prefix + "1.fq.gz"),
41+
temp(fq_prefix + "2.fq.gz"),
4242
]
4343

4444
if not PAIRED:
@@ -86,5 +86,6 @@ rule art_illumina:
8686
-f {params.cov} -na {params.args} \\
8787
-o {params.prefix} \\
8888
&> {log}
89+
gzip {params.prefix}*.fq
8990
{params.cmd}
9091
"""

0 commit comments

Comments
 (0)