Skip to content

Commit

Permalink
Make mosdepth stub use gzip for .gz files (#5410)
Browse files Browse the repository at this point in the history
Switch to using proper gzip command to generate empty gz files. Update snapshot and tests
  • Loading branch information
awgymer authored Mar 28, 2024
1 parent b046a28 commit 30d3ca4
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 68 deletions.
8 changes: 4 additions & 4 deletions modules/nf-core/mosdepth/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ process MOSDEPTH {
touch ${prefix}.region.dist.txt
touch ${prefix}.summary.txt
touch ${prefix}.per-base.d4
touch ${prefix}.per-base.bed.gz
echo "" | gzip > ${prefix}.per-base.bed.gz
touch ${prefix}.per-base.bed.gz.csi
touch ${prefix}.regions.bed.gz
echo "" | gzip > ${prefix}.regions.bed.gz
touch ${prefix}.regions.bed.gz.csi
touch ${prefix}.quantized.bed.gz
echo "" | gzip > ${prefix}.quantized.bed.gz
touch ${prefix}.quantized.bed.gz.csi
touch ${prefix}.thresholds.bed.gz
echo "" | gzip > ${prefix}.thresholds.bed.gz
touch ${prefix}.thresholds.bed.gz.csi
cat <<-END_VERSIONS > versions.yml
Expand Down
16 changes: 1 addition & 15 deletions modules/nf-core/mosdepth/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.global_txt[0][1]).name,
file(process.out.summary_txt[0][1]).name,
file(process.out.regions_txt[0][1]).name,
file(process.out.per_base_d4[0][1]).name,
file(process.out.per_base_bed[0][1]).name,
file(process.out.per_base_csi[0][1]).name,
file(process.out.regions_bed[0][1]).name,
file(process.out.regions_csi[0][1]).name,
file(process.out.quantized_bed[0][1]).name,
file(process.out.quantized_csi[0][1]).name,
file(process.out.thresholds_bed[0][1]).name,
file(process.out.thresholds_csi[0][1]).name,
process.out.versions
).match() }
{ assert snapshot(process.out).match() }
)
}

Expand Down
Loading

0 comments on commit 30d3ca4

Please sign in to comment.