diff --git a/src/utils/save_params/config.vsh.yaml b/src/utils/save_params/config.vsh.yaml index b4e10d12..2f6ff865 100644 --- a/src/utils/save_params/config.vsh.yaml +++ b/src/utils/save_params/config.vsh.yaml @@ -1,7 +1,7 @@ name: save_params namespace: utils description: | - Save parameters to a file + Save parameters to a YAML file argument_groups: - name: Inputs @@ -13,7 +13,7 @@ argument_groups: required: true - name: "--params_yaml" description: | - base64 encoded yaml file containing the state + base64 encoded yaml containing the state type: string required: true @@ -21,9 +21,10 @@ argument_groups: arguments: - name: "--output" description: | - The output file + The output YAML file type: string required: true + example: "output.yaml" resources: - type: python_script diff --git a/src/utils/save_params/script.py b/src/utils/save_params/script.py index 7d427116..c7652c94 100644 --- a/src/utils/save_params/script.py +++ b/src/utils/save_params/script.py @@ -15,39 +15,24 @@ class Dumper(yaml.Dumper): return super(Dumper, self).increase_indent(flow, False) def decode_params_yaml(encoded_yaml): - # Step 1: Decode from Base64 yaml_bytes = base64.b64decode(encoded_yaml) - - # Step 2: Convert bytes to string yaml_string = yaml_bytes.decode('utf-8') - - # Step 3: Extract pattern for Java path objects - # Find pattern: !!sun.nio.fs.UnixPath /path/to/file - pattern = r'!!sun\.nio\.fs\.UnixPath\s+([^\n]+)' - - # Replace with the actual path string (captured group) - yaml_string = re.sub(pattern, r'\1', yaml_string) - - # Handle any remaining empty UnixPath objects - yaml_string = yaml_string.replace('!!sun.nio.fs.UnixPath {}', '""') - - # Step 4: Parse YAML yaml_data = yaml.safe_load(yaml_string) return yaml_data -def replace_id(value, sample_id): - if isinstance(value, str): - return value.replace('$id', sample_id) - elif isinstance(value, list): - return [replace_id(item, sample_id) for item in value] - return value +# def replace_id(value, sample_id): +# if isinstance(value, str): +# return value.replace('$id', sample_id) +# elif isinstance(value, list): +# return [replace_id(item, sample_id) for item in value] +# return value print(par['params_yaml']) params = decode_params_yaml(par['params_yaml']) -for key, value in params.items(): - params[key] = replace_id(value, par["id"]) +# for key, value in params.items(): +# params[key] = replace_id(value, par["id"]) with open(par["output"], 'w') as f: yaml.dump(params, f, default_flow_style=False, Dumper=Dumper) diff --git a/src/workflows/htrnaseq/config.vsh.yaml b/src/workflows/htrnaseq/config.vsh.yaml index beb72585..31eefc80 100644 --- a/src/workflows/htrnaseq/config.vsh.yaml +++ b/src/workflows/htrnaseq/config.vsh.yaml @@ -88,6 +88,11 @@ argument_groups: direction: output required: true default: report.$id.html + - name: "--params" + type: file + direction: output + required: true + default: params.$id.yaml resources: - type: nextflow_script path: main.nf diff --git a/src/workflows/htrnaseq/main.nf b/src/workflows/htrnaseq/main.nf index e8db6574..210fc71b 100644 --- a/src/workflows/htrnaseq/main.nf +++ b/src/workflows/htrnaseq/main.nf @@ -11,14 +11,6 @@ workflow run_wf { return [id, newState] } - // The featureData only has one requirement: the genome annotation. - // It can be generated straight away. Most of the time, there is one shared - // annotation for all of the inputs and the fData should only be calculated once. - // The state is manpulated in such a way that there is one event created per unique - // input annotation file. In turn, the featureData file can joined into the original input - // channel which allows it to be shared across events if required. - f_data_ch = input_ch - | save_params.run( fromState: {id, state -> // Define the function before using it @@ -26,8 +18,10 @@ workflow run_wf { convertPaths = { value -> if (value instanceof java.nio.file.Path) return value.toUriString() - else if (value instanceof Collection) + else if (value instanceof List) return value.collect { convertPaths(it) } + else if (value instanceof Collection) + throw new UnsupportedOperationException("Collections other than Lists are not supported") else return value } @@ -42,12 +36,21 @@ workflow run_wf { return [ "id": id, "params_yaml": encodedYaml, - "output": "${id}_parameters.yaml" + "output": "params" ] }, - toState: ["parameters": "output"] + toState: ["params": "output"] ) + // The featureData only has one requirement: the genome annotation. + // It can be generated straight away. Most of the time, there is one shared + // annotation for all of the inputs and the fData should only be calculated once. + // The state is manpulated in such a way that there is one event created per unique + // input annotation file. In turn, the featureData file can joined into the original input + // channel which allows it to be shared across events if required. + f_data_ch = input_ch + + | toSortedList() | flatMap {ids_and_states -> def annotation_files = ids_and_states.inject([:]){ old_state, id_and_state -> @@ -347,7 +350,7 @@ workflow run_wf { "f_data": "f_data", "p_data": "p_data", "html_report": "html_report", - "parameters": "parameters", + "params": "params", "_meta": "_meta", ]) diff --git a/target/executable/eset/create_eset/.config.vsh.yaml b/target/executable/eset/create_eset/.config.vsh.yaml index f3bb1168..ae06a47e 100644 --- a/target/executable/eset/create_eset/.config.vsh.yaml +++ b/target/executable/eset/create_eset/.config.vsh.yaml @@ -203,7 +203,7 @@ build_info: output: "target/executable/eset/create_eset" executable: "target/executable/eset/create_eset/create_eset" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/eset/create_eset/create_eset b/target/executable/eset/create_eset/create_eset index d8f64059..0015a8ef 100755 --- a/target/executable/eset/create_eset/create_eset +++ b/target/executable/eset/create_eset/create_eset @@ -456,9 +456,9 @@ RUN Rscript -e 'options(warn = 2); if (!requireNamespace("remotes", quietly = TR LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component eset create_eset" -LABEL org.opencontainers.image.created="2025-04-01T15:16:02Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:25Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/eset/create_fdata/.config.vsh.yaml b/target/executable/eset/create_fdata/.config.vsh.yaml index b5e6063b..b698e91f 100644 --- a/target/executable/eset/create_fdata/.config.vsh.yaml +++ b/target/executable/eset/create_fdata/.config.vsh.yaml @@ -180,7 +180,7 @@ build_info: output: "target/executable/eset/create_fdata" executable: "target/executable/eset/create_fdata/create_fdata" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/eset/create_fdata/create_fdata b/target/executable/eset/create_fdata/create_fdata index 11d7aab3..29f55837 100755 --- a/target/executable/eset/create_fdata/create_fdata +++ b/target/executable/eset/create_fdata/create_fdata @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component eset create_fdata" -LABEL org.opencontainers.image.created="2025-04-01T15:16:02Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:25Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/eset/create_pdata/.config.vsh.yaml b/target/executable/eset/create_pdata/.config.vsh.yaml index e44ed42b..1d6b96ae 100644 --- a/target/executable/eset/create_pdata/.config.vsh.yaml +++ b/target/executable/eset/create_pdata/.config.vsh.yaml @@ -194,7 +194,7 @@ build_info: output: "target/executable/eset/create_pdata" executable: "target/executable/eset/create_pdata/create_pdata" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/eset/create_pdata/create_pdata b/target/executable/eset/create_pdata/create_pdata index 36a73b0c..14294602 100755 --- a/target/executable/eset/create_pdata/create_pdata +++ b/target/executable/eset/create_pdata/create_pdata @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component eset create_pdata" -LABEL org.opencontainers.image.created="2025-04-01T15:16:03Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:25Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml b/target/executable/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml index 20189b2a..1054a554 100644 --- a/target/executable/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml +++ b/target/executable/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml @@ -152,7 +152,7 @@ build_info: output: "target/executable/integration_test_components/htrnaseq/check_eset" executable: "target/executable/integration_test_components/htrnaseq/check_eset/check_eset" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/integration_test_components/htrnaseq/check_eset/check_eset b/target/executable/integration_test_components/htrnaseq/check_eset/check_eset index 461dbd8d..b645545d 100755 --- a/target/executable/integration_test_components/htrnaseq/check_eset/check_eset +++ b/target/executable/integration_test_components/htrnaseq/check_eset/check_eset @@ -455,9 +455,9 @@ RUN Rscript -e 'options(warn = 2); if (!requireNamespace("remotes", quietly = TR LABEL org.opencontainers.image.authors="Dries Schaumont" LABEL org.opencontainers.image.description="Companion container for running component integration_test_components/htrnaseq check_eset" -LABEL org.opencontainers.image.created="2025-04-01T15:16:01Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml b/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml index 04c23325..8e114c10 100644 --- a/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml +++ b/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml @@ -161,7 +161,7 @@ build_info: output: "target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output" executable: "target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/check_cutadapt_output" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/check_cutadapt_output b/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/check_cutadapt_output index 1e346d22..d3f4a076 100755 --- a/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/check_cutadapt_output +++ b/target/executable/integration_test_components/well_demultiplexing/check_cutadapt_output/check_cutadapt_output @@ -457,9 +457,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont" LABEL org.opencontainers.image.description="Companion container for running component integration_test_components/well_demultiplexing check_cutadapt_output" -LABEL org.opencontainers.image.created="2025-04-01T15:16:03Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:26Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/io/publish_fastqs/.config.vsh.yaml b/target/executable/io/publish_fastqs/.config.vsh.yaml index 088a05e3..bdf0d1f3 100644 --- a/target/executable/io/publish_fastqs/.config.vsh.yaml +++ b/target/executable/io/publish_fastqs/.config.vsh.yaml @@ -136,7 +136,7 @@ build_info: output: "target/executable/io/publish_fastqs" executable: "target/executable/io/publish_fastqs/publish_fastqs" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/io/publish_fastqs/publish_fastqs b/target/executable/io/publish_fastqs/publish_fastqs index 8a592f25..47f7e974 100755 --- a/target/executable/io/publish_fastqs/publish_fastqs +++ b/target/executable/io/publish_fastqs/publish_fastqs @@ -450,9 +450,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component io publish_fastqs" -LABEL org.opencontainers.image.created="2025-04-01T15:16:01Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/io/publish_results/.config.vsh.yaml b/target/executable/io/publish_results/.config.vsh.yaml index 7d15aa62..88a00b18 100644 --- a/target/executable/io/publish_results/.config.vsh.yaml +++ b/target/executable/io/publish_results/.config.vsh.yaml @@ -190,7 +190,7 @@ build_info: output: "target/executable/io/publish_results" executable: "target/executable/io/publish_results/publish_results" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/io/publish_results/publish_results b/target/executable/io/publish_results/publish_results index 28b140f5..9284391e 100755 --- a/target/executable/io/publish_results/publish_results +++ b/target/executable/io/publish_results/publish_results @@ -450,9 +450,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component io publish_results" -LABEL org.opencontainers.image.created="2025-04-01T15:16:02Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/parallel_map/.config.vsh.yaml b/target/executable/parallel_map/.config.vsh.yaml index aade00cf..e039befc 100644 --- a/target/executable/parallel_map/.config.vsh.yaml +++ b/target/executable/parallel_map/.config.vsh.yaml @@ -282,7 +282,7 @@ build_info: output: "target/executable/parallel_map" executable: "target/executable/parallel_map/parallel_map" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/parallel_map/parallel_map b/target/executable/parallel_map/parallel_map index de6be21f..ca2e67f0 100755 --- a/target/executable/parallel_map/parallel_map +++ b/target/executable/parallel_map/parallel_map @@ -461,9 +461,9 @@ ENV STAR_BINARY=STAR COPY STAR /usr/local/bin/$STAR_BINARY LABEL org.opencontainers.image.authors="Dries Schaumont, Toni Verbeiren" LABEL org.opencontainers.image.description="Companion container for running component parallel_map" -LABEL org.opencontainers.image.created="2025-04-01T15:16:03Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:26Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/report/create_report/.config.vsh.yaml b/target/executable/report/create_report/.config.vsh.yaml index ff359083..56e62b17 100644 --- a/target/executable/report/create_report/.config.vsh.yaml +++ b/target/executable/report/create_report/.config.vsh.yaml @@ -206,7 +206,7 @@ build_info: output: "target/executable/report/create_report" executable: "target/executable/report/create_report/create_report" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/report/create_report/create_report b/target/executable/report/create_report/create_report index 3cece068..97e765c5 100755 --- a/target/executable/report/create_report/create_report +++ b/target/executable/report/create_report/create_report @@ -462,9 +462,9 @@ RUN Rscript -e 'options(warn = 2); if (!requireNamespace("remotes", quietly = TR LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component report create_report" -LABEL org.opencontainers.image.created="2025-04-01T15:16:03Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:25Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/stats/combine_star_logs/.config.vsh.yaml b/target/executable/stats/combine_star_logs/.config.vsh.yaml index 6e5187d3..e6e798c2 100644 --- a/target/executable/stats/combine_star_logs/.config.vsh.yaml +++ b/target/executable/stats/combine_star_logs/.config.vsh.yaml @@ -201,7 +201,7 @@ build_info: output: "target/executable/stats/combine_star_logs" executable: "target/executable/stats/combine_star_logs/combine_star_logs" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/stats/combine_star_logs/combine_star_logs b/target/executable/stats/combine_star_logs/combine_star_logs index 710ab7e6..a516c3fd 100755 --- a/target/executable/stats/combine_star_logs/combine_star_logs +++ b/target/executable/stats/combine_star_logs/combine_star_logs @@ -457,9 +457,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont" LABEL org.opencontainers.image.description="Companion container for running component stats combine_star_logs" -LABEL org.opencontainers.image.created="2025-04-01T15:16:01Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/stats/generate_pool_statistics/.config.vsh.yaml b/target/executable/stats/generate_pool_statistics/.config.vsh.yaml index e60fabf7..afcb7cda 100644 --- a/target/executable/stats/generate_pool_statistics/.config.vsh.yaml +++ b/target/executable/stats/generate_pool_statistics/.config.vsh.yaml @@ -185,7 +185,7 @@ build_info: output: "target/executable/stats/generate_pool_statistics" executable: "target/executable/stats/generate_pool_statistics/generate_pool_statistics" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/stats/generate_pool_statistics/generate_pool_statistics b/target/executable/stats/generate_pool_statistics/generate_pool_statistics index fcff8f89..3c2dab19 100755 --- a/target/executable/stats/generate_pool_statistics/generate_pool_statistics +++ b/target/executable/stats/generate_pool_statistics/generate_pool_statistics @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component stats generate_pool_statistics" -LABEL org.opencontainers.image.created="2025-04-01T15:16:02Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/stats/generate_well_statistics/.config.vsh.yaml b/target/executable/stats/generate_well_statistics/.config.vsh.yaml index 4fdc4bb8..bb65cc0a 100644 --- a/target/executable/stats/generate_well_statistics/.config.vsh.yaml +++ b/target/executable/stats/generate_well_statistics/.config.vsh.yaml @@ -267,7 +267,7 @@ build_info: output: "target/executable/stats/generate_well_statistics" executable: "target/executable/stats/generate_well_statistics/generate_well_statistics" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/stats/generate_well_statistics/generate_well_statistics b/target/executable/stats/generate_well_statistics/generate_well_statistics index 61461805..b6df55c4 100755 --- a/target/executable/stats/generate_well_statistics/generate_well_statistics +++ b/target/executable/stats/generate_well_statistics/generate_well_statistics @@ -461,9 +461,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dries Schaumont, Marijke Van Moerbeke" LABEL org.opencontainers.image.description="Companion container for running component stats generate_well_statistics" -LABEL org.opencontainers.image.created="2025-04-01T15:16:01Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:24Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER diff --git a/target/executable/utils/save_params/.config.vsh.yaml b/target/executable/utils/save_params/.config.vsh.yaml index 41814f40..b2dacc4e 100644 --- a/target/executable/utils/save_params/.config.vsh.yaml +++ b/target/executable/utils/save_params/.config.vsh.yaml @@ -14,7 +14,7 @@ argument_groups: multiple_sep: ";" - type: "string" name: "--params_yaml" - description: "base64 encoded yaml file containing the state\n" + description: "base64 encoded yaml containing the state\n" info: null required: true direction: "input" @@ -24,8 +24,10 @@ argument_groups: arguments: - type: "string" name: "--output" - description: "The output file\n" + description: "The output YAML file\n" info: null + example: + - "output.yaml" required: true direction: "input" multiple: false @@ -37,7 +39,7 @@ resources: - type: "file" path: "nextflow_labels.config" dest: "nextflow_labels.config" -description: "Save parameters to a file\n" +description: "Save parameters to a YAML file\n" info: null status: "enabled" scope: @@ -144,7 +146,7 @@ build_info: output: "target/executable/utils/save_params" executable: "target/executable/utils/save_params/save_params" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/executable/utils/save_params/save_params b/target/executable/utils/save_params/save_params index 04a574bf..446bb80e 100755 --- a/target/executable/utils/save_params/save_params +++ b/target/executable/utils/save_params/save_params @@ -453,9 +453,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "pyyaml" LABEL org.opencontainers.image.description="Companion container for running component utils save_params" -LABEL org.opencontainers.image.created="2025-04-01T15:16:03Z" +LABEL org.opencontainers.image.created="2025-04-03T13:19:26Z" LABEL org.opencontainers.image.source="https://github.com/viash-hub/htrnaseq" -LABEL org.opencontainers.image.revision="05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" +LABEL org.opencontainers.image.revision="24e6d49c099294ef0cedbe2666fdf64e21aad0df" LABEL org.opencontainers.image.version="save-params" VIASHDOCKER @@ -575,7 +575,7 @@ VIASH_DOCKER_RUN_ARGS=(-i --rm) function ViashHelp { echo "save_params save-params" echo "" - echo "Save parameters to a file" + echo "Save parameters to a YAML file" echo "" echo "Inputs:" echo " --id" @@ -584,12 +584,13 @@ function ViashHelp { echo "" echo " --params_yaml" echo " type: string, required parameter" - echo " base64 encoded yaml file containing the state" + echo " base64 encoded yaml containing the state" echo "" echo "Outputs:" echo " --output" echo " type: string, required parameter" - echo " The output file" + echo " example: output.yaml" + echo " The output YAML file" echo "" echo "Viash built in Computational Requirements:" echo " ---cpus=INT" @@ -1078,39 +1079,24 @@ class Dumper(yaml.Dumper): return super(Dumper, self).increase_indent(flow, False) def decode_params_yaml(encoded_yaml): - # Step 1: Decode from Base64 yaml_bytes = base64.b64decode(encoded_yaml) - - # Step 2: Convert bytes to string yaml_string = yaml_bytes.decode('utf-8') - - # Step 3: Extract pattern for Java path objects - # Find pattern: !!sun.nio.fs.UnixPath /path/to/file - pattern = r'!!sun\\.nio\\.fs\\.UnixPath\\s+([^\\n]+)' - - # Replace with the actual path string (captured group) - yaml_string = re.sub(pattern, r'\\1', yaml_string) - - # Handle any remaining empty UnixPath objects - yaml_string = yaml_string.replace('!!sun.nio.fs.UnixPath {}', '""') - - # Step 4: Parse YAML yaml_data = yaml.safe_load(yaml_string) return yaml_data -def replace_id(value, sample_id): - if isinstance(value, str): - return value.replace('\$id', sample_id) - elif isinstance(value, list): - return [replace_id(item, sample_id) for item in value] - return value +# def replace_id(value, sample_id): +# if isinstance(value, str): +# return value.replace('\$id', sample_id) +# elif isinstance(value, list): +# return [replace_id(item, sample_id) for item in value] +# return value print(par['params_yaml']) params = decode_params_yaml(par['params_yaml']) -for key, value in params.items(): - params[key] = replace_id(value, par["id"]) +# for key, value in params.items(): +# params[key] = replace_id(value, par["id"]) with open(par["output"], 'w') as f: yaml.dump(params, f, default_flow_style=False, Dumper=Dumper) diff --git a/target/nextflow/eset/create_eset/.config.vsh.yaml b/target/nextflow/eset/create_eset/.config.vsh.yaml index 2797a480..68503405 100644 --- a/target/nextflow/eset/create_eset/.config.vsh.yaml +++ b/target/nextflow/eset/create_eset/.config.vsh.yaml @@ -203,7 +203,7 @@ build_info: output: "target/nextflow/eset/create_eset" executable: "target/nextflow/eset/create_eset/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/eset/create_eset/main.nf b/target/nextflow/eset/create_eset/main.nf index 0c651b43..56eda437 100644 --- a/target/nextflow/eset/create_eset/main.nf +++ b/target/nextflow/eset/create_eset/main.nf @@ -3309,7 +3309,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/eset/create_eset", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/eset/create_fdata/.config.vsh.yaml b/target/nextflow/eset/create_fdata/.config.vsh.yaml index 5b63f0fc..d0ad2a7d 100644 --- a/target/nextflow/eset/create_fdata/.config.vsh.yaml +++ b/target/nextflow/eset/create_fdata/.config.vsh.yaml @@ -180,7 +180,7 @@ build_info: output: "target/nextflow/eset/create_fdata" executable: "target/nextflow/eset/create_fdata/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/eset/create_fdata/main.nf b/target/nextflow/eset/create_fdata/main.nf index e619c609..3fd1d3a8 100644 --- a/target/nextflow/eset/create_fdata/main.nf +++ b/target/nextflow/eset/create_fdata/main.nf @@ -3279,7 +3279,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/eset/create_fdata", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/eset/create_pdata/.config.vsh.yaml b/target/nextflow/eset/create_pdata/.config.vsh.yaml index 4edefbb6..47dc204a 100644 --- a/target/nextflow/eset/create_pdata/.config.vsh.yaml +++ b/target/nextflow/eset/create_pdata/.config.vsh.yaml @@ -194,7 +194,7 @@ build_info: output: "target/nextflow/eset/create_pdata" executable: "target/nextflow/eset/create_pdata/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/eset/create_pdata/main.nf b/target/nextflow/eset/create_pdata/main.nf index a8a4e5d2..6fc3fc75 100644 --- a/target/nextflow/eset/create_pdata/main.nf +++ b/target/nextflow/eset/create_pdata/main.nf @@ -3293,7 +3293,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/eset/create_pdata", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml b/target/nextflow/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml index 7edbdadf..a6da49f3 100644 --- a/target/nextflow/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml +++ b/target/nextflow/integration_test_components/htrnaseq/check_eset/.config.vsh.yaml @@ -152,7 +152,7 @@ build_info: output: "target/nextflow/integration_test_components/htrnaseq/check_eset" executable: "target/nextflow/integration_test_components/htrnaseq/check_eset/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/integration_test_components/htrnaseq/check_eset/main.nf b/target/nextflow/integration_test_components/htrnaseq/check_eset/main.nf index 2d4cbeb7..cc64ba5e 100644 --- a/target/nextflow/integration_test_components/htrnaseq/check_eset/main.nf +++ b/target/nextflow/integration_test_components/htrnaseq/check_eset/main.nf @@ -3233,7 +3233,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/integration_test_components/htrnaseq/check_eset", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml b/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml index 793bfb78..d0aba7ae 100644 --- a/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml +++ b/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/.config.vsh.yaml @@ -161,7 +161,7 @@ build_info: output: "target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output" executable: "target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/main.nf b/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/main.nf index 3f91b91e..ef3b2eaf 100644 --- a/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/main.nf +++ b/target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output/main.nf @@ -3244,7 +3244,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/integration_test_components/well_demultiplexing/check_cutadapt_output", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/io/publish_fastqs/.config.vsh.yaml b/target/nextflow/io/publish_fastqs/.config.vsh.yaml index 59bdb7fc..fe49d28f 100644 --- a/target/nextflow/io/publish_fastqs/.config.vsh.yaml +++ b/target/nextflow/io/publish_fastqs/.config.vsh.yaml @@ -136,7 +136,7 @@ build_info: output: "target/nextflow/io/publish_fastqs" executable: "target/nextflow/io/publish_fastqs/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/io/publish_fastqs/main.nf b/target/nextflow/io/publish_fastqs/main.nf index 5fc9c574..4dc5dceb 100644 --- a/target/nextflow/io/publish_fastqs/main.nf +++ b/target/nextflow/io/publish_fastqs/main.nf @@ -3207,7 +3207,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/io/publish_fastqs", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/io/publish_results/.config.vsh.yaml b/target/nextflow/io/publish_results/.config.vsh.yaml index cc62645b..183f1505 100644 --- a/target/nextflow/io/publish_results/.config.vsh.yaml +++ b/target/nextflow/io/publish_results/.config.vsh.yaml @@ -190,7 +190,7 @@ build_info: output: "target/nextflow/io/publish_results" executable: "target/nextflow/io/publish_results/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/io/publish_results/main.nf b/target/nextflow/io/publish_results/main.nf index 40da8e35..bbe4d0ad 100644 --- a/target/nextflow/io/publish_results/main.nf +++ b/target/nextflow/io/publish_results/main.nf @@ -3267,7 +3267,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/io/publish_results", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/parallel_map/.config.vsh.yaml b/target/nextflow/parallel_map/.config.vsh.yaml index 9040c8cb..59a875a8 100644 --- a/target/nextflow/parallel_map/.config.vsh.yaml +++ b/target/nextflow/parallel_map/.config.vsh.yaml @@ -282,7 +282,7 @@ build_info: output: "target/nextflow/parallel_map" executable: "target/nextflow/parallel_map/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/parallel_map/main.nf b/target/nextflow/parallel_map/main.nf index 58e342a4..0ff24c0a 100644 --- a/target/nextflow/parallel_map/main.nf +++ b/target/nextflow/parallel_map/main.nf @@ -3379,7 +3379,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/parallel_map", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/report/create_report/.config.vsh.yaml b/target/nextflow/report/create_report/.config.vsh.yaml index c165fddc..189373ef 100644 --- a/target/nextflow/report/create_report/.config.vsh.yaml +++ b/target/nextflow/report/create_report/.config.vsh.yaml @@ -206,7 +206,7 @@ build_info: output: "target/nextflow/report/create_report" executable: "target/nextflow/report/create_report/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/report/create_report/main.nf b/target/nextflow/report/create_report/main.nf index debf1b06..14123875 100644 --- a/target/nextflow/report/create_report/main.nf +++ b/target/nextflow/report/create_report/main.nf @@ -3314,7 +3314,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/report/create_report", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/stats/combine_star_logs/.config.vsh.yaml b/target/nextflow/stats/combine_star_logs/.config.vsh.yaml index 1aedebd2..fa48e80c 100644 --- a/target/nextflow/stats/combine_star_logs/.config.vsh.yaml +++ b/target/nextflow/stats/combine_star_logs/.config.vsh.yaml @@ -201,7 +201,7 @@ build_info: output: "target/nextflow/stats/combine_star_logs" executable: "target/nextflow/stats/combine_star_logs/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/stats/combine_star_logs/main.nf b/target/nextflow/stats/combine_star_logs/main.nf index 516c3dfe..2d38ec95 100644 --- a/target/nextflow/stats/combine_star_logs/main.nf +++ b/target/nextflow/stats/combine_star_logs/main.nf @@ -3295,7 +3295,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/stats/combine_star_logs", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/stats/generate_pool_statistics/.config.vsh.yaml b/target/nextflow/stats/generate_pool_statistics/.config.vsh.yaml index cab4f731..30d74315 100644 --- a/target/nextflow/stats/generate_pool_statistics/.config.vsh.yaml +++ b/target/nextflow/stats/generate_pool_statistics/.config.vsh.yaml @@ -185,7 +185,7 @@ build_info: output: "target/nextflow/stats/generate_pool_statistics" executable: "target/nextflow/stats/generate_pool_statistics/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/stats/generate_pool_statistics/main.nf b/target/nextflow/stats/generate_pool_statistics/main.nf index c5ae1fd5..6d148ab4 100644 --- a/target/nextflow/stats/generate_pool_statistics/main.nf +++ b/target/nextflow/stats/generate_pool_statistics/main.nf @@ -3279,7 +3279,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/stats/generate_pool_statistics", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/stats/generate_well_statistics/.config.vsh.yaml b/target/nextflow/stats/generate_well_statistics/.config.vsh.yaml index aecc5814..c0f99931 100644 --- a/target/nextflow/stats/generate_well_statistics/.config.vsh.yaml +++ b/target/nextflow/stats/generate_well_statistics/.config.vsh.yaml @@ -267,7 +267,7 @@ build_info: output: "target/nextflow/stats/generate_well_statistics" executable: "target/nextflow/stats/generate_well_statistics/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/stats/generate_well_statistics/main.nf b/target/nextflow/stats/generate_well_statistics/main.nf index a1854080..24f5928c 100644 --- a/target/nextflow/stats/generate_well_statistics/main.nf +++ b/target/nextflow/stats/generate_well_statistics/main.nf @@ -3374,7 +3374,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/stats/generate_well_statistics", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/utils/concatRuns/.config.vsh.yaml b/target/nextflow/utils/concatRuns/.config.vsh.yaml index adc74775..4e7116f1 100644 --- a/target/nextflow/utils/concatRuns/.config.vsh.yaml +++ b/target/nextflow/utils/concatRuns/.config.vsh.yaml @@ -157,7 +157,7 @@ build_info: output: "target/nextflow/utils/concatRuns" executable: "target/nextflow/utils/concatRuns/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" dependencies: - "target/dependencies/vsh/vsh/craftbox/v0.1.0/nextflow/concat_text" diff --git a/target/nextflow/utils/concatRuns/main.nf b/target/nextflow/utils/concatRuns/main.nf index 4c487f74..8ef1c1f7 100644 --- a/target/nextflow/utils/concatRuns/main.nf +++ b/target/nextflow/utils/concatRuns/main.nf @@ -3229,7 +3229,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/utils/concatRuns", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/utils/listInputDir/.config.vsh.yaml b/target/nextflow/utils/listInputDir/.config.vsh.yaml index 778cba7f..058239f1 100644 --- a/target/nextflow/utils/listInputDir/.config.vsh.yaml +++ b/target/nextflow/utils/listInputDir/.config.vsh.yaml @@ -168,7 +168,7 @@ build_info: output: "target/nextflow/utils/listInputDir" executable: "target/nextflow/utils/listInputDir/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/utils/listInputDir/main.nf b/target/nextflow/utils/listInputDir/main.nf index aa408222..b1ef6efc 100644 --- a/target/nextflow/utils/listInputDir/main.nf +++ b/target/nextflow/utils/listInputDir/main.nf @@ -3239,7 +3239,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/utils/listInputDir", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/utils/save_params/.config.vsh.yaml b/target/nextflow/utils/save_params/.config.vsh.yaml index 6230ae48..efbc6fc1 100644 --- a/target/nextflow/utils/save_params/.config.vsh.yaml +++ b/target/nextflow/utils/save_params/.config.vsh.yaml @@ -14,7 +14,7 @@ argument_groups: multiple_sep: ";" - type: "string" name: "--params_yaml" - description: "base64 encoded yaml file containing the state\n" + description: "base64 encoded yaml containing the state\n" info: null required: true direction: "input" @@ -24,8 +24,10 @@ argument_groups: arguments: - type: "string" name: "--output" - description: "The output file\n" + description: "The output YAML file\n" info: null + example: + - "output.yaml" required: true direction: "input" multiple: false @@ -37,7 +39,7 @@ resources: - type: "file" path: "nextflow_labels.config" dest: "nextflow_labels.config" -description: "Save parameters to a file\n" +description: "Save parameters to a YAML file\n" info: null status: "enabled" scope: @@ -144,7 +146,7 @@ build_info: output: "target/nextflow/utils/save_params" executable: "target/nextflow/utils/save_params/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/utils/save_params/main.nf b/target/nextflow/utils/save_params/main.nf index 94b24e58..69d7f529 100644 --- a/target/nextflow/utils/save_params/main.nf +++ b/target/nextflow/utils/save_params/main.nf @@ -3054,7 +3054,7 @@ meta = [ { "type" : "string", "name" : "--params_yaml", - "description" : "base64 encoded yaml file containing the state\n", + "description" : "base64 encoded yaml containing the state\n", "required" : true, "direction" : "input", "multiple" : false, @@ -3068,7 +3068,10 @@ meta = [ { "type" : "string", "name" : "--output", - "description" : "The output file\n", + "description" : "The output YAML file\n", + "example" : [ + "output.yaml" + ], "required" : true, "direction" : "input", "multiple" : false, @@ -3089,7 +3092,7 @@ meta = [ "dest" : "nextflow_labels.config" } ], - "description" : "Save parameters to a file\n", + "description" : "Save parameters to a YAML file\n", "status" : "enabled", "scope" : { "image" : "public", @@ -3218,7 +3221,7 @@ meta = [ "engine" : "docker|native", "output" : "target/nextflow/utils/save_params", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { @@ -3311,39 +3314,24 @@ class Dumper(yaml.Dumper): return super(Dumper, self).increase_indent(flow, False) def decode_params_yaml(encoded_yaml): - # Step 1: Decode from Base64 yaml_bytes = base64.b64decode(encoded_yaml) - - # Step 2: Convert bytes to string yaml_string = yaml_bytes.decode('utf-8') - - # Step 3: Extract pattern for Java path objects - # Find pattern: !!sun.nio.fs.UnixPath /path/to/file - pattern = r'!!sun\\\\.nio\\\\.fs\\\\.UnixPath\\\\s+([^\\\\n]+)' - - # Replace with the actual path string (captured group) - yaml_string = re.sub(pattern, r'\\\\1', yaml_string) - - # Handle any remaining empty UnixPath objects - yaml_string = yaml_string.replace('!!sun.nio.fs.UnixPath {}', '""') - - # Step 4: Parse YAML yaml_data = yaml.safe_load(yaml_string) return yaml_data -def replace_id(value, sample_id): - if isinstance(value, str): - return value.replace('\\$id', sample_id) - elif isinstance(value, list): - return [replace_id(item, sample_id) for item in value] - return value +# def replace_id(value, sample_id): +# if isinstance(value, str): +# return value.replace('\\$id', sample_id) +# elif isinstance(value, list): +# return [replace_id(item, sample_id) for item in value] +# return value print(par['params_yaml']) params = decode_params_yaml(par['params_yaml']) -for key, value in params.items(): - params[key] = replace_id(value, par["id"]) +# for key, value in params.items(): +# params[key] = replace_id(value, par["id"]) with open(par["output"], 'w') as f: yaml.dump(params, f, default_flow_style=False, Dumper=Dumper) diff --git a/target/nextflow/utils/save_params/nextflow.config b/target/nextflow/utils/save_params/nextflow.config index e83796cb..41085dcb 100644 --- a/target/nextflow/utils/save_params/nextflow.config +++ b/target/nextflow/utils/save_params/nextflow.config @@ -3,7 +3,7 @@ manifest { mainScript = 'main.nf' nextflowVersion = '!>=20.12.1-edge' version = 'save-params' - description = 'Save parameters to a file\n' + description = 'Save parameters to a YAML file\n' } process.container = 'nextflow/bash:latest' diff --git a/target/nextflow/utils/save_params/nextflow_schema.json b/target/nextflow/utils/save_params/nextflow_schema.json index 39a26fa5..8e32c1ad 100644 --- a/target/nextflow/utils/save_params/nextflow_schema.json +++ b/target/nextflow/utils/save_params/nextflow_schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema", "title": "save_params", -"description": "Save parameters to a file\n", +"description": "Save parameters to a YAML file\n", "type": "object", "definitions": { @@ -27,8 +27,8 @@ "params_yaml": { "type": "string", - "description": "Type: `string`, required. base64 encoded yaml file containing the state\n", - "help_text": "Type: `string`, required. base64 encoded yaml file containing the state\n" + "description": "Type: `string`, required. base64 encoded yaml containing the state\n", + "help_text": "Type: `string`, required. base64 encoded yaml containing the state\n" } @@ -47,8 +47,8 @@ "output": { "type": "string", - "description": "Type: `string`, required. The output file\n", - "help_text": "Type: `string`, required. The output file\n" + "description": "Type: `string`, required, example: `output.yaml`. The output YAML file\n", + "help_text": "Type: `string`, required, example: `output.yaml`. The output YAML file\n" } diff --git a/target/nextflow/workflows/htrnaseq/.config.vsh.yaml b/target/nextflow/workflows/htrnaseq/.config.vsh.yaml index 13481ab4..12cfb45c 100644 --- a/target/nextflow/workflows/htrnaseq/.config.vsh.yaml +++ b/target/nextflow/workflows/htrnaseq/.config.vsh.yaml @@ -183,6 +183,17 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--params" + info: null + default: + - "params.$id.yaml" + must_exist: true + create_parent: true + required: true + direction: "output" + multiple: false + multiple_sep: ";" resources: - type: "nextflow_script" path: "main.nf" @@ -331,7 +342,7 @@ build_info: output: "target/nextflow/workflows/htrnaseq" executable: "target/nextflow/workflows/htrnaseq/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" dependencies: - "target/nextflow/stats/combine_star_logs" diff --git a/target/nextflow/workflows/htrnaseq/main.nf b/target/nextflow/workflows/htrnaseq/main.nf index 3f94b36c..35c49f2a 100644 --- a/target/nextflow/workflows/htrnaseq/main.nf +++ b/target/nextflow/workflows/htrnaseq/main.nf @@ -3252,6 +3252,19 @@ meta = [ "direction" : "output", "multiple" : false, "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--params", + "default" : [ + "params.$id.yaml" + ], + "must_exist" : true, + "create_parent" : true, + "required" : true, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" } ] } @@ -3471,7 +3484,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/workflows/htrnaseq", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { @@ -3543,14 +3556,6 @@ workflow run_wf { return [id, newState] } - // The featureData only has one requirement: the genome annotation. - // It can be generated straight away. Most of the time, there is one shared - // annotation for all of the inputs and the fData should only be calculated once. - // The state is manpulated in such a way that there is one event created per unique - // input annotation file. In turn, the featureData file can joined into the original input - // channel which allows it to be shared across events if required. - f_data_ch = input_ch - | save_params.run( fromState: {id, state -> // Define the function before using it @@ -3558,8 +3563,10 @@ workflow run_wf { convertPaths = { value -> if (value instanceof java.nio.file.Path) return value.toUriString() - else if (value instanceof Collection) + else if (value instanceof List) return value.collect { convertPaths(it) } + else if (value instanceof Collection) + throw new UnsupportedOperationException("Collections other than Lists are not supported") else return value } @@ -3574,12 +3581,21 @@ workflow run_wf { return [ "id": id, "params_yaml": encodedYaml, - "output": "${id}_parameters.yaml" + "output": "params" ] }, - toState: ["parameters": "output"] + toState: ["params": "output"] ) + // The featureData only has one requirement: the genome annotation. + // It can be generated straight away. Most of the time, there is one shared + // annotation for all of the inputs and the fData should only be calculated once. + // The state is manpulated in such a way that there is one event created per unique + // input annotation file. In turn, the featureData file can joined into the original input + // channel which allows it to be shared across events if required. + f_data_ch = input_ch + + | toSortedList() | flatMap {ids_and_states -> def annotation_files = ids_and_states.inject([:]){ old_state, id_and_state -> @@ -3879,7 +3895,7 @@ workflow run_wf { "f_data": "f_data", "p_data": "p_data", "html_report": "html_report", - "parameters": "parameters", + "params": "params", "_meta": "_meta", ]) diff --git a/target/nextflow/workflows/htrnaseq/nextflow_schema.json b/target/nextflow/workflows/htrnaseq/nextflow_schema.json index a4910c74..bacb3203 100644 --- a/target/nextflow/workflows/htrnaseq/nextflow_schema.json +++ b/target/nextflow/workflows/htrnaseq/nextflow_schema.json @@ -182,6 +182,17 @@ } + , + "params": { + "type": + "string", + "description": "Type: `file`, required, default: `$id.$key.params.yaml`. ", + "help_text": "Type: `file`, required, default: `$id.$key.params.yaml`. " + , + "default":"$id.$key.params.yaml" + } + + } }, diff --git a/target/nextflow/workflows/runner/.config.vsh.yaml b/target/nextflow/workflows/runner/.config.vsh.yaml index f838fb9a..4be428aa 100644 --- a/target/nextflow/workflows/runner/.config.vsh.yaml +++ b/target/nextflow/workflows/runner/.config.vsh.yaml @@ -221,7 +221,7 @@ build_info: output: "target/nextflow/workflows/runner" executable: "target/nextflow/workflows/runner/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" dependencies: - "target/nextflow/utils/listInputDir" diff --git a/target/nextflow/workflows/runner/main.nf b/target/nextflow/workflows/runner/main.nf index b2fb98a9..4a3531d0 100644 --- a/target/nextflow/workflows/runner/main.nf +++ b/target/nextflow/workflows/runner/main.nf @@ -3317,7 +3317,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/workflows/runner", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/workflows/well_demultiplex/.config.vsh.yaml b/target/nextflow/workflows/well_demultiplex/.config.vsh.yaml index 53fd118d..61883770 100644 --- a/target/nextflow/workflows/well_demultiplex/.config.vsh.yaml +++ b/target/nextflow/workflows/well_demultiplex/.config.vsh.yaml @@ -214,7 +214,7 @@ build_info: output: "target/nextflow/workflows/well_demultiplex" executable: "target/nextflow/workflows/well_demultiplex/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" dependencies: - "target/dependencies/vsh/vsh/biobox/v0.3.0/nextflow/cutadapt" diff --git a/target/nextflow/workflows/well_demultiplex/main.nf b/target/nextflow/workflows/well_demultiplex/main.nf index 6d53fbbf..a81d8d27 100644 --- a/target/nextflow/workflows/well_demultiplex/main.nf +++ b/target/nextflow/workflows/well_demultiplex/main.nf @@ -3319,7 +3319,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/workflows/well_demultiplex", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : { diff --git a/target/nextflow/workflows/well_metadata/.config.vsh.yaml b/target/nextflow/workflows/well_metadata/.config.vsh.yaml index 2db079dd..bfb61d61 100644 --- a/target/nextflow/workflows/well_metadata/.config.vsh.yaml +++ b/target/nextflow/workflows/well_metadata/.config.vsh.yaml @@ -212,7 +212,7 @@ build_info: output: "target/nextflow/workflows/well_metadata" executable: "target/nextflow/workflows/well_metadata/main.nf" viash_version: "0.9.2" - git_commit: "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a" + git_commit: "24e6d49c099294ef0cedbe2666fdf64e21aad0df" git_remote: "https://github.com/viash-hub/htrnaseq" package_config: name: "htrnaseq" diff --git a/target/nextflow/workflows/well_metadata/main.nf b/target/nextflow/workflows/well_metadata/main.nf index 24f5764b..0de44175 100644 --- a/target/nextflow/workflows/well_metadata/main.nf +++ b/target/nextflow/workflows/well_metadata/main.nf @@ -3299,7 +3299,7 @@ meta = [ "engine" : "native|native", "output" : "target/nextflow/workflows/well_metadata", "viash_version" : "0.9.2", - "git_commit" : "05ac6a3d2432d2da9a410388f33c45a78fd0cb1a", + "git_commit" : "24e6d49c099294ef0cedbe2666fdf64e21aad0df", "git_remote" : "https://github.com/viash-hub/htrnaseq" }, "package_config" : {