From 51fdf9e8bfa3d7bed2021218a1caf2b5dc3e133e Mon Sep 17 00:00:00 2001 From: CI Date: Thu, 27 Mar 2025 16:12:48 +0000 Subject: [PATCH] Build branch main with version main (0c27ec1) Build pipeline: viash-hub.demultiplex.main-kdjmg Source commit: https://github.com/viash-hub/demultiplex/commit/0c27ec143671b3d9c985f2b5dc92f2a2065349d4 Source message: Assert that demultiplexed FASTQ files are not empty (#40) --- CHANGELOG.md | 6 ++++ .../gather_fastqs_and_validate/main.nf | 26 ++++++++++++++++ .../interop_summary_to_csv/.config.vsh.yaml | 4 +-- .../interop_summary_to_csv | 4 +-- target/executable/io/publish/.config.vsh.yaml | 4 +-- target/executable/io/publish/publish | 4 +-- target/executable/io/untar/.config.vsh.yaml | 4 +-- target/executable/io/untar/untar | 4 +-- .../dataflow/combine_samples/.config.vsh.yaml | 4 +-- .../nextflow/dataflow/combine_samples/main.nf | 4 +-- .../.config.vsh.yaml | 4 +-- .../gather_fastqs_and_validate/main.nf | 30 +++++++++++++++++-- target/nextflow/demultiplex/.config.vsh.yaml | 4 +-- target/nextflow/demultiplex/main.nf | 4 +-- .../interop_summary_to_csv/.config.vsh.yaml | 4 +-- .../io/interop_summary_to_csv/main.nf | 4 +-- target/nextflow/io/publish/.config.vsh.yaml | 4 +-- target/nextflow/io/publish/main.nf | 4 +-- target/nextflow/io/untar/.config.vsh.yaml | 4 +-- target/nextflow/io/untar/main.nf | 4 +-- target/nextflow/runner/.config.vsh.yaml | 4 +-- target/nextflow/runner/main.nf | 4 +-- 22 files changed, 98 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41be392..46e5be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# demultiplex v0.3.8 + +## Bug fixes + +* Provide a proper error when a FASTQ file is empty after demultiplexing (PR #40). + # demultiplex v0.3.7 ## Minor updates diff --git a/src/dataflow/gather_fastqs_and_validate/main.nf b/src/dataflow/gather_fastqs_and_validate/main.nf index 6d4d925..08e96fb 100644 --- a/src/dataflow/gather_fastqs_and_validate/main.nf +++ b/src/dataflow/gather_fastqs_and_validate/main.nf @@ -1,3 +1,26 @@ +import java.util.zip.GZIPInputStream +import java.nio.file.Files +import java.io.BufferedInputStream + +def is_empty(file_to_check){ + /* + Checks if a file has content + */ + if (file_to_check.size() == 0) { + return true + } + def input_stream = Files.newInputStream(file_to_check) + def gzInputStream + try { + gzInputStream = new GZIPInputStream(new BufferedInputStream(input_stream)) + } catch (java.io.EOFException ex) { + // This is not a gzipfile... + return false + } + def read_one_byte = gzInputStream.read() + return read_one_byte == -1 +} + workflow run_wf { take: input_ch @@ -78,6 +101,9 @@ workflow run_wf { "Found forward: ${forward_fastq} and reverse: ${reverse_fastq}." println "Found ${forward_fastq.size()} forward and ${reverse_fastq.size()} reverse " + "fastq files for sample ${sample_id}" + + assert forward_fastq.every{!is_empty(it)} && reverse_fastq.every{!is_empty(it)}: + "A fastq file for sample '${sample_id}' appears to be empty!" def fastqs_state = [ "fastq_forward": forward_fastq, "fastq_reverse": reverse_fastq, diff --git a/target/executable/io/interop_summary_to_csv/.config.vsh.yaml b/target/executable/io/interop_summary_to_csv/.config.vsh.yaml index da8f78c..17c72b6 100644 --- a/target/executable/io/interop_summary_to_csv/.config.vsh.yaml +++ b/target/executable/io/interop_summary_to_csv/.config.vsh.yaml @@ -146,9 +146,9 @@ build_info: output: "target/executable/io/interop_summary_to_csv" executable: "target/executable/io/interop_summary_to_csv/interop_summary_to_csv" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/executable/io/interop_summary_to_csv/interop_summary_to_csv b/target/executable/io/interop_summary_to_csv/interop_summary_to_csv index 502baa7..d1a534b 100755 --- a/target/executable/io/interop_summary_to_csv/interop_summary_to_csv +++ b/target/executable/io/interop_summary_to_csv/interop_summary_to_csv @@ -470,9 +470,9 @@ tar -C /tmp/ --no-same-owner --no-same-permissions -xvf /tmp/interop.tar.gz && \ mv /tmp/interop-1.3.1-Linux-GNU/bin/index-summary /tmp/interop-1.3.1-Linux-GNU/bin/summary /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component io interop_summary_to_csv" -LABEL org.opencontainers.image.created="2025-03-20T20:31:40Z" +LABEL org.opencontainers.image.created="2025-03-27T15:56:06Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex" -LABEL org.opencontainers.image.revision="0acfda628d38430a7cdc21acf52878703b3b4bfc" +LABEL org.opencontainers.image.revision="0c27ec143671b3d9c985f2b5dc92f2a2065349d4" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/io/publish/.config.vsh.yaml b/target/executable/io/publish/.config.vsh.yaml index abf6f7f..dc3e028 100644 --- a/target/executable/io/publish/.config.vsh.yaml +++ b/target/executable/io/publish/.config.vsh.yaml @@ -196,9 +196,9 @@ build_info: output: "target/executable/io/publish" executable: "target/executable/io/publish/publish" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/executable/io/publish/publish b/target/executable/io/publish/publish index 30694a6..03ef618 100755 --- a/target/executable/io/publish/publish +++ b/target/executable/io/publish/publish @@ -490,9 +490,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component io publish" -LABEL org.opencontainers.image.created="2025-03-20T20:31:40Z" +LABEL org.opencontainers.image.created="2025-03-27T15:56:05Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex" -LABEL org.opencontainers.image.revision="0acfda628d38430a7cdc21acf52878703b3b4bfc" +LABEL org.opencontainers.image.revision="0c27ec143671b3d9c985f2b5dc92f2a2065349d4" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/io/untar/.config.vsh.yaml b/target/executable/io/untar/.config.vsh.yaml index 8a3be3c..312f474 100644 --- a/target/executable/io/untar/.config.vsh.yaml +++ b/target/executable/io/untar/.config.vsh.yaml @@ -153,9 +153,9 @@ build_info: output: "target/executable/io/untar" executable: "target/executable/io/untar/untar" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/executable/io/untar/untar b/target/executable/io/untar/untar index 3e1fd18..561e4cd 100755 --- a/target/executable/io/untar/untar +++ b/target/executable/io/untar/untar @@ -476,9 +476,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component io untar" -LABEL org.opencontainers.image.created="2025-03-20T20:31:40Z" +LABEL org.opencontainers.image.created="2025-03-27T15:56:05Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/demultiplex" -LABEL org.opencontainers.image.revision="0acfda628d38430a7cdc21acf52878703b3b4bfc" +LABEL org.opencontainers.image.revision="0c27ec143671b3d9c985f2b5dc92f2a2065349d4" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/nextflow/dataflow/combine_samples/.config.vsh.yaml b/target/nextflow/dataflow/combine_samples/.config.vsh.yaml index 76d7a0f..bc9be02 100644 --- a/target/nextflow/dataflow/combine_samples/.config.vsh.yaml +++ b/target/nextflow/dataflow/combine_samples/.config.vsh.yaml @@ -162,9 +162,9 @@ build_info: output: "target/nextflow/dataflow/combine_samples" executable: "target/nextflow/dataflow/combine_samples/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/nextflow/dataflow/combine_samples/main.nf b/target/nextflow/dataflow/combine_samples/main.nf index 3621ae9..993ff98 100644 --- a/target/nextflow/dataflow/combine_samples/main.nf +++ b/target/nextflow/dataflow/combine_samples/main.nf @@ -3000,9 +3000,9 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/dataflow/combine_samples", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", diff --git a/target/nextflow/dataflow/gather_fastqs_and_validate/.config.vsh.yaml b/target/nextflow/dataflow/gather_fastqs_and_validate/.config.vsh.yaml index 1b2698a..6922e1e 100644 --- a/target/nextflow/dataflow/gather_fastqs_and_validate/.config.vsh.yaml +++ b/target/nextflow/dataflow/gather_fastqs_and_validate/.config.vsh.yaml @@ -138,9 +138,9 @@ build_info: output: "target/nextflow/dataflow/gather_fastqs_and_validate" executable: "target/nextflow/dataflow/gather_fastqs_and_validate/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/nextflow/dataflow/gather_fastqs_and_validate/main.nf b/target/nextflow/dataflow/gather_fastqs_and_validate/main.nf index 44aa2fe..22f84a7 100644 --- a/target/nextflow/dataflow/gather_fastqs_and_validate/main.nf +++ b/target/nextflow/dataflow/gather_fastqs_and_validate/main.nf @@ -2973,9 +2973,9 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/dataflow/gather_fastqs_and_validate", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", @@ -3019,6 +3019,29 @@ meta = [ // inner workflow // user-provided Nextflow code +import java.util.zip.GZIPInputStream +import java.nio.file.Files +import java.io.BufferedInputStream + +def is_empty(file_to_check){ + /* + Checks if a file has content + */ + if (file_to_check.size() == 0) { + return true + } + def input_stream = Files.newInputStream(file_to_check) + def gzInputStream + try { + gzInputStream = new GZIPInputStream(new BufferedInputStream(input_stream)) + } catch (java.io.EOFException ex) { + // This is not a gzipfile... + return false + } + def read_one_byte = gzInputStream.read() + return read_one_byte == -1 +} + workflow run_wf { take: input_ch @@ -3099,6 +3122,9 @@ workflow run_wf { "Found forward: ${forward_fastq} and reverse: ${reverse_fastq}." println "Found ${forward_fastq.size()} forward and ${reverse_fastq.size()} reverse " + "fastq files for sample ${sample_id}" + + assert forward_fastq.every{!is_empty(it)} && reverse_fastq.every{!is_empty(it)}: + "A fastq file for sample '${sample_id}' appears to be empty!" def fastqs_state = [ "fastq_forward": forward_fastq, "fastq_reverse": reverse_fastq, diff --git a/target/nextflow/demultiplex/.config.vsh.yaml b/target/nextflow/demultiplex/.config.vsh.yaml index 3c9a318..26b4a45 100644 --- a/target/nextflow/demultiplex/.config.vsh.yaml +++ b/target/nextflow/demultiplex/.config.vsh.yaml @@ -244,9 +244,9 @@ build_info: output: "target/nextflow/demultiplex" executable: "target/nextflow/demultiplex/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" dependencies: - "target/nextflow/io/untar" - "target/nextflow/dataflow/gather_fastqs_and_validate" diff --git a/target/nextflow/demultiplex/main.nf b/target/nextflow/demultiplex/main.nf index a0399e2..96bbb3f 100644 --- a/target/nextflow/demultiplex/main.nf +++ b/target/nextflow/demultiplex/main.nf @@ -3120,9 +3120,9 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/demultiplex", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", diff --git a/target/nextflow/io/interop_summary_to_csv/.config.vsh.yaml b/target/nextflow/io/interop_summary_to_csv/.config.vsh.yaml index d596c84..7f86975 100644 --- a/target/nextflow/io/interop_summary_to_csv/.config.vsh.yaml +++ b/target/nextflow/io/interop_summary_to_csv/.config.vsh.yaml @@ -146,9 +146,9 @@ build_info: output: "target/nextflow/io/interop_summary_to_csv" executable: "target/nextflow/io/interop_summary_to_csv/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/nextflow/io/interop_summary_to_csv/main.nf b/target/nextflow/io/interop_summary_to_csv/main.nf index 51a8f5e..3cbb9e7 100644 --- a/target/nextflow/io/interop_summary_to_csv/main.nf +++ b/target/nextflow/io/interop_summary_to_csv/main.nf @@ -2985,9 +2985,9 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/io/interop_summary_to_csv", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", diff --git a/target/nextflow/io/publish/.config.vsh.yaml b/target/nextflow/io/publish/.config.vsh.yaml index 19d084b..9753688 100644 --- a/target/nextflow/io/publish/.config.vsh.yaml +++ b/target/nextflow/io/publish/.config.vsh.yaml @@ -196,9 +196,9 @@ build_info: output: "target/nextflow/io/publish" executable: "target/nextflow/io/publish/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/nextflow/io/publish/main.nf b/target/nextflow/io/publish/main.nf index b3954cf..10eb3c2 100644 --- a/target/nextflow/io/publish/main.nf +++ b/target/nextflow/io/publish/main.nf @@ -3044,9 +3044,9 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/io/publish", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", diff --git a/target/nextflow/io/untar/.config.vsh.yaml b/target/nextflow/io/untar/.config.vsh.yaml index a39c61f..76162ac 100644 --- a/target/nextflow/io/untar/.config.vsh.yaml +++ b/target/nextflow/io/untar/.config.vsh.yaml @@ -153,9 +153,9 @@ build_info: output: "target/nextflow/io/untar" executable: "target/nextflow/io/untar/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" package_config: name: "demultiplex" version: "main" diff --git a/target/nextflow/io/untar/main.nf b/target/nextflow/io/untar/main.nf index ac9f7ce..25554f3 100644 --- a/target/nextflow/io/untar/main.nf +++ b/target/nextflow/io/untar/main.nf @@ -2997,9 +2997,9 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/io/untar", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex", diff --git a/target/nextflow/runner/.config.vsh.yaml b/target/nextflow/runner/.config.vsh.yaml index 0595a3a..7a362c6 100644 --- a/target/nextflow/runner/.config.vsh.yaml +++ b/target/nextflow/runner/.config.vsh.yaml @@ -192,9 +192,9 @@ build_info: output: "target/nextflow/runner" executable: "target/nextflow/runner/main.nf" viash_version: "0.9.0" - git_commit: "0acfda628d38430a7cdc21acf52878703b3b4bfc" + git_commit: "0c27ec143671b3d9c985f2b5dc92f2a2065349d4" git_remote: "https://github.com/viash-hub/demultiplex" - git_tag: "v0.1.1-20-g0acfda6" + git_tag: "v0.1.1-21-g0c27ec1" dependencies: - "target/nextflow/demultiplex" - "target/nextflow/io/publish" diff --git a/target/nextflow/runner/main.nf b/target/nextflow/runner/main.nf index bfe653f..73fe658 100644 --- a/target/nextflow/runner/main.nf +++ b/target/nextflow/runner/main.nf @@ -3040,9 +3040,9 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/runner", "viash_version" : "0.9.0", - "git_commit" : "0acfda628d38430a7cdc21acf52878703b3b4bfc", + "git_commit" : "0c27ec143671b3d9c985f2b5dc92f2a2065349d4", "git_remote" : "https://github.com/viash-hub/demultiplex", - "git_tag" : "v0.1.1-20-g0acfda6" + "git_tag" : "v0.1.1-21-g0c27ec1" }, "package_config" : { "name" : "demultiplex",