From 54679b63dc8118f18477c2fc651dfa0de6f513d8 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 09:16:19 +0200 Subject: [PATCH 01/24] install nf-core/csvtk_concat --- modules.json | 5 ++ modules/nf-core/csvtk/concat/environment.yml | 7 ++ modules/nf-core/csvtk/concat/main.nf | 55 ++++++++++++++ modules/nf-core/csvtk/concat/meta.yml | 60 ++++++++++++++++ .../nf-core/csvtk/concat/tests/main.nf.test | 72 +++++++++++++++++++ .../csvtk/concat/tests/main.nf.test.snap | 68 ++++++++++++++++++ 6 files changed, 267 insertions(+) create mode 100644 modules/nf-core/csvtk/concat/environment.yml create mode 100644 modules/nf-core/csvtk/concat/main.nf create mode 100644 modules/nf-core/csvtk/concat/meta.yml create mode 100644 modules/nf-core/csvtk/concat/tests/main.nf.test create mode 100644 modules/nf-core/csvtk/concat/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index cbe3446..2968b49 100644 --- a/modules.json +++ b/modules.json @@ -46,6 +46,11 @@ "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, + "csvtk/concat": { + "branch": "master", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": ["modules"] + }, "deseq2/differential": { "branch": "master", "git_sha": "2e24bf8b6b045e1cf56a2907306b008113a686d0", diff --git a/modules/nf-core/csvtk/concat/environment.yml b/modules/nf-core/csvtk/concat/environment.yml new file mode 100644 index 0000000..52d488d --- /dev/null +++ b/modules/nf-core/csvtk/concat/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - bioconda + - conda-forge +dependencies: + - bioconda::csvtk=0.31.0 diff --git a/modules/nf-core/csvtk/concat/main.nf b/modules/nf-core/csvtk/concat/main.nf new file mode 100644 index 0000000..9f17a9b --- /dev/null +++ b/modules/nf-core/csvtk/concat/main.nf @@ -0,0 +1,55 @@ +process CSVTK_CONCAT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/csvtk:0.31.0--h9ee0642_0' : + 'biocontainers/csvtk:0.31.0--h9ee0642_0' }" + + input: + tuple val(meta), path(csv, name: 'inputs/csv*/*') + val in_format + val out_format + + output: + tuple val(meta), path("${prefix}.${out_extension}"), emit: csv + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format) + def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + csvtk \\ + concat \\ + $args \\ + --num-cpus $task.cpus \\ + --delimiter "${delimiter}" \\ + --out-delimiter "${out_delimiter}" \\ + --out-file ${prefix}.${out_extension} \\ + $csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + touch ${prefix}.${out_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ +} diff --git a/modules/nf-core/csvtk/concat/meta.yml b/modules/nf-core/csvtk/concat/meta.yml new file mode 100644 index 0000000..37497b3 --- /dev/null +++ b/modules/nf-core/csvtk/concat/meta.yml @@ -0,0 +1,60 @@ +name: csvtk_concat +description: Concatenate two or more CSV (or TSV) tables into a single table +keywords: + - concatenate + - tsv + - csv +tools: + - csvtk: + description: A cross-platform, efficient, practical CSV/TSV toolkit + homepage: http://bioinf.shenwei.me/csvtk + documentation: http://bioinf.shenwei.me/csvtk + tool_dev_url: https://github.com/shenwei356/csvtk + licence: ["MIT"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - csv: + type: file + description: CSV/TSV formatted files + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + - in_format: + type: string + description: Input format (csv, tab, or a delimiting character) + pattern: "*" + - out_format: + type: string + description: Output format (csv, tab, or a delimiting character) + pattern: "*" +output: + csv: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${out_extension}: + type: file + description: Concatenated CSV/TSV file + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "version.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@rpetit3" +maintainers: + - "@rpetit3" diff --git a/modules/nf-core/csvtk/concat/tests/main.nf.test b/modules/nf-core/csvtk/concat/tests/main.nf.test new file mode 100644 index 0000000..b6c1a58 --- /dev/null +++ b/modules/nf-core/csvtk/concat/tests/main.nf.test @@ -0,0 +1,72 @@ +// nf-core modules test csvtk/concat +nextflow_process { + + name "Test Process CSVTK_CONCAT" + script "../main.nf" + process "CSVTK_CONCAT" + + tag "modules" + tag "modules_nfcore" + tag "csvtk" + tag "csvtk/concat" + + test("tsv - concat - csv") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_hybrid.csv", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_long.csv", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true) + ] + ] + input[1] = "tsv" + input[2] = "csv" + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("tsv - concat - csv - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_hybrid.csv", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_long.csv", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true) + ] + ] + input[1] = "tsv" + input[2] = "csv" + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/csvtk/concat/tests/main.nf.test.snap b/modules/nf-core/csvtk/concat/tests/main.nf.test.snap new file mode 100644 index 0000000..254d34a --- /dev/null +++ b/modules/nf-core/csvtk/concat/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "tsv - concat - csv - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" + ], + "csv": [ + [ + { + "id": "test" + }, + "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-08T04:46:46.133640633" + }, + "tsv - concat - csv": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv:md5,bb0ed52999b6b24297bcefb3c29f0a5c" + ] + ], + "1": [ + "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" + ], + "csv": [ + [ + { + "id": "test" + }, + "test.csv:md5,bb0ed52999b6b24297bcefb3c29f0a5c" + ] + ], + "versions": [ + "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-08T04:46:31.419386462" + } +} \ No newline at end of file From dab77480d0be30e07d0807ff2c926753113abf39 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:22:04 +0200 Subject: [PATCH 02/24] add csvtk/sort to local modules --- modules/local/csvtk/sort/environment.yml | 7 +++ modules/local/csvtk/sort/main.nf | 55 ++++++++++++++++++++++ modules/local/csvtk/sort/meta.yml | 60 ++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 modules/local/csvtk/sort/environment.yml create mode 100644 modules/local/csvtk/sort/main.nf create mode 100644 modules/local/csvtk/sort/meta.yml diff --git a/modules/local/csvtk/sort/environment.yml b/modules/local/csvtk/sort/environment.yml new file mode 100644 index 0000000..52d488d --- /dev/null +++ b/modules/local/csvtk/sort/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - bioconda + - conda-forge +dependencies: + - bioconda::csvtk=0.31.0 diff --git a/modules/local/csvtk/sort/main.nf b/modules/local/csvtk/sort/main.nf new file mode 100644 index 0000000..7c52bd8 --- /dev/null +++ b/modules/local/csvtk/sort/main.nf @@ -0,0 +1,55 @@ +process CSVTK_SORT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/csvtk:0.31.0--h9ee0642_0' : + 'biocontainers/csvtk:0.31.0--h9ee0642_0' }" + + input: + tuple val(meta), path(csv, stageAs: 'input/*') + val in_format + val out_format + + output: + tuple val(meta), path("${prefix}.${out_extension}"), emit: sorted + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format) + def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + csvtk \\ + sort \\ + $args \\ + --num-cpus $task.cpus \\ + --delimiter "${delimiter}" \\ + --out-delimiter "${out_delimiter}" \\ + --out-file ${prefix}.${out_extension} \\ + $csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + touch ${prefix}.${out_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ +} diff --git a/modules/local/csvtk/sort/meta.yml b/modules/local/csvtk/sort/meta.yml new file mode 100644 index 0000000..65bbf0a --- /dev/null +++ b/modules/local/csvtk/sort/meta.yml @@ -0,0 +1,60 @@ +name: csvtk_sort +description: Sort CSV (or TSV) tables +keywords: + - sort + - tsv + - csv +tools: + - csvtk: + description: A cross-platform, efficient, practical CSV/TSV toolkit + homepage: http://bioinf.shenwei.me/csvtk + documentation: http://bioinf.shenwei.me/csvtk + tool_dev_url: https://github.com/shenwei356/csvtk + licence: ["MIT"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - csv: + type: file + description: CSV/TSV formatted file + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + - in_format: + type: string + description: Input format (csv, tab, or a delimiting character) + pattern: "*" + - out_format: + type: string + description: Output format (csv, tab, or a delimiting character) + pattern: "*" +output: + sorted: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${out_extension}: + type: file + description: Sorted CSV/TSV file + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "version.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@LeonHafner" +maintainers: + - "@LeonHafner" From 64b2c37e06aa46984e60de31dd85951484cc135f Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:24:23 +0200 Subject: [PATCH 03/24] change fimo subworkflow --- subworkflows/local/fimo/main.nf | 37 ++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index c74c729..e647e05 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -2,6 +2,10 @@ include { FILTER_MOTIFS } from "../../../modules/local/f include { BEDTOOLS_GETFASTA as EXTRACT_SEQUENCE } from "../../../modules/nf-core/bedtools/getfasta" include { RUN_FIMO } from "../../../modules/local/fimo/run_fimo" include { COMBINE_RESULTS } from "../../../modules/local/fimo/combine_results" +include { GAWK as CONCAT_FILTER_GFF } from "../../../modules/nf-core/gawk" +include { GNU_SORT as SORT_GFF } from "../../../modules/nf-core/gnu/sort" +include { CSVTK_CONCAT as CONCAT_FILTER_TSV } from "../../../modules/nf-core/csvtk/concat" +include { CSVTK_SORT as SORT_TSV } from "../../../modules/local/csvtk/sort" workflow FIMO { take: @@ -42,16 +46,33 @@ workflow FIMO { RUN_FIMO(ch_fimo) ch_versions = ch_versions.mix(RUN_FIMO.out.versions) - ch_combine = RUN_FIMO.out.gff - .join(RUN_FIMO.out.tsv) - .map { meta, gff, tsv -> [[id: meta.condition + '_' + meta.assay], gff, tsv] } - .groupTuple() + // Concat per condition_assay and remove comments and empty lines + CONCAT_FILTER_GFF( + RUN_FIMO.out.gff.map { meta, gff -> [[id: meta.condition + '_' + meta.assay], gff] }.groupTuple(), + [], + [] + ) + ch_versions = ch_versions.mix(CONCAT_FILTER_GFF.out.versions) - COMBINE_RESULTS(ch_combine) - ch_versions = ch_versions.mix(COMBINE_RESULTS.out.versions) + SORT_GFF(CONCAT_FILTER_GFF.out.output) + ch_versions = ch_versions.mix(SORT_GFF.out.versions) + + // AWK mit RUN_FIMO.out.tsv -> CONCAT_FILTER_TSV (entferne comments und empty lines, aber behalte header 1x) + // Sort TSV basierend auf 1, 3, 4, 5 mit csvtk + + // Concat per condition_assay and remove comments and empty lines + CONCAT_FILTER_TSV( + RUN_FIMO.out.tsv.map { meta, tsv -> [[id: meta.condition + '_' + meta.assay], tsv] }.groupTuple(), + 'tsv', + 'tsv' + ) + ch_versions = ch_versions.mix(CONCAT_FILTER_TSV.out.versions) + + SORT_TSV(CONCAT_FILTER_TSV.out.csv, 'tsv', 'tsv') + ch_versions = ch_versions.mix(SORT_TSV.out.versions) emit: - tsv = COMBINE_RESULTS.out.tsv - gff = COMBINE_RESULTS.out.gff + gff = SORT_GFF.out.sorted + tsv = SORT_TSV.out.sorted versions = ch_versions } From bc8a7b87bcf0b3b12269133615756d3cd4b7c513 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:24:46 +0200 Subject: [PATCH 04/24] add module config and output --- conf/modules.config | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index 89b1f1d..46ae785 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -589,6 +589,29 @@ process { ] } + withName: ".*:FIMO:CONCAT_FILTER_GFF" { + ext.args = "'/^#/ { next } NF==0 { next } { print }'" + } + + withName: ".*:FIMO:SORT_GFF" { + ext.args = "-t \$'\\t' -k1,1V -k4,4n -k5,5n" + ext.prefix = {"${meta.id}_sorted"} + publishDir = [ + path: { "${params.outdir}/06_fimo_04_combined_results/gff" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: ".*:FIMO:SORT_TSV" { + ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n" + publishDir = [ + path: { "${params.outdir}/06_fimo/04_combined_results/tsv" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: ".*:FIMO:COMBINE_RESULTS" { publishDir = [ path: { "${params.outdir}/06_fimo/04_combined_results" }, From 207f0e76c1956e8ae73f50ab10f1461d7caa5dfe Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:27:18 +0200 Subject: [PATCH 05/24] remove combine_results --- conf/modules.config | 8 -- docs/output.md | 2 +- .../fimo/combine_results/environment.yml | 6 -- modules/local/fimo/combine_results/main.nf | 32 ------ .../templates/combine_results.py | 54 ---------- .../fimo/combine_results/tests/main.nf.test | 63 ----------- .../combine_results/tests/main.nf.test.snap | 100 ------------------ subworkflows/local/fimo/main.nf | 1 - 8 files changed, 1 insertion(+), 265 deletions(-) delete mode 100644 modules/local/fimo/combine_results/environment.yml delete mode 100644 modules/local/fimo/combine_results/main.nf delete mode 100644 modules/local/fimo/combine_results/templates/combine_results.py delete mode 100644 modules/local/fimo/combine_results/tests/main.nf.test delete mode 100644 modules/local/fimo/combine_results/tests/main.nf.test.snap diff --git a/conf/modules.config b/conf/modules.config index 46ae785..fbd0fac 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -612,14 +612,6 @@ process { ] } - withName: ".*:FIMO:COMBINE_RESULTS" { - publishDir = [ - path: { "${params.outdir}/06_fimo/04_combined_results" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - /* SNEEP */ diff --git a/docs/output.md b/docs/output.md index 386b46f..2114514 100644 --- a/docs/output.md +++ b/docs/output.md @@ -315,7 +315,7 @@ FIMO analysis is particularly valuable for users who need detailed binding site - `*.tsv`, `*.gff`, `*.html`, `*.xml`, `*cisml.xml`, `*best_site.narrowPeak`. - `04_combined_results/` - `_.tsv` - - `_.gff`: Collated FIMO hits across inputs (COMBINE_RESULTS). + - `_.gff`: Collated FIMO hits across inputs. diff --git a/modules/local/fimo/combine_results/environment.yml b/modules/local/fimo/combine_results/environment.yml deleted file mode 100644 index fda0639..0000000 --- a/modules/local/fimo/combine_results/environment.yml +++ /dev/null @@ -1,6 +0,0 @@ -channels: - - conda-forge - - bioconda -dependencies: - - conda-forge::pandas=2.3.0 - - conda-forge::pyyaml=6.0.2 diff --git a/modules/local/fimo/combine_results/main.nf b/modules/local/fimo/combine_results/main.nf deleted file mode 100644 index 2f683b7..0000000 --- a/modules/local/fimo/combine_results/main.nf +++ /dev/null @@ -1,32 +0,0 @@ -process COMBINE_RESULTS { - tag "${meta.id}" - label "process_single" - - conda "environment.yml" - container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container - ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/7c/7c256e63e08633ac420692d3ceec1f554fe4fcc794e5bdd331994f743096a46d/data' - : 'community.wave.seqera.io/library/pandas_pyyaml:c0acbb47d05e4f9c'}" - - input: - tuple val(meta), path(gffs, stageAs: "?.gff"), path(tsvs, stageAs: "?.tsv") - - output: - tuple val(meta), path("${meta.id}.tsv"), emit: tsv - tuple val(meta), path("${meta.id}.gff"), emit: gff - path "versions.yml", emit: versions - - script: - template("combine_results.py") - - stub: - """ - touch ${meta.id}.tsv - touch ${meta.id}.gff - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python3 --version | cut -f 2 -d " ") - pandas: \$(python3 -c "import pandas; print(pandas.__version__)") - END_VERSIONS - """ -} diff --git a/modules/local/fimo/combine_results/templates/combine_results.py b/modules/local/fimo/combine_results/templates/combine_results.py deleted file mode 100644 index fcb3863..0000000 --- a/modules/local/fimo/combine_results/templates/combine_results.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python3 - -import platform -import pandas as pd -import yaml -import os - -output_tsv = "${meta.id}.tsv" -output_gff = "${meta.id}.gff" - -gff_dfs = [] -for gff_path in "${gffs}".split(): - try: - df_gff = pd.read_csv(gff_path, sep='\\t', comment='#', header=None, dtype=str) - except pd.errors.EmptyDataError: - print(f"Warning: {gff_path} is empty") - continue - gff_dfs.append(df_gff) - -if not gff_dfs: - # Touch empty file - open(output_gff, 'w').close() -else: - df_gff = pd.concat(gff_dfs, ignore_index=True) - df_gff = df_gff.sort_values(by=[1, 4, 5]) - df_gff.to_csv(output_gff, sep='\\t', index=False, header=False) - -tsv_dfs = [] -for tsv_path in "${tsvs}".split(): - try: - df_tsv = pd.read_csv(tsv_path, sep='\\t', comment='#', dtype=str) - except pd.errors.EmptyDataError: - print(f"Warning: {tsv_path} is empty") - continue - tsv_dfs.append(df_tsv) - -if not tsv_dfs: - with open(output_tsv, 'w') as f: - f.write('motif_id\\tmotif_alt_id\\tsequence_name\\tstart\\tstop\\tstrand\\tscore\\tp-value\\tq-value\\tmatched_sequence\\n') -else: - df_tsv = pd.concat(tsv_dfs, ignore_index=True) - df_tsv = df_tsv.sort_values(by=["motif_id", "sequence_name", "start", "stop"]) - df_tsv.to_csv(output_tsv, sep='\\t', index=False, header=True) - -# Create version file -versions = { - "${task.process}" : { - "python": platform.python_version(), - "pandas": pd.__version__ - } -} - -with open("versions.yml", "w") as f: - yaml.dump(versions, f) diff --git a/modules/local/fimo/combine_results/tests/main.nf.test b/modules/local/fimo/combine_results/tests/main.nf.test deleted file mode 100644 index 4ec8bc7..0000000 --- a/modules/local/fimo/combine_results/tests/main.nf.test +++ /dev/null @@ -1,63 +0,0 @@ -nextflow_process { - - name "Test Process COMBINE_RESULTS" - script "modules/local/fimo/combine_results/main.nf" - process "COMBINE_RESULTS" - - test("Should run without failures") { - - when { - process { - """ - input[0] = [ - [ id: 'test' ], - [ - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0145.2/fimo.gff', checkIfExists: true), - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0518.2/fimo.gff', checkIfExists: true) - ], - [ - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0145.2/fimo.tsv', checkIfExists: true), - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0518.2/fimo.tsv', checkIfExists: true) - ] - ] - """ - } - } - - then { - assert process.success - assert snapshot(process.out).match() - } - - } - - test("Should run without failures - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id: 'test' ], - [ - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0145.2/fimo.gff', checkIfExists: true), - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0518.2/fimo.gff', checkIfExists: true) - ], - [ - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0145.2/fimo.tsv', checkIfExists: true), - file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_enhancers_MA0518.2/fimo.tsv', checkIfExists: true) - ] - ] - """ - } - } - - then { - assert process.success - assert snapshot(process.out).match() - } - - } - -} diff --git a/modules/local/fimo/combine_results/tests/main.nf.test.snap b/modules/local/fimo/combine_results/tests/main.nf.test.snap deleted file mode 100644 index 145226b..0000000 --- a/modules/local/fimo/combine_results/tests/main.nf.test.snap +++ /dev/null @@ -1,100 +0,0 @@ -{ - "Should run without failures - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,0a799677517fb969ee52a69aee6b4a48" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "tsv": [ - [ - { - "id": "test" - }, - "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,0a799677517fb969ee52a69aee6b4a48" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-06-12T13:19:19.269179804" - }, - "Should run without failures": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.tsv:md5,ca643bbe9bdd5ca3359560013cc4b29c" - ] - ], - "1": [ - [ - { - "id": "test" - }, - "test.gff:md5,5905ef089f4a9121a8b82d2cdf7aa32b" - ] - ], - "2": [ - "versions.yml:md5,7a6b953a47c0f361e414cca9ea098957" - ], - "gff": [ - [ - { - "id": "test" - }, - "test.gff:md5,5905ef089f4a9121a8b82d2cdf7aa32b" - ] - ], - "tsv": [ - [ - { - "id": "test" - }, - "test.tsv:md5,ca643bbe9bdd5ca3359560013cc4b29c" - ] - ], - "versions": [ - "versions.yml:md5,7a6b953a47c0f361e414cca9ea098957" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-06-12T11:33:44.293989837" - } -} \ No newline at end of file diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index e647e05..4b5f649 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -1,7 +1,6 @@ include { FILTER_MOTIFS } from "../../../modules/local/fimo/filter_motifs" include { BEDTOOLS_GETFASTA as EXTRACT_SEQUENCE } from "../../../modules/nf-core/bedtools/getfasta" include { RUN_FIMO } from "../../../modules/local/fimo/run_fimo" -include { COMBINE_RESULTS } from "../../../modules/local/fimo/combine_results" include { GAWK as CONCAT_FILTER_GFF } from "../../../modules/nf-core/gawk" include { GNU_SORT as SORT_GFF } from "../../../modules/nf-core/gnu/sort" include { CSVTK_CONCAT as CONCAT_FILTER_TSV } from "../../../modules/nf-core/csvtk/concat" From b7b1c89cf9600e58e46446f06dd5662455e4ef95 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 13:53:05 +0200 Subject: [PATCH 06/24] remove local version of csvtk/sort --- modules/local/csvtk/sort/environment.yml | 7 --- modules/local/csvtk/sort/main.nf | 55 ---------------------- modules/local/csvtk/sort/meta.yml | 60 ------------------------ 3 files changed, 122 deletions(-) delete mode 100644 modules/local/csvtk/sort/environment.yml delete mode 100644 modules/local/csvtk/sort/main.nf delete mode 100644 modules/local/csvtk/sort/meta.yml diff --git a/modules/local/csvtk/sort/environment.yml b/modules/local/csvtk/sort/environment.yml deleted file mode 100644 index 52d488d..0000000 --- a/modules/local/csvtk/sort/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - bioconda - - conda-forge -dependencies: - - bioconda::csvtk=0.31.0 diff --git a/modules/local/csvtk/sort/main.nf b/modules/local/csvtk/sort/main.nf deleted file mode 100644 index 7c52bd8..0000000 --- a/modules/local/csvtk/sort/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -process CSVTK_SORT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/csvtk:0.31.0--h9ee0642_0' : - 'biocontainers/csvtk:0.31.0--h9ee0642_0' }" - - input: - tuple val(meta), path(csv, stageAs: 'input/*') - val in_format - val out_format - - output: - tuple val(meta), path("${prefix}.${out_extension}"), emit: sorted - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format) - def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) - out_extension = out_format == "tsv" ? 'tsv' : 'csv' - """ - csvtk \\ - sort \\ - $args \\ - --num-cpus $task.cpus \\ - --delimiter "${delimiter}" \\ - --out-delimiter "${out_delimiter}" \\ - --out-file ${prefix}.${out_extension} \\ - $csv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - out_extension = out_format == "tsv" ? 'tsv' : 'csv' - """ - touch ${prefix}.${out_extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) - END_VERSIONS - """ -} diff --git a/modules/local/csvtk/sort/meta.yml b/modules/local/csvtk/sort/meta.yml deleted file mode 100644 index 65bbf0a..0000000 --- a/modules/local/csvtk/sort/meta.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: csvtk_sort -description: Sort CSV (or TSV) tables -keywords: - - sort - - tsv - - csv -tools: - - csvtk: - description: A cross-platform, efficient, practical CSV/TSV toolkit - homepage: http://bioinf.shenwei.me/csvtk - documentation: http://bioinf.shenwei.me/csvtk - tool_dev_url: https://github.com/shenwei356/csvtk - licence: ["MIT"] - identifier: "" -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - csv: - type: file - description: CSV/TSV formatted file - pattern: "*.{csv,tsv}" - ontologies: - - edam: http://edamontology.org/format_3752 # CSV - - edam: http://edamontology.org/format_3475 # TSV - - in_format: - type: string - description: Input format (csv, tab, or a delimiting character) - pattern: "*" - - out_format: - type: string - description: Output format (csv, tab, or a delimiting character) - pattern: "*" -output: - sorted: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.${out_extension}: - type: file - description: Sorted CSV/TSV file - pattern: "*.{csv,tsv}" - ontologies: - - edam: http://edamontology.org/format_3752 # CSV - - edam: http://edamontology.org/format_3475 # TSV - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "version.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@LeonHafner" -maintainers: - - "@LeonHafner" From 1b9a1f4704cf0e24e72a66de37ab24b3287ad8d6 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 13:54:49 +0200 Subject: [PATCH 07/24] add nf-core module --- modules.json | 5 ++ modules/nf-core/csvtk/sort/environment.yml | 7 ++ modules/nf-core/csvtk/sort/main.nf | 55 +++++++++++++++ modules/nf-core/csvtk/sort/meta.yml | 60 ++++++++++++++++ modules/nf-core/csvtk/sort/tests/main.nf.test | 62 +++++++++++++++++ .../csvtk/sort/tests/main.nf.test.snap | 68 +++++++++++++++++++ 6 files changed, 257 insertions(+) create mode 100644 modules/nf-core/csvtk/sort/environment.yml create mode 100644 modules/nf-core/csvtk/sort/main.nf create mode 100644 modules/nf-core/csvtk/sort/meta.yml create mode 100644 modules/nf-core/csvtk/sort/tests/main.nf.test create mode 100644 modules/nf-core/csvtk/sort/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 2968b49..9cdcc48 100644 --- a/modules.json +++ b/modules.json @@ -51,6 +51,11 @@ "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, + "csvtk/sort": { + "branch": "master", + "git_sha": "d01263b60ce84d777f09819709e94dd17b11ce92", + "installed_by": ["modules"] + }, "deseq2/differential": { "branch": "master", "git_sha": "2e24bf8b6b045e1cf56a2907306b008113a686d0", diff --git a/modules/nf-core/csvtk/sort/environment.yml b/modules/nf-core/csvtk/sort/environment.yml new file mode 100644 index 0000000..52d488d --- /dev/null +++ b/modules/nf-core/csvtk/sort/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - bioconda + - conda-forge +dependencies: + - bioconda::csvtk=0.31.0 diff --git a/modules/nf-core/csvtk/sort/main.nf b/modules/nf-core/csvtk/sort/main.nf new file mode 100644 index 0000000..7c52bd8 --- /dev/null +++ b/modules/nf-core/csvtk/sort/main.nf @@ -0,0 +1,55 @@ +process CSVTK_SORT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/csvtk:0.31.0--h9ee0642_0' : + 'biocontainers/csvtk:0.31.0--h9ee0642_0' }" + + input: + tuple val(meta), path(csv, stageAs: 'input/*') + val in_format + val out_format + + output: + tuple val(meta), path("${prefix}.${out_extension}"), emit: sorted + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format) + def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + csvtk \\ + sort \\ + $args \\ + --num-cpus $task.cpus \\ + --delimiter "${delimiter}" \\ + --out-delimiter "${out_delimiter}" \\ + --out-file ${prefix}.${out_extension} \\ + $csv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + out_extension = out_format == "tsv" ? 'tsv' : 'csv' + """ + touch ${prefix}.${out_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) + END_VERSIONS + """ +} diff --git a/modules/nf-core/csvtk/sort/meta.yml b/modules/nf-core/csvtk/sort/meta.yml new file mode 100644 index 0000000..65bbf0a --- /dev/null +++ b/modules/nf-core/csvtk/sort/meta.yml @@ -0,0 +1,60 @@ +name: csvtk_sort +description: Sort CSV (or TSV) tables +keywords: + - sort + - tsv + - csv +tools: + - csvtk: + description: A cross-platform, efficient, practical CSV/TSV toolkit + homepage: http://bioinf.shenwei.me/csvtk + documentation: http://bioinf.shenwei.me/csvtk + tool_dev_url: https://github.com/shenwei356/csvtk + licence: ["MIT"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - csv: + type: file + description: CSV/TSV formatted file + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + - in_format: + type: string + description: Input format (csv, tab, or a delimiting character) + pattern: "*" + - out_format: + type: string + description: Output format (csv, tab, or a delimiting character) + pattern: "*" +output: + sorted: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - ${prefix}.${out_extension}: + type: file + description: Sorted CSV/TSV file + pattern: "*.{csv,tsv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV + - edam: http://edamontology.org/format_3475 # TSV + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "version.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@LeonHafner" +maintainers: + - "@LeonHafner" diff --git a/modules/nf-core/csvtk/sort/tests/main.nf.test b/modules/nf-core/csvtk/sort/tests/main.nf.test new file mode 100644 index 0000000..75a4ce2 --- /dev/null +++ b/modules/nf-core/csvtk/sort/tests/main.nf.test @@ -0,0 +1,62 @@ +nextflow_process { + + name "Test Process CSVTK_SORT" + script "../main.nf" + process "CSVTK_SORT" + + tag "modules" + tag "modules_nfcore" + tag "csvtk" + tag "csvtk/sort" + + test("tsv - sort - csv") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'generic/tsv/test.tsv', checkIfExists: true), + ] + input[1] = "tsv" + input[2] = "csv" + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("tsv - sort - csv - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'generic/tsv/test.tsv', checkIfExists: true), + ] + input[1] = "tsv" + input[2] = "csv" + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/csvtk/sort/tests/main.nf.test.snap b/modules/nf-core/csvtk/sort/tests/main.nf.test.snap new file mode 100644 index 0000000..200defb --- /dev/null +++ b/modules/nf-core/csvtk/sort/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "tsv - sort - csv": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv:md5,f6e28ae93ce8abc07651c3a229ed546c" + ] + ], + "1": [ + "versions.yml:md5,8b739597c2b7e535b06c9cdb955781cb" + ], + "sorted": [ + [ + { + "id": "test" + }, + "test.csv:md5,f6e28ae93ce8abc07651c3a229ed546c" + ] + ], + "versions": [ + "versions.yml:md5,8b739597c2b7e535b06c9cdb955781cb" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-09-26T12:47:28.248277889" + }, + "tsv - sort - csv - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,8b739597c2b7e535b06c9cdb955781cb" + ], + "sorted": [ + [ + { + "id": "test" + }, + "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,8b739597c2b7e535b06c9cdb955781cb" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-09-26T12:47:33.814156949" + } +} \ No newline at end of file From a7a78de1f5a8b1141cd0b4ab02a9c3319de837ac Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 13:55:04 +0200 Subject: [PATCH 08/24] use nf-core module in fimo --- subworkflows/local/fimo/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index 4b5f649..8c0f4ea 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -4,7 +4,7 @@ include { RUN_FIMO } from "../../../modules/local/f include { GAWK as CONCAT_FILTER_GFF } from "../../../modules/nf-core/gawk" include { GNU_SORT as SORT_GFF } from "../../../modules/nf-core/gnu/sort" include { CSVTK_CONCAT as CONCAT_FILTER_TSV } from "../../../modules/nf-core/csvtk/concat" -include { CSVTK_SORT as SORT_TSV } from "../../../modules/local/csvtk/sort" +include { CSVTK_SORT as SORT_TSV } from '../../../modules/nf-core/csvtk/sort' workflow FIMO { take: From 249f7b9fe1b7c5a4affc3513e6063c7915c3299a Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:54:59 +0200 Subject: [PATCH 09/24] fix output path --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index fbd0fac..3cfe0a2 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -597,7 +597,7 @@ process { ext.args = "-t \$'\\t' -k1,1V -k4,4n -k5,5n" ext.prefix = {"${meta.id}_sorted"} publishDir = [ - path: { "${params.outdir}/06_fimo_04_combined_results/gff" }, + path: { "${params.outdir}/06_fimo/04_combined_results/gff" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] From cdb4d0aa1788f99cd59a6db6582fb591bcd5660f Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:23:33 +0200 Subject: [PATCH 10/24] update pipeline level test snapshot --- tests/default.nf.test.snap | 248 +++++++++++++++++++++++++++---------- 1 file changed, 184 insertions(+), 64 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 2d68f57..7ca2da5 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,7 +1,7 @@ { "Should run with bed only": { "content": [ - 159, + 174, { "AFFINITY_MEAN": { "numpy": "2.2.6", @@ -36,10 +36,6 @@ "pandas": "2.3.0", "python": "3.13.3" }, - "COMBINE_RESULTS": { - "pandas": "2.3.0", - "python": "3.13.3" - }, "COMBINE_TFS_ACROSS_ASSAYS": { "numpy": "2.2.6", "pandas": "2.3.0", @@ -60,6 +56,12 @@ "pandas": "2.3.0", "python": "3.13.3" }, + "CONCAT_FILTER_GFF": { + "gawk": "5.3.0" + }, + "CONCAT_FILTER_TSV": { + "csvtk": "0.31.0" + }, "CONSTRUCT_TSS": { "bedtools": "2.31.1" }, @@ -147,9 +149,15 @@ "SORT_CHROM_SIZES": { "coreutils": 9.3 }, + "SORT_GFF": { + "coreutils": 9.3 + }, "SORT_PEAKS": { "bedtools": "2.31.1" }, + "SORT_TSV": { + "csvtk": "0.31.0" + }, "STARE": { "stare": "1.0.5" }, @@ -579,16 +587,18 @@ "06_fimo/03_fimo/p6_H3K4me3_R1_MA1988.2/p6_H3K4me3_R1_MA1988.2_best_site.narrowPeak", "06_fimo/03_fimo/p6_H3K4me3_R1_MA1988.2/p6_H3K4me3_R1_MA1988.2_cisml.xml", "06_fimo/04_combined_results", - "06_fimo/04_combined_results/L10_H3K27ac.gff", - "06_fimo/04_combined_results/L10_H3K27ac.tsv", - "06_fimo/04_combined_results/L1_H3K27ac.gff", - "06_fimo/04_combined_results/L1_H3K27ac.tsv", - "06_fimo/04_combined_results/L1_H3K4me3.gff", - "06_fimo/04_combined_results/L1_H3K4me3.tsv", - "06_fimo/04_combined_results/p6_H3K27ac.gff", - "06_fimo/04_combined_results/p6_H3K27ac.tsv", - "06_fimo/04_combined_results/p6_H3K4me3.gff", - "06_fimo/04_combined_results/p6_H3K4me3.tsv", + "06_fimo/04_combined_results/gff", + "06_fimo/04_combined_results/gff/L10_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/L1_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/L1_H3K4me3_sorted.gff", + "06_fimo/04_combined_results/gff/p6_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/p6_H3K4me3_sorted.gff", + "06_fimo/04_combined_results/tsv", + "06_fimo/04_combined_results/tsv/L10_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/L1_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/L1_H3K4me3.tsv", + "06_fimo/04_combined_results/tsv/p6_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/p6_H3K4me3.tsv", "07_sneep", "07_sneep/01_filtered_scales_motifs", "07_sneep/01_filtered_scales_motifs/filtered_sneep_scale_mouse_218.txt", @@ -3617,6 +3627,18 @@ "08_report/report/tf/twist2(ma0633.3)/zbtb18/index.html", "08_report/report/tf/twist2(ma0633.3)/zbtb37", "08_report/report/tf/twist2(ma0633.3)/zbtb37/index.html", + "all", + "all/concat", + "all/concat/L10_H3K27ac.gff", + "all/concat/L10_H3K27ac.tsv", + "all/concat/L1_H3K27ac.gff", + "all/concat/L1_H3K27ac.tsv", + "all/concat/L1_H3K4me3.gff", + "all/concat/L1_H3K4me3.tsv", + "all/concat/p6_H3K27ac.gff", + "all/concat/p6_H3K27ac.tsv", + "all/concat/p6_H3K4me3.gff", + "all/concat/p6_H3K4me3.tsv", "pipeline_info", "pipeline_info/nf_core_tfactivity_software_versions.yml" ], @@ -3929,13 +3951,23 @@ "p6_H3K4me3_R1_MA1988.2.xml:md5,1529c4d0e58a5160aa1697e11bf2d693", "p6_H3K4me3_R1_MA1988.2_best_site.narrowPeak:md5,5ea161742b28e693b9fa24019e42456f", "p6_H3K4me3_R1_MA1988.2_cisml.xml:md5,2d8bac35c0788120722a7c0944c932d3", + "L10_H3K27ac_sorted.gff:md5,c8c0bc47bc2ec152b236a1b0a635903c", + "L1_H3K27ac_sorted.gff:md5,d25c5f74a6a0fbac8bdd281e4f64ba5d", + "L1_H3K4me3_sorted.gff:md5,a1c89f1e04912c6fba7f299bd8da8e66", + "p6_H3K27ac_sorted.gff:md5,64faf57c18abd66238cd996b9374733d", + "p6_H3K4me3_sorted.gff:md5,bac538bb36426400a780c130d0416b34", + "L10_H3K27ac.tsv:md5,721f8409b751ac0574c7e34f0d4fe0f4", + "L1_H3K27ac.tsv:md5,05b59e7abfa050784809de5cad3fc5b6", + "L1_H3K4me3.tsv:md5,f68c0dcd35b81a781f4b1d6bd78e24ad", + "p6_H3K27ac.tsv:md5,7ece43bd163f636846a866a2d4d35c6f", + "p6_H3K4me3.tsv:md5,e14062730aca7ff456805045440e7690", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "L10_H3K27ac.bed:md5,90803f84c9a8f0d9a71358ab4ee837ab", - "L1_H3K27ac.bed:md5,085d04b69d7901d6654f9fd55624a64c", - "L1_H3K4me3.bed:md5,e7ad7fac4dde8e85f8a0bea89f026b59", - "p6_H3K27ac.bed:md5,d037c0747dcf5cb0bf8dd7895e18247c", - "p6_H3K4me3.bed:md5,e2317934928c0dd970ce33348c4fd949", + "L10_H3K27ac.bed:md5,4e48a06e991fdd12712c25823eebc5be", + "L1_H3K27ac.bed:md5,50e217da5309f9ce6077eca37e3fe719", + "L1_H3K4me3.bed:md5,7130db5773aee77f7e731e4bdd6684d5", + "p6_H3K27ac.bed:md5,945f29a18cdb6d623fba2cd4ab434fd0", + "p6_H3K4me3.bed:md5,fe6ec84a126fc396c334b3805130e9d5", "L10_H3K27ac_sorted.bed:md5,4e48a06e991fdd12712c25823eebc5be", "L1_H3K27ac_sorted.bed:md5,50e217da5309f9ce6077eca37e3fe719", "L1_H3K4me3_sorted.bed:md5,7130db5773aee77f7e731e4bdd6684d5", @@ -3950,18 +3982,28 @@ "filtered_L1_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_L1_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", + "L10_H3K27ac.gff:md5,a1e9e0097b6eeed5b5141319c7ab8d8a", + "L10_H3K27ac.tsv:md5,dc3767a9339462f1118c9b0d7badb65f", + "L1_H3K27ac.gff:md5,fe75789a4120bceb963c11704c3bbef3", + "L1_H3K27ac.tsv:md5,1373618bf5febbcf5e613bfdd29b6f5d", + "L1_H3K4me3.gff:md5,01974778fc16870f2293a84f371b44a4", + "L1_H3K4me3.tsv:md5,4181d7fd460e29167098f8ca9eaf7283", + "p6_H3K27ac.gff:md5,4235c6a7cedb244cefdaac876314501b", + "p6_H3K27ac.tsv:md5,dcd259c4fae3a5b2eb209800ab6b836f", + "p6_H3K4me3.gff:md5,c70f1857bfad562347a0cb01cb702713", + "p6_H3K4me3.tsv:md5,827b15cb6da6746c77912d4d9e52974a" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nextflow": "25.04.2" }, - "timestamp": "2025-09-24T20:00:51.401101759" + "timestamp": "2025-09-26T15:22:33.841008234" }, "Should run with both bed and bam input": { "content": [ - 363, + 396, { "AFFINITY_MEAN": { "numpy": "2.2.6", @@ -3999,10 +4041,6 @@ "pandas": "2.3.0", "python": "3.13.3" }, - "COMBINE_RESULTS": { - "pandas": "2.3.0", - "python": "3.13.3" - }, "COMBINE_TFS_ACROSS_ASSAYS": { "numpy": "2.2.6", "pandas": "2.3.0", @@ -4026,6 +4064,12 @@ "CONCAT_AND_SORT": { "coreutils": 9.3 }, + "CONCAT_FILTER_GFF": { + "gawk": "5.3.0" + }, + "CONCAT_FILTER_TSV": { + "csvtk": "0.31.0" + }, "CONSTRUCT_TSS": { "bedtools": "2.31.1" }, @@ -4132,9 +4176,15 @@ "SORT_CHROM_SIZES": { "coreutils": 9.3 }, + "SORT_GFF": { + "coreutils": 9.3 + }, "SORT_PEAKS": { "bedtools": "2.31.1" }, + "SORT_TSV": { + "csvtk": "0.31.0" + }, "STARE": { "stare": "1.0.5" }, @@ -5111,28 +5161,30 @@ "06_fimo/03_fimo/p6_chromHMM_promoters_MA1988.2/p6_chromHMM_promoters_MA1988.2_best_site.narrowPeak", "06_fimo/03_fimo/p6_chromHMM_promoters_MA1988.2/p6_chromHMM_promoters_MA1988.2_cisml.xml", "06_fimo/04_combined_results", - "06_fimo/04_combined_results/L10_H3K27ac.gff", - "06_fimo/04_combined_results/L10_H3K27ac.tsv", - "06_fimo/04_combined_results/L10_chromHMM_enhancers.gff", - "06_fimo/04_combined_results/L10_chromHMM_enhancers.tsv", - "06_fimo/04_combined_results/L10_chromHMM_promoters.gff", - "06_fimo/04_combined_results/L10_chromHMM_promoters.tsv", - "06_fimo/04_combined_results/L1_H3K27ac.gff", - "06_fimo/04_combined_results/L1_H3K27ac.tsv", - "06_fimo/04_combined_results/L1_H3K4me3.gff", - "06_fimo/04_combined_results/L1_H3K4me3.tsv", - "06_fimo/04_combined_results/L1_chromHMM_enhancers.gff", - "06_fimo/04_combined_results/L1_chromHMM_enhancers.tsv", - "06_fimo/04_combined_results/L1_chromHMM_promoters.gff", - "06_fimo/04_combined_results/L1_chromHMM_promoters.tsv", - "06_fimo/04_combined_results/p6_H3K27ac.gff", - "06_fimo/04_combined_results/p6_H3K27ac.tsv", - "06_fimo/04_combined_results/p6_H3K4me3.gff", - "06_fimo/04_combined_results/p6_H3K4me3.tsv", - "06_fimo/04_combined_results/p6_chromHMM_enhancers.gff", - "06_fimo/04_combined_results/p6_chromHMM_enhancers.tsv", - "06_fimo/04_combined_results/p6_chromHMM_promoters.gff", - "06_fimo/04_combined_results/p6_chromHMM_promoters.tsv", + "06_fimo/04_combined_results/gff", + "06_fimo/04_combined_results/gff/L10_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/L10_chromHMM_enhancers_sorted.gff", + "06_fimo/04_combined_results/gff/L10_chromHMM_promoters_sorted.gff", + "06_fimo/04_combined_results/gff/L1_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/L1_H3K4me3_sorted.gff", + "06_fimo/04_combined_results/gff/L1_chromHMM_enhancers_sorted.gff", + "06_fimo/04_combined_results/gff/L1_chromHMM_promoters_sorted.gff", + "06_fimo/04_combined_results/gff/p6_H3K27ac_sorted.gff", + "06_fimo/04_combined_results/gff/p6_H3K4me3_sorted.gff", + "06_fimo/04_combined_results/gff/p6_chromHMM_enhancers_sorted.gff", + "06_fimo/04_combined_results/gff/p6_chromHMM_promoters_sorted.gff", + "06_fimo/04_combined_results/tsv", + "06_fimo/04_combined_results/tsv/L10_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/L10_chromHMM_enhancers.tsv", + "06_fimo/04_combined_results/tsv/L10_chromHMM_promoters.tsv", + "06_fimo/04_combined_results/tsv/L1_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/L1_H3K4me3.tsv", + "06_fimo/04_combined_results/tsv/L1_chromHMM_enhancers.tsv", + "06_fimo/04_combined_results/tsv/L1_chromHMM_promoters.tsv", + "06_fimo/04_combined_results/tsv/p6_H3K27ac.tsv", + "06_fimo/04_combined_results/tsv/p6_H3K4me3.tsv", + "06_fimo/04_combined_results/tsv/p6_chromHMM_enhancers.tsv", + "06_fimo/04_combined_results/tsv/p6_chromHMM_promoters.tsv", "07_sneep", "07_sneep/01_filtered_scales_motifs", "07_sneep/01_filtered_scales_motifs/filtered_sneep_scale_mouse_218.txt", @@ -9239,6 +9291,30 @@ "08_report/report/tf/twist2(ma0633.3)/zfp451/index.html", "08_report/report/tf/twist2(ma0633.3)/zranb3", "08_report/report/tf/twist2(ma0633.3)/zranb3/index.html", + "all", + "all/concat", + "all/concat/L10_H3K27ac.gff", + "all/concat/L10_H3K27ac.tsv", + "all/concat/L10_chromHMM_enhancers.gff", + "all/concat/L10_chromHMM_enhancers.tsv", + "all/concat/L10_chromHMM_promoters.gff", + "all/concat/L10_chromHMM_promoters.tsv", + "all/concat/L1_H3K27ac.gff", + "all/concat/L1_H3K27ac.tsv", + "all/concat/L1_H3K4me3.gff", + "all/concat/L1_H3K4me3.tsv", + "all/concat/L1_chromHMM_enhancers.gff", + "all/concat/L1_chromHMM_enhancers.tsv", + "all/concat/L1_chromHMM_promoters.gff", + "all/concat/L1_chromHMM_promoters.tsv", + "all/concat/p6_H3K27ac.gff", + "all/concat/p6_H3K27ac.tsv", + "all/concat/p6_H3K4me3.gff", + "all/concat/p6_H3K4me3.tsv", + "all/concat/p6_chromHMM_enhancers.gff", + "all/concat/p6_chromHMM_enhancers.tsv", + "all/concat/p6_chromHMM_promoters.gff", + "all/concat/p6_chromHMM_promoters.tsv", "pipeline_info", "pipeline_info/nf_core_tfactivity_software_versions.yml" ], @@ -10002,19 +10078,41 @@ "p6_chromHMM_promoters_MA1988.2.xml:md5,4315461c1c9ee2c58e1f8f38aaf05d45", "p6_chromHMM_promoters_MA1988.2_best_site.narrowPeak:md5,564e4c493a12d3ad66e15371fdc33a3f", "p6_chromHMM_promoters_MA1988.2_cisml.xml:md5,2ed0bb79340763d6f5ce80eda16e0911", + "L10_H3K27ac_sorted.gff:md5,2ed2f4a21f118db68ac665d1eba872e8", + "L10_chromHMM_enhancers_sorted.gff:md5,647e9c9fe0151160a9ee394d9d219d6f", + "L10_chromHMM_promoters_sorted.gff:md5,633c7db4f13b7e1d1d841a6bab1ca0de", + "L1_H3K27ac_sorted.gff:md5,c5c8a1042686e8245560e512d95ca01f", + "L1_H3K4me3_sorted.gff:md5,05258d1704d0947047f4bf6588f1a3c8", + "L1_chromHMM_enhancers_sorted.gff:md5,a4a713a7841fde5a75da35807db11041", + "L1_chromHMM_promoters_sorted.gff:md5,e521c30fedcf1b5e7b826d0280215f89", + "p6_H3K27ac_sorted.gff:md5,6e622c02c8a87621b75c0c1d649fa92b", + "p6_H3K4me3_sorted.gff:md5,908e9f5ff80b4dc44f45c0878779fdcc", + "p6_chromHMM_enhancers_sorted.gff:md5,ad9b13a4e1d1aa21dc4fd0c0ab0dd112", + "p6_chromHMM_promoters_sorted.gff:md5,bbfca43809136df8fa5d1d35509198ac", + "L10_H3K27ac.tsv:md5,c9166abca06f55466721ec6e623a87b1", + "L10_chromHMM_enhancers.tsv:md5,e3a55d32fb600bc676f5b19d71cf90f5", + "L10_chromHMM_promoters.tsv:md5,844c8c817aaea45ea6c27853a3750183", + "L1_H3K27ac.tsv:md5,e08b17cf1cf3950963a9863a10a60dfc", + "L1_H3K4me3.tsv:md5,de2455ddd42bbf5e51a1f5c128e7b59a", + "L1_chromHMM_enhancers.tsv:md5,777fe2cd7e5ea2c5c9c6f3119fa1f58c", + "L1_chromHMM_promoters.tsv:md5,e7e38d2c67c743694a19962b32f48a07", + "p6_H3K27ac.tsv:md5,af3627f6f1881dc069b7b1f6e90bd658", + "p6_H3K4me3.tsv:md5,b333aba81551ef828a808284f0085c67", + "p6_chromHMM_enhancers.tsv:md5,64f8ca7065f2495ee89e429bcef57a58", + "p6_chromHMM_promoters.tsv:md5,9bb0e7ef65678aa9a3f6b29f1a81c81a", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "L10_H3K27ac.bed:md5,5fead49857235290629dcfab266cd2ec", - "L10_chromHMM_enhancers.bed:md5,a0c9c2e7870ef43eba19c71c6081197b", - "L10_chromHMM_promoters.bed:md5,f30b4958c32c83366bdee011f1c4e5d0", - "L1_H3K27ac.bed:md5,4c1fb98d7e3760d738fb993006ec4f53", - "L1_H3K4me3.bed:md5,69554cc579fbd03815bed5bce6bbb71a", - "L1_chromHMM_enhancers.bed:md5,c295ecf045028da026583d91b1385972", - "L1_chromHMM_promoters.bed:md5,5211d15f728dabaa21191b144e0c68d4", - "p6_H3K27ac.bed:md5,60841180cde22918e8aa0f74139cc886", - "p6_H3K4me3.bed:md5,934fd2b020187c07c01009d11975914d", - "p6_chromHMM_enhancers.bed:md5,0f083c9fb262495d8eb897560268e94a", - "p6_chromHMM_promoters.bed:md5,1ef7da002c3df13cb00241d787f66014", + "L10_H3K27ac.bed:md5,59f68dd95564876b3fe43e9af1195bfa", + "L10_chromHMM_enhancers.bed:md5,67117840a589811ee4d2c3c1e3f1f3dc", + "L10_chromHMM_promoters.bed:md5,9a6f196230638208efbe1b6e44ee878c", + "L1_H3K27ac.bed:md5,4410dca268ad4a46e692c7a08ff99272", + "L1_H3K4me3.bed:md5,77e128df3e063557e57af543e755d92b", + "L1_chromHMM_enhancers.bed:md5,87b2074de0cc86239bb67c8ae83c1f6a", + "L1_chromHMM_promoters.bed:md5,5844d379f9ccbdb5c0fc7c5275eb4801", + "p6_H3K27ac.bed:md5,c03e85775f667d42bc928eb8f1106d77", + "p6_H3K4me3.bed:md5,1d90f0ea49a21f93e760b4c71cf916b3", + "p6_chromHMM_enhancers.bed:md5,00949fadf97f644cb012a7a1dbc6da52", + "p6_chromHMM_promoters.bed:md5,c375e4dab2c4a7d65e8a759af378ea53", "L10_H3K27ac_sorted.bed:md5,59f68dd95564876b3fe43e9af1195bfa", "L10_chromHMM_enhancers_sorted.bed:md5,67117840a589811ee4d2c3c1e3f1f3dc", "L10_chromHMM_promoters_sorted.bed:md5,9a6f196230638208efbe1b6e44ee878c", @@ -10047,13 +10145,35 @@ "filtered_p6_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_chromHMM_enhancers.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "filtered_p6_chromHMM_promoters.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + "filtered_p6_chromHMM_promoters.bed:md5,d41d8cd98f00b204e9800998ecf8427e", + "L10_H3K27ac.gff:md5,cb7f3bb9655b07b969bc206c992a99a3", + "L10_H3K27ac.tsv:md5,c15b489f4427175083ca89ec671b5508", + "L10_chromHMM_enhancers.gff:md5,59af62a58a2cf7219d0aecd3e634f2a5", + "L10_chromHMM_enhancers.tsv:md5,3fcae84eda1bc3bf0ef91500139b53ca", + "L10_chromHMM_promoters.gff:md5,4051c9121f854ebdfc3f2c6751531cf1", + "L10_chromHMM_promoters.tsv:md5,57cefb729d40ccddd550ec38fa306ef5", + "L1_H3K27ac.gff:md5,bfa72d26c51571fd555382f5a46cffb1", + "L1_H3K27ac.tsv:md5,b154b0590611d3497114dbcbe6649bbb", + "L1_H3K4me3.gff:md5,1c01f6b3bbb66b428e5dceb35156c803", + "L1_H3K4me3.tsv:md5,1d82091f9cc5f41ad00197efbdef16ca", + "L1_chromHMM_enhancers.gff:md5,f86332b7a254a843707f65bffa6f1458", + "L1_chromHMM_enhancers.tsv:md5,270cbe43da29e2c827fdc51c242b4cd0", + "L1_chromHMM_promoters.gff:md5,899425031d0ca5cf710b40f941d923b7", + "L1_chromHMM_promoters.tsv:md5,9aca1a8dcdd5e4ca05aa04b93e6d5c2d", + "p6_H3K27ac.gff:md5,a7a9b6907c27e9a263e6b9a7c0c0c3ad", + "p6_H3K27ac.tsv:md5,7f753c6ac4fd16d3e4d280a2de3da3ae", + "p6_H3K4me3.gff:md5,c5e13df409046198bf707c081f3f94e7", + "p6_H3K4me3.tsv:md5,bdfd4b94b0b999b5cf265431db99fbb3", + "p6_chromHMM_enhancers.gff:md5,6b394667bfb0195c7cbb0ef89c48dbfd", + "p6_chromHMM_enhancers.tsv:md5,601a23439fbcfda6c54c44bea7adf3df", + "p6_chromHMM_promoters.gff:md5,3c891e4bf0d8f3c3f03b6b1026f3a141", + "p6_chromHMM_promoters.tsv:md5,29427025004f80b0a39fbd14927fe3ea" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nextflow": "25.04.2" }, - "timestamp": "2025-09-24T19:57:42.531689238" + "timestamp": "2025-09-26T15:16:21.988642039" } } \ No newline at end of file From 273af47f929c9b6718da2e050868055723a86dcb Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:39:29 +0200 Subject: [PATCH 11/24] add config for fimo subworkflow test --- subworkflows/local/fimo/tests/main.nf.test | 2 ++ subworkflows/local/fimo/tests/nextflow.config | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 subworkflows/local/fimo/tests/nextflow.config diff --git a/subworkflows/local/fimo/tests/main.nf.test b/subworkflows/local/fimo/tests/main.nf.test index fff573e..8376276 100644 --- a/subworkflows/local/fimo/tests/main.nf.test +++ b/subworkflows/local/fimo/tests/main.nf.test @@ -4,6 +4,8 @@ nextflow_workflow { script "subworkflows/local/fimo/main.nf" workflow "FIMO" + config "./nextflow.config" + setup { run("PREPARE_GENOME") { script "../../prepare_genome" diff --git a/subworkflows/local/fimo/tests/nextflow.config b/subworkflows/local/fimo/tests/nextflow.config new file mode 100644 index 0000000..69ae24d --- /dev/null +++ b/subworkflows/local/fimo/tests/nextflow.config @@ -0,0 +1,14 @@ +process { + withName: "FIMO:CONCAT_FILTER_GFF" { + ext.args = "'/^#/ { next } NF==0 { next } { print }'" + } + + withName: "FIMO:SORT_GFF" { + ext.args = "-t \$'\\t' -k1,1V -k4,4n -k5,5n" + ext.prefix = {"${meta.id}_sorted"} + } + + withName: ".*:FIMO:SORT_TSV" { + ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n" + } +} From 10eeacfad5370716723655f07fb076b91b967393 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:39:44 +0200 Subject: [PATCH 12/24] update fimo subworkflow snapshot --- .../local/fimo/tests/main.nf.test.snap | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/subworkflows/local/fimo/tests/main.nf.test.snap b/subworkflows/local/fimo/tests/main.nf.test.snap index 3be2951..8894930 100644 --- a/subworkflows/local/fimo/tests/main.nf.test.snap +++ b/subworkflows/local/fimo/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + "L10_chromHMM_promoters_sorted.gff:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -15,15 +15,18 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + "L10_chromHMM_promoters.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", - "versions.yml:md5,5b81fc931a8500fc7fc061c7cbb25e84", + "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", + "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", + "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ], "gff": [ @@ -31,7 +34,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.gff:md5,d41d8cd98f00b204e9800998ecf8427e" + "L10_chromHMM_promoters_sorted.gff:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "tsv": [ @@ -44,19 +47,22 @@ ], "versions": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", - "versions.yml:md5,5b81fc931a8500fc7fc061c7cbb25e84", + "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", + "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", + "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.04.2" }, - "timestamp": "2025-06-12T18:37:24.829422999" + "timestamp": "2025-09-26T15:38:02.58513746" }, "Should run without failures": { "content": [ @@ -66,7 +72,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,913c2ad510aed1b4eea4359a70897c1b" + "L10_chromHMM_promoters_sorted.gff:md5,c5ae260e0c4a3fb9fea09a7d00d309e7" ] ], "1": [ @@ -74,14 +80,17 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.gff:md5,d5f393cd4ca9896e6769ccd07d4614cb" + "L10_chromHMM_promoters.tsv:md5,dfefbe77e1740ccf9b834c187ae6aa4a" ] ], "2": [ - "versions.yml:md5,09d77bfd555f06cde2a5fd8ebd3b9e6d", + "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", + "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", + "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ], "gff": [ @@ -89,7 +98,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.gff:md5,d5f393cd4ca9896e6769ccd07d4614cb" + "L10_chromHMM_promoters_sorted.gff:md5,c5ae260e0c4a3fb9fea09a7d00d309e7" ] ], "tsv": [ @@ -97,14 +106,17 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,913c2ad510aed1b4eea4359a70897c1b" + "L10_chromHMM_promoters.tsv:md5,dfefbe77e1740ccf9b834c187ae6aa4a" ] ], "versions": [ - "versions.yml:md5,09d77bfd555f06cde2a5fd8ebd3b9e6d", + "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", + "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", + "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ] } @@ -113,6 +125,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-06-12T11:34:12.42059913" + "timestamp": "2025-09-26T15:37:38.256297036" } } \ No newline at end of file From 79c8fdedaa1c6d6bfbc641de1706a6fe867e064a Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:55:56 +0200 Subject: [PATCH 13/24] try CI fix --- subworkflows/local/fimo/tests/main.nf.test.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/local/fimo/tests/main.nf.test.snap b/subworkflows/local/fimo/tests/main.nf.test.snap index 8894930..0e4416e 100644 --- a/subworkflows/local/fimo/tests/main.nf.test.snap +++ b/subworkflows/local/fimo/tests/main.nf.test.snap @@ -80,7 +80,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,dfefbe77e1740ccf9b834c187ae6aa4a" + "L10_chromHMM_promoters.tsv:md5,b9dccc98df70fa127fed3ec9f5d2b0cd" ] ], "2": [ @@ -106,7 +106,7 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,dfefbe77e1740ccf9b834c187ae6aa4a" + "L10_chromHMM_promoters.tsv:md5,b9dccc98df70fa127fed3ec9f5d2b0cd" ] ], "versions": [ @@ -125,6 +125,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T15:37:38.256297036" + "timestamp": "2025-09-26T15:48:39.202453559" } } \ No newline at end of file From 656fd73e8382d5617f31758c85cde420d776827a Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:41:52 +0200 Subject: [PATCH 14/24] remove unnecessary output config --- conf/modules.config | 6 ------ 1 file changed, 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 3cfe0a2..62fe213 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -12,12 +12,6 @@ process { - publishDir = [ - path: { "${params.outdir}/all/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - /* PREPARE_GENOME */ From 839340330df828a4842520e36088e5b752c037cc Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:42:12 +0200 Subject: [PATCH 15/24] remove comments --- subworkflows/local/fimo/main.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index 8c0f4ea..b7e3fc1 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -56,9 +56,6 @@ workflow FIMO { SORT_GFF(CONCAT_FILTER_GFF.out.output) ch_versions = ch_versions.mix(SORT_GFF.out.versions) - // AWK mit RUN_FIMO.out.tsv -> CONCAT_FILTER_TSV (entferne comments und empty lines, aber behalte header 1x) - // Sort TSV basierend auf 1, 3, 4, 5 mit csvtk - // Concat per condition_assay and remove comments and empty lines CONCAT_FILTER_TSV( RUN_FIMO.out.tsv.map { meta, tsv -> [[id: meta.condition + '_' + meta.assay], tsv] }.groupTuple(), From 19276739e5603d3a2943c00b2cb9ca3e06bbc6e6 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:43:41 +0200 Subject: [PATCH 16/24] edit nftignore --- tests/.nftignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/.nftignore b/tests/.nftignore index bab46c6..c5686ff 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -1,7 +1,5 @@ .DS_Store pipeline_info/*.{html,json,txt,yml} -06_fimo/04_combined_results/*.tsv -06_fimo/04_combined_results/*.gff 03_peaks/07_affinity_mean/*.tsv 08_report/report.zip 08_report/report/** From 6218b8b340192a04841a66aa62c90c736aae245f Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:43:54 +0200 Subject: [PATCH 17/24] update snapshot --- tests/default.nf.test.snap | 106 +++++++------------------------------ 1 file changed, 19 insertions(+), 87 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 7ca2da5..e20923b 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -3627,18 +3627,6 @@ "08_report/report/tf/twist2(ma0633.3)/zbtb18/index.html", "08_report/report/tf/twist2(ma0633.3)/zbtb37", "08_report/report/tf/twist2(ma0633.3)/zbtb37/index.html", - "all", - "all/concat", - "all/concat/L10_H3K27ac.gff", - "all/concat/L10_H3K27ac.tsv", - "all/concat/L1_H3K27ac.gff", - "all/concat/L1_H3K27ac.tsv", - "all/concat/L1_H3K4me3.gff", - "all/concat/L1_H3K4me3.tsv", - "all/concat/p6_H3K27ac.gff", - "all/concat/p6_H3K27ac.tsv", - "all/concat/p6_H3K4me3.gff", - "all/concat/p6_H3K4me3.tsv", "pipeline_info", "pipeline_info/nf_core_tfactivity_software_versions.yml" ], @@ -3956,11 +3944,11 @@ "L1_H3K4me3_sorted.gff:md5,a1c89f1e04912c6fba7f299bd8da8e66", "p6_H3K27ac_sorted.gff:md5,64faf57c18abd66238cd996b9374733d", "p6_H3K4me3_sorted.gff:md5,bac538bb36426400a780c130d0416b34", - "L10_H3K27ac.tsv:md5,721f8409b751ac0574c7e34f0d4fe0f4", - "L1_H3K27ac.tsv:md5,05b59e7abfa050784809de5cad3fc5b6", - "L1_H3K4me3.tsv:md5,f68c0dcd35b81a781f4b1d6bd78e24ad", + "L10_H3K27ac.tsv:md5,ad14248b7befc9c6d5484987c5805127", + "L1_H3K27ac.tsv:md5,58de9061282dad957d0b6ef15ec3b230", + "L1_H3K4me3.tsv:md5,bd4e4a5dda2f0bcf95bdfb585b7c2753", "p6_H3K27ac.tsv:md5,7ece43bd163f636846a866a2d4d35c6f", - "p6_H3K4me3.tsv:md5,e14062730aca7ff456805045440e7690", + "p6_H3K4me3.tsv:md5,8770bd4eda9199af87683fbe8d59bb1e", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,4e48a06e991fdd12712c25823eebc5be", @@ -3982,24 +3970,14 @@ "filtered_L1_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_L1_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "L10_H3K27ac.gff:md5,a1e9e0097b6eeed5b5141319c7ab8d8a", - "L10_H3K27ac.tsv:md5,dc3767a9339462f1118c9b0d7badb65f", - "L1_H3K27ac.gff:md5,fe75789a4120bceb963c11704c3bbef3", - "L1_H3K27ac.tsv:md5,1373618bf5febbcf5e613bfdd29b6f5d", - "L1_H3K4me3.gff:md5,01974778fc16870f2293a84f371b44a4", - "L1_H3K4me3.tsv:md5,4181d7fd460e29167098f8ca9eaf7283", - "p6_H3K27ac.gff:md5,4235c6a7cedb244cefdaac876314501b", - "p6_H3K27ac.tsv:md5,dcd259c4fae3a5b2eb209800ab6b836f", - "p6_H3K4me3.gff:md5,c70f1857bfad562347a0cb01cb702713", - "p6_H3K4me3.tsv:md5,827b15cb6da6746c77912d4d9e52974a" + "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T15:22:33.841008234" + "timestamp": "2025-09-26T17:39:14.297423333" }, "Should run with both bed and bam input": { "content": [ @@ -9291,30 +9269,6 @@ "08_report/report/tf/twist2(ma0633.3)/zfp451/index.html", "08_report/report/tf/twist2(ma0633.3)/zranb3", "08_report/report/tf/twist2(ma0633.3)/zranb3/index.html", - "all", - "all/concat", - "all/concat/L10_H3K27ac.gff", - "all/concat/L10_H3K27ac.tsv", - "all/concat/L10_chromHMM_enhancers.gff", - "all/concat/L10_chromHMM_enhancers.tsv", - "all/concat/L10_chromHMM_promoters.gff", - "all/concat/L10_chromHMM_promoters.tsv", - "all/concat/L1_H3K27ac.gff", - "all/concat/L1_H3K27ac.tsv", - "all/concat/L1_H3K4me3.gff", - "all/concat/L1_H3K4me3.tsv", - "all/concat/L1_chromHMM_enhancers.gff", - "all/concat/L1_chromHMM_enhancers.tsv", - "all/concat/L1_chromHMM_promoters.gff", - "all/concat/L1_chromHMM_promoters.tsv", - "all/concat/p6_H3K27ac.gff", - "all/concat/p6_H3K27ac.tsv", - "all/concat/p6_H3K4me3.gff", - "all/concat/p6_H3K4me3.tsv", - "all/concat/p6_chromHMM_enhancers.gff", - "all/concat/p6_chromHMM_enhancers.tsv", - "all/concat/p6_chromHMM_promoters.gff", - "all/concat/p6_chromHMM_promoters.tsv", "pipeline_info", "pipeline_info/nf_core_tfactivity_software_versions.yml" ], @@ -10089,17 +10043,17 @@ "p6_H3K4me3_sorted.gff:md5,908e9f5ff80b4dc44f45c0878779fdcc", "p6_chromHMM_enhancers_sorted.gff:md5,ad9b13a4e1d1aa21dc4fd0c0ab0dd112", "p6_chromHMM_promoters_sorted.gff:md5,bbfca43809136df8fa5d1d35509198ac", - "L10_H3K27ac.tsv:md5,c9166abca06f55466721ec6e623a87b1", - "L10_chromHMM_enhancers.tsv:md5,e3a55d32fb600bc676f5b19d71cf90f5", - "L10_chromHMM_promoters.tsv:md5,844c8c817aaea45ea6c27853a3750183", - "L1_H3K27ac.tsv:md5,e08b17cf1cf3950963a9863a10a60dfc", - "L1_H3K4me3.tsv:md5,de2455ddd42bbf5e51a1f5c128e7b59a", - "L1_chromHMM_enhancers.tsv:md5,777fe2cd7e5ea2c5c9c6f3119fa1f58c", - "L1_chromHMM_promoters.tsv:md5,e7e38d2c67c743694a19962b32f48a07", - "p6_H3K27ac.tsv:md5,af3627f6f1881dc069b7b1f6e90bd658", - "p6_H3K4me3.tsv:md5,b333aba81551ef828a808284f0085c67", - "p6_chromHMM_enhancers.tsv:md5,64f8ca7065f2495ee89e429bcef57a58", - "p6_chromHMM_promoters.tsv:md5,9bb0e7ef65678aa9a3f6b29f1a81c81a", + "L10_H3K27ac.tsv:md5,eb9211ad1f0c9f84ca956ca38115d336", + "L10_chromHMM_enhancers.tsv:md5,c3be2eaaa664dc36d9b0e710714cea04", + "L10_chromHMM_promoters.tsv:md5,a8a38c1a5103d5a2f8da6d7825ea06cc", + "L1_H3K27ac.tsv:md5,d68ba24b01f6789eddc52ca0803800bf", + "L1_H3K4me3.tsv:md5,67bde579668dad1aa652016bc0e44697", + "L1_chromHMM_enhancers.tsv:md5,438b2b21b47b773a0c5981ff265737e6", + "L1_chromHMM_promoters.tsv:md5,044f592433e3d2e87f6de5c472707f26", + "p6_H3K27ac.tsv:md5,cc8800525d2a5b1581ae2427dd70da8c", + "p6_H3K4me3.tsv:md5,e5f54d8e97e7fd3298ece970a2d99a36", + "p6_chromHMM_enhancers.tsv:md5,72670521a49fed219de4ff972a416917", + "p6_chromHMM_promoters.tsv:md5,d8ef11412e8a6e63227382348bc02ef5", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,59f68dd95564876b3fe43e9af1195bfa", @@ -10145,35 +10099,13 @@ "filtered_p6_H3K27ac.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e", "filtered_p6_chromHMM_enhancers.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "filtered_p6_chromHMM_promoters.bed:md5,d41d8cd98f00b204e9800998ecf8427e", - "L10_H3K27ac.gff:md5,cb7f3bb9655b07b969bc206c992a99a3", - "L10_H3K27ac.tsv:md5,c15b489f4427175083ca89ec671b5508", - "L10_chromHMM_enhancers.gff:md5,59af62a58a2cf7219d0aecd3e634f2a5", - "L10_chromHMM_enhancers.tsv:md5,3fcae84eda1bc3bf0ef91500139b53ca", - "L10_chromHMM_promoters.gff:md5,4051c9121f854ebdfc3f2c6751531cf1", - "L10_chromHMM_promoters.tsv:md5,57cefb729d40ccddd550ec38fa306ef5", - "L1_H3K27ac.gff:md5,bfa72d26c51571fd555382f5a46cffb1", - "L1_H3K27ac.tsv:md5,b154b0590611d3497114dbcbe6649bbb", - "L1_H3K4me3.gff:md5,1c01f6b3bbb66b428e5dceb35156c803", - "L1_H3K4me3.tsv:md5,1d82091f9cc5f41ad00197efbdef16ca", - "L1_chromHMM_enhancers.gff:md5,f86332b7a254a843707f65bffa6f1458", - "L1_chromHMM_enhancers.tsv:md5,270cbe43da29e2c827fdc51c242b4cd0", - "L1_chromHMM_promoters.gff:md5,899425031d0ca5cf710b40f941d923b7", - "L1_chromHMM_promoters.tsv:md5,9aca1a8dcdd5e4ca05aa04b93e6d5c2d", - "p6_H3K27ac.gff:md5,a7a9b6907c27e9a263e6b9a7c0c0c3ad", - "p6_H3K27ac.tsv:md5,7f753c6ac4fd16d3e4d280a2de3da3ae", - "p6_H3K4me3.gff:md5,c5e13df409046198bf707c081f3f94e7", - "p6_H3K4me3.tsv:md5,bdfd4b94b0b999b5cf265431db99fbb3", - "p6_chromHMM_enhancers.gff:md5,6b394667bfb0195c7cbb0ef89c48dbfd", - "p6_chromHMM_enhancers.tsv:md5,601a23439fbcfda6c54c44bea7adf3df", - "p6_chromHMM_promoters.gff:md5,3c891e4bf0d8f3c3f03b6b1026f3a141", - "p6_chromHMM_promoters.tsv:md5,29427025004f80b0a39fbd14927fe3ea" + "filtered_p6_chromHMM_promoters.bed:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T15:16:21.988642039" + "timestamp": "2025-09-26T17:33:39.046497359" } } \ No newline at end of file From 38698f04e4a727f6d6885668c8217a35dc7c2841 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Fri, 26 Sep 2025 18:48:40 +0200 Subject: [PATCH 18/24] fix snapshot --- tests/default.nf.test.snap | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index e20923b..707e4b2 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -3944,11 +3944,11 @@ "L1_H3K4me3_sorted.gff:md5,a1c89f1e04912c6fba7f299bd8da8e66", "p6_H3K27ac_sorted.gff:md5,64faf57c18abd66238cd996b9374733d", "p6_H3K4me3_sorted.gff:md5,bac538bb36426400a780c130d0416b34", - "L10_H3K27ac.tsv:md5,ad14248b7befc9c6d5484987c5805127", - "L1_H3K27ac.tsv:md5,58de9061282dad957d0b6ef15ec3b230", - "L1_H3K4me3.tsv:md5,bd4e4a5dda2f0bcf95bdfb585b7c2753", - "p6_H3K27ac.tsv:md5,7ece43bd163f636846a866a2d4d35c6f", - "p6_H3K4me3.tsv:md5,8770bd4eda9199af87683fbe8d59bb1e", + "L10_H3K27ac.tsv:md5,b14a2171ac3eb017613587b4d9f3451c", + "L1_H3K27ac.tsv:md5,291923bdfb8888c2adc786b77c227098", + "L1_H3K4me3.tsv:md5,1d5a8f339171a272fc7cc3c22bafbbdf", + "p6_H3K27ac.tsv:md5,ab16857ef932927f49c71cf161ac09e1", + "p6_H3K4me3.tsv:md5,497aaddea4477e68e763b9ae01be0523", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,4e48a06e991fdd12712c25823eebc5be", @@ -3977,7 +3977,7 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T17:39:14.297423333" + "timestamp": "2025-09-26T18:05:22.354563172" }, "Should run with both bed and bam input": { "content": [ @@ -10043,17 +10043,17 @@ "p6_H3K4me3_sorted.gff:md5,908e9f5ff80b4dc44f45c0878779fdcc", "p6_chromHMM_enhancers_sorted.gff:md5,ad9b13a4e1d1aa21dc4fd0c0ab0dd112", "p6_chromHMM_promoters_sorted.gff:md5,bbfca43809136df8fa5d1d35509198ac", - "L10_H3K27ac.tsv:md5,eb9211ad1f0c9f84ca956ca38115d336", - "L10_chromHMM_enhancers.tsv:md5,c3be2eaaa664dc36d9b0e710714cea04", - "L10_chromHMM_promoters.tsv:md5,a8a38c1a5103d5a2f8da6d7825ea06cc", - "L1_H3K27ac.tsv:md5,d68ba24b01f6789eddc52ca0803800bf", - "L1_H3K4me3.tsv:md5,67bde579668dad1aa652016bc0e44697", - "L1_chromHMM_enhancers.tsv:md5,438b2b21b47b773a0c5981ff265737e6", - "L1_chromHMM_promoters.tsv:md5,044f592433e3d2e87f6de5c472707f26", - "p6_H3K27ac.tsv:md5,cc8800525d2a5b1581ae2427dd70da8c", - "p6_H3K4me3.tsv:md5,e5f54d8e97e7fd3298ece970a2d99a36", - "p6_chromHMM_enhancers.tsv:md5,72670521a49fed219de4ff972a416917", - "p6_chromHMM_promoters.tsv:md5,d8ef11412e8a6e63227382348bc02ef5", + "L10_H3K27ac.tsv:md5,0562b86b001a1db31113c1565aa3dcdb", + "L10_chromHMM_enhancers.tsv:md5,608f4b7e47cce0ea103dfe9fc56ea99d", + "L10_chromHMM_promoters.tsv:md5,b1efbcc8ba0ad049ad462dea2563587a", + "L1_H3K27ac.tsv:md5,76ffe9ce4babd6928bffcc6999323435", + "L1_H3K4me3.tsv:md5,cd7176e9a391b5e0cb8342823b56b936", + "L1_chromHMM_enhancers.tsv:md5,1a5ef169cd1f4f689d2fc0a158e2810f", + "L1_chromHMM_promoters.tsv:md5,a0088dcd9034b25279aec39e2f1e6fd6", + "p6_H3K27ac.tsv:md5,b8fa14f35ed8685e7c02f9230b190b54", + "p6_H3K4me3.tsv:md5,212925f92002d25323686899e832dd56", + "p6_chromHMM_enhancers.tsv:md5,081f6a98048b836c46ab480ab8bb3c6d", + "p6_chromHMM_promoters.tsv:md5,a64b5816cd5f7bcea964ccb7533ee9a1", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,59f68dd95564876b3fe43e9af1195bfa", @@ -10106,6 +10106,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T17:33:39.046497359" + "timestamp": "2025-09-26T17:59:52.153142915" } } \ No newline at end of file From ec99f8cba110bd1032aa574c1228f8d9ee82cc73 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sat, 27 Sep 2025 20:01:37 +0200 Subject: [PATCH 19/24] try fix this f****** tests --- conf/modules.config | 2 +- tests/default.nf.test.snap | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 62fe213..aae10f1 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -598,7 +598,7 @@ process { } withName: ".*:FIMO:SORT_TSV" { - ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n" + ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n -k strand -k score:nr -k p-value:n -k q-value:n -k matched_sequence" publishDir = [ path: { "${params.outdir}/06_fimo/04_combined_results/tsv" }, mode: params.publish_dir_mode, diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 707e4b2..543fcdd 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -3944,11 +3944,11 @@ "L1_H3K4me3_sorted.gff:md5,a1c89f1e04912c6fba7f299bd8da8e66", "p6_H3K27ac_sorted.gff:md5,64faf57c18abd66238cd996b9374733d", "p6_H3K4me3_sorted.gff:md5,bac538bb36426400a780c130d0416b34", - "L10_H3K27ac.tsv:md5,b14a2171ac3eb017613587b4d9f3451c", - "L1_H3K27ac.tsv:md5,291923bdfb8888c2adc786b77c227098", - "L1_H3K4me3.tsv:md5,1d5a8f339171a272fc7cc3c22bafbbdf", - "p6_H3K27ac.tsv:md5,ab16857ef932927f49c71cf161ac09e1", - "p6_H3K4me3.tsv:md5,497aaddea4477e68e763b9ae01be0523", + "L10_H3K27ac.tsv:md5,63b8fb8c769c5b416c9ae6738ad260a1", + "L1_H3K27ac.tsv:md5,12883732469b5ef8f0e566cf88e8360e", + "L1_H3K4me3.tsv:md5,234fdab4f7c07b423f8f022b6c3d0d8a", + "p6_H3K27ac.tsv:md5,d75f51f8af229ad6082a3bbe38f94f14", + "p6_H3K4me3.tsv:md5,b1004c2222c3b0e75062dbb0083d46eb", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,4e48a06e991fdd12712c25823eebc5be", @@ -3977,7 +3977,7 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T18:05:22.354563172" + "timestamp": "2025-09-27T19:58:46.021387303" }, "Should run with both bed and bam input": { "content": [ @@ -10043,17 +10043,17 @@ "p6_H3K4me3_sorted.gff:md5,908e9f5ff80b4dc44f45c0878779fdcc", "p6_chromHMM_enhancers_sorted.gff:md5,ad9b13a4e1d1aa21dc4fd0c0ab0dd112", "p6_chromHMM_promoters_sorted.gff:md5,bbfca43809136df8fa5d1d35509198ac", - "L10_H3K27ac.tsv:md5,0562b86b001a1db31113c1565aa3dcdb", - "L10_chromHMM_enhancers.tsv:md5,608f4b7e47cce0ea103dfe9fc56ea99d", - "L10_chromHMM_promoters.tsv:md5,b1efbcc8ba0ad049ad462dea2563587a", - "L1_H3K27ac.tsv:md5,76ffe9ce4babd6928bffcc6999323435", - "L1_H3K4me3.tsv:md5,cd7176e9a391b5e0cb8342823b56b936", - "L1_chromHMM_enhancers.tsv:md5,1a5ef169cd1f4f689d2fc0a158e2810f", - "L1_chromHMM_promoters.tsv:md5,a0088dcd9034b25279aec39e2f1e6fd6", - "p6_H3K27ac.tsv:md5,b8fa14f35ed8685e7c02f9230b190b54", - "p6_H3K4me3.tsv:md5,212925f92002d25323686899e832dd56", - "p6_chromHMM_enhancers.tsv:md5,081f6a98048b836c46ab480ab8bb3c6d", - "p6_chromHMM_promoters.tsv:md5,a64b5816cd5f7bcea964ccb7533ee9a1", + "L10_H3K27ac.tsv:md5,24d653ea709b789434d3ed499f3f18a1", + "L10_chromHMM_enhancers.tsv:md5,ab2e7f37b34e9e89f28df631612d5060", + "L10_chromHMM_promoters.tsv:md5,e54088d7d9784893025cd0d28ab0d6a6", + "L1_H3K27ac.tsv:md5,037bed292f657dae6193905ae2b344c7", + "L1_H3K4me3.tsv:md5,60d5e4285ee3b994723179a5e0e2b007", + "L1_chromHMM_enhancers.tsv:md5,7819fa7d9f1b41d7d5b82bee9719475c", + "L1_chromHMM_promoters.tsv:md5,19dbefd418f29956c0c4554d4899f76b", + "p6_H3K27ac.tsv:md5,e2990bf40dcc5090097cca11dde0dba4", + "p6_H3K4me3.tsv:md5,264817038ac5cd1062b224364c96a451", + "p6_chromHMM_enhancers.tsv:md5,38f7bdbc36fbe617905a88934d402630", + "p6_chromHMM_promoters.tsv:md5,95a3cfa56a471160f6d1d2b35ddd5362", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,59f68dd95564876b3fe43e9af1195bfa", @@ -10106,6 +10106,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T17:59:52.153142915" + "timestamp": "2025-09-27T19:53:55.900985292" } } \ No newline at end of file From 05ec457b9034abf55a3b4b2152890454d9c765e4 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sun, 28 Sep 2025 13:32:29 +0200 Subject: [PATCH 20/24] add more memory --- conf/modules.config | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index aae10f1..104a515 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -585,6 +585,10 @@ process { withName: ".*:FIMO:CONCAT_FILTER_GFF" { ext.args = "'/^#/ { next } NF==0 { next } { print }'" + publishDir = [ + // Unsorted intermediate file, disable publishing + enabled: false + ] } withName: ".*:FIMO:SORT_GFF" { @@ -597,6 +601,14 @@ process { ] } + withName: ".*:FIMO:CONCAT_FILTER_TSV" { + ext.args = "-v HEADER='motif_id\\tmotif_alt_id\\tsequence_name\\tstart\\tstop\\tstrand\\tscore\\tp-value\\tq-value\\tmatched_sequence' 'BEGIN {print HEADER} FNR==1 {next} /^#/ {next} NF==0 {next} {print}'" + publishDir = [ + // Unsorted intermediate file, disable publishing + enabled: false + ] + } + withName: ".*:FIMO:SORT_TSV" { ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n -k strand -k score:nr -k p-value:n -k q-value:n -k matched_sequence" publishDir = [ @@ -604,6 +616,7 @@ process { mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] + memory = { 36.GB * task.attempt } } /* From cbca1ad5da66b9e4dcc88a4f3678b77e109a603e Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sun, 28 Sep 2025 13:32:58 +0200 Subject: [PATCH 21/24] replace csvtk/concat with gawk --- subworkflows/local/fimo/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index b7e3fc1..9d23437 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -3,7 +3,7 @@ include { BEDTOOLS_GETFASTA as EXTRACT_SEQUENCE } from "../../../modules/nf-core include { RUN_FIMO } from "../../../modules/local/fimo/run_fimo" include { GAWK as CONCAT_FILTER_GFF } from "../../../modules/nf-core/gawk" include { GNU_SORT as SORT_GFF } from "../../../modules/nf-core/gnu/sort" -include { CSVTK_CONCAT as CONCAT_FILTER_TSV } from "../../../modules/nf-core/csvtk/concat" +include { GAWK as CONCAT_FILTER_TSV } from "../../../modules/nf-core/gawk" include { CSVTK_SORT as SORT_TSV } from '../../../modules/nf-core/csvtk/sort' workflow FIMO { @@ -59,12 +59,12 @@ workflow FIMO { // Concat per condition_assay and remove comments and empty lines CONCAT_FILTER_TSV( RUN_FIMO.out.tsv.map { meta, tsv -> [[id: meta.condition + '_' + meta.assay], tsv] }.groupTuple(), - 'tsv', - 'tsv' + [], + [] ) ch_versions = ch_versions.mix(CONCAT_FILTER_TSV.out.versions) - SORT_TSV(CONCAT_FILTER_TSV.out.csv, 'tsv', 'tsv') + SORT_TSV(CONCAT_FILTER_TSV.out.output, 'tsv', 'tsv') ch_versions = ch_versions.mix(SORT_TSV.out.versions) emit: From 591d4e06d7f1ec8fbc1ff1595c4d81308d8fddc3 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sun, 28 Sep 2025 13:33:29 +0200 Subject: [PATCH 22/24] remove nf-core csvtk/concat --- modules.json | 5 -- modules/nf-core/csvtk/concat/environment.yml | 7 -- modules/nf-core/csvtk/concat/main.nf | 55 -------------- modules/nf-core/csvtk/concat/meta.yml | 60 ---------------- .../nf-core/csvtk/concat/tests/main.nf.test | 72 ------------------- .../csvtk/concat/tests/main.nf.test.snap | 68 ------------------ 6 files changed, 267 deletions(-) delete mode 100644 modules/nf-core/csvtk/concat/environment.yml delete mode 100644 modules/nf-core/csvtk/concat/main.nf delete mode 100644 modules/nf-core/csvtk/concat/meta.yml delete mode 100644 modules/nf-core/csvtk/concat/tests/main.nf.test delete mode 100644 modules/nf-core/csvtk/concat/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 9cdcc48..fa59bf0 100644 --- a/modules.json +++ b/modules.json @@ -46,11 +46,6 @@ "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, - "csvtk/concat": { - "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"] - }, "csvtk/sort": { "branch": "master", "git_sha": "d01263b60ce84d777f09819709e94dd17b11ce92", diff --git a/modules/nf-core/csvtk/concat/environment.yml b/modules/nf-core/csvtk/concat/environment.yml deleted file mode 100644 index 52d488d..0000000 --- a/modules/nf-core/csvtk/concat/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - bioconda - - conda-forge -dependencies: - - bioconda::csvtk=0.31.0 diff --git a/modules/nf-core/csvtk/concat/main.nf b/modules/nf-core/csvtk/concat/main.nf deleted file mode 100644 index 9f17a9b..0000000 --- a/modules/nf-core/csvtk/concat/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -process CSVTK_CONCAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/csvtk:0.31.0--h9ee0642_0' : - 'biocontainers/csvtk:0.31.0--h9ee0642_0' }" - - input: - tuple val(meta), path(csv, name: 'inputs/csv*/*') - val in_format - val out_format - - output: - tuple val(meta), path("${prefix}.${out_extension}"), emit: csv - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def delimiter = in_format == "tsv" ? "\t" : (in_format == "csv" ? "," : in_format) - def out_delimiter = out_format == "tsv" ? "\t" : (out_format == "csv" ? "," : out_format) - out_extension = out_format == "tsv" ? 'tsv' : 'csv' - """ - csvtk \\ - concat \\ - $args \\ - --num-cpus $task.cpus \\ - --delimiter "${delimiter}" \\ - --out-delimiter "${out_delimiter}" \\ - --out-file ${prefix}.${out_extension} \\ - $csv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) - END_VERSIONS - """ - - stub: - prefix = task.ext.prefix ?: "${meta.id}" - out_extension = out_format == "tsv" ? 'tsv' : 'csv' - """ - touch ${prefix}.${out_extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - csvtk: \$(echo \$( csvtk version | sed -e "s/csvtk v//g" )) - END_VERSIONS - """ -} diff --git a/modules/nf-core/csvtk/concat/meta.yml b/modules/nf-core/csvtk/concat/meta.yml deleted file mode 100644 index 37497b3..0000000 --- a/modules/nf-core/csvtk/concat/meta.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: csvtk_concat -description: Concatenate two or more CSV (or TSV) tables into a single table -keywords: - - concatenate - - tsv - - csv -tools: - - csvtk: - description: A cross-platform, efficient, practical CSV/TSV toolkit - homepage: http://bioinf.shenwei.me/csvtk - documentation: http://bioinf.shenwei.me/csvtk - tool_dev_url: https://github.com/shenwei356/csvtk - licence: ["MIT"] - identifier: "" -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - csv: - type: file - description: CSV/TSV formatted files - pattern: "*.{csv,tsv}" - ontologies: - - edam: http://edamontology.org/format_3752 # CSV - - edam: http://edamontology.org/format_3475 # TSV - - in_format: - type: string - description: Input format (csv, tab, or a delimiting character) - pattern: "*" - - out_format: - type: string - description: Output format (csv, tab, or a delimiting character) - pattern: "*" -output: - csv: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.${out_extension}: - type: file - description: Concatenated CSV/TSV file - pattern: "*.{csv,tsv}" - ontologies: - - edam: http://edamontology.org/format_3752 # CSV - - edam: http://edamontology.org/format_3475 # TSV - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "version.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@rpetit3" -maintainers: - - "@rpetit3" diff --git a/modules/nf-core/csvtk/concat/tests/main.nf.test b/modules/nf-core/csvtk/concat/tests/main.nf.test deleted file mode 100644 index b6c1a58..0000000 --- a/modules/nf-core/csvtk/concat/tests/main.nf.test +++ /dev/null @@ -1,72 +0,0 @@ -// nf-core modules test csvtk/concat -nextflow_process { - - name "Test Process CSVTK_CONCAT" - script "../main.nf" - process "CSVTK_CONCAT" - - tag "modules" - tag "modules_nfcore" - tag "csvtk" - tag "csvtk/concat" - - test("tsv - concat - csv") { - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_hybrid.csv", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_long.csv", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true) - ] - ] - input[1] = "tsv" - input[2] = "csv" - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("tsv - concat - csv - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test' ], // meta map - [ - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_hybrid.csv", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_long.csv", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/bacass/bacass_short.csv", checkIfExists: true) - ] - ] - input[1] = "tsv" - input[2] = "csv" - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/nf-core/csvtk/concat/tests/main.nf.test.snap b/modules/nf-core/csvtk/concat/tests/main.nf.test.snap deleted file mode 100644 index 254d34a..0000000 --- a/modules/nf-core/csvtk/concat/tests/main.nf.test.snap +++ /dev/null @@ -1,68 +0,0 @@ -{ - "tsv - concat - csv - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" - ], - "csv": [ - [ - { - "id": "test" - }, - "test.csv:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.3" - }, - "timestamp": "2025-01-08T04:46:46.133640633" - }, - "tsv - concat - csv": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - "test.csv:md5,bb0ed52999b6b24297bcefb3c29f0a5c" - ] - ], - "1": [ - "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" - ], - "csv": [ - [ - { - "id": "test" - }, - "test.csv:md5,bb0ed52999b6b24297bcefb3c29f0a5c" - ] - ], - "versions": [ - "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.3" - }, - "timestamp": "2025-01-08T04:46:31.419386462" - } -} \ No newline at end of file From 60c7d1b728aa0b7bcdefbb4825024e8b9e4d5583 Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sun, 28 Sep 2025 13:46:29 +0200 Subject: [PATCH 23/24] fix fimo tests --- subworkflows/local/fimo/tests/main.nf.test.snap | 12 ++++++------ subworkflows/local/fimo/tests/nextflow.config | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/subworkflows/local/fimo/tests/main.nf.test.snap b/subworkflows/local/fimo/tests/main.nf.test.snap index 0e4416e..baa1ff7 100644 --- a/subworkflows/local/fimo/tests/main.nf.test.snap +++ b/subworkflows/local/fimo/tests/main.nf.test.snap @@ -20,8 +20,8 @@ ], "2": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", + "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", - "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", @@ -47,8 +47,8 @@ ], "versions": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", + "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", - "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", @@ -62,7 +62,7 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T15:38:02.58513746" + "timestamp": "2025-09-28T13:45:59.335325874" }, "Should run without failures": { "content": [ @@ -84,8 +84,8 @@ ] ], "2": [ + "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", - "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", @@ -110,8 +110,8 @@ ] ], "versions": [ + "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", - "versions.yml:md5,56ba3533c4500df4a59d9c5d343c3148", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", @@ -125,6 +125,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-26T15:48:39.202453559" + "timestamp": "2025-09-28T13:45:35.150219947" } } \ No newline at end of file diff --git a/subworkflows/local/fimo/tests/nextflow.config b/subworkflows/local/fimo/tests/nextflow.config index 69ae24d..d4f8b01 100644 --- a/subworkflows/local/fimo/tests/nextflow.config +++ b/subworkflows/local/fimo/tests/nextflow.config @@ -8,7 +8,11 @@ process { ext.prefix = {"${meta.id}_sorted"} } + withName: "FIMO:CONCAT_FILTER_TSV" { + ext.args = "-v HEADER='motif_id\\tmotif_alt_id\\tsequence_name\\tstart\\tstop\\tstrand\\tscore\\tp-value\\tq-value\\tmatched_sequence' 'BEGIN {print HEADER} FNR==1 {next} /^#/ {next} NF==0 {next} {print}'" + } + withName: ".*:FIMO:SORT_TSV" { - ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n" + ext.args = "-k motif_id:N -k sequence_name:N -k start:n -k stop:n -k strand -k score:nr -k p-value:n -k q-value:n -k matched_sequence" } } From 08a52ab2b91262fc12a728744405109a1f65bfbe Mon Sep 17 00:00:00 2001 From: Leon Hafner <60394289+LeonHafner@users.noreply.github.com> Date: Sun, 28 Sep 2025 14:05:17 +0200 Subject: [PATCH 24/24] update pipeline level snapshot --- tests/default.nf.test.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 543fcdd..0a0aafa 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -60,7 +60,7 @@ "gawk": "5.3.0" }, "CONCAT_FILTER_TSV": { - "csvtk": "0.31.0" + "gawk": "5.3.0" }, "CONSTRUCT_TSS": { "bedtools": "2.31.1" @@ -3977,7 +3977,7 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-27T19:58:46.021387303" + "timestamp": "2025-09-28T13:58:48.753999494" }, "Should run with both bed and bam input": { "content": [ @@ -4046,7 +4046,7 @@ "gawk": "5.3.0" }, "CONCAT_FILTER_TSV": { - "csvtk": "0.31.0" + "gawk": "5.3.0" }, "CONSTRUCT_TSS": { "bedtools": "2.31.1" @@ -10106,6 +10106,6 @@ "nf-test": "0.9.2", "nextflow": "25.04.2" }, - "timestamp": "2025-09-27T19:53:55.900985292" + "timestamp": "2025-09-28T13:53:09.941876368" } } \ No newline at end of file