From 00fa69946f15b2adc0fb2d26a619cc40fb1027bf Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Tue, 11 Nov 2025 20:48:23 +0100 Subject: [PATCH 1/5] Replace 'Channel' with 'channel' as prior is deprecated --- main.nf | 8 ++++---- .../chromhmm/binarize_bams/tests/main.nf.test | 6 +++--- .../local/counts/filter_genes/tests/main.nf.test | 2 +- .../motifs/filter_motifs/tests/main.nf.test | 8 ++++---- subworkflows/local/chromhmm/main.nf | 2 +- subworkflows/local/chromhmm/tests/main.nf.test | 6 +++--- subworkflows/local/counts/main.nf | 4 ++-- subworkflows/local/counts/tests/main.nf.test | 12 ++++++------ subworkflows/local/dynamite/main.nf | 2 +- subworkflows/local/dynamite/tests/main.nf.test | 8 ++++---- subworkflows/local/fimo/main.nf | 2 +- subworkflows/local/footprinting/main.nf | 2 +- .../local/footprinting/tests/main.nf.test | 4 ++-- subworkflows/local/merge_samples/main.nf | 2 +- .../local/merge_samples/tests/main.nf.test | 4 ++-- subworkflows/local/motifs/main.nf | 4 ++-- subworkflows/local/peaks/main.nf | 6 +++--- subworkflows/local/peaks/tests/main.nf.test | 16 ++++++++-------- subworkflows/local/prepare_genome/main.nf | 6 +++--- subworkflows/local/ranking/main.nf | 2 +- subworkflows/local/ranking/tests/main.nf.test | 12 ++++++------ subworkflows/local/report/main.nf | 4 ++-- subworkflows/local/rose/main.nf | 4 ++-- subworkflows/local/rose/tests/main.nf.test | 4 ++-- subworkflows/local/sneep/main.nf | 2 +- subworkflows/local/sneep/tests/main.nf.test | 4 ++-- .../utils_nfcore_tfactivity_pipeline/main.nf | 6 +++--- .../nf-core/utils_nfcore_pipeline/main.nf | 2 +- workflows/tfactivity.nf | 4 ++-- 29 files changed, 74 insertions(+), 74 deletions(-) diff --git a/main.nf b/main.nf index 3e574450..3900bd65 100644 --- a/main.nf +++ b/main.nf @@ -51,14 +51,14 @@ workflow NFCORE_TFACTIVITY { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() fasta = file(params.fasta, checkIfExists: true) gtf = file(params.gtf, checkIfExists: true) - ch_blacklist = Channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) + ch_blacklist = channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) ch_motifs = params.motifs ? file(params.motifs, checkIfExists: true) : null - ch_counts = Channel.value(file(params.counts, checkIfExists: true)) + ch_counts = channel.value(file(params.counts, checkIfExists: true)) snps = params.snps ? file(params.snps, checkIfExists: true) : null sneep_scale_file = params.sneep_scale_file ? file(params.sneep_scale_file, checkIfExists: true) : null @@ -101,7 +101,7 @@ workflow NFCORE_TFACTIVITY { params.duplicate_motifs, ch_counts, ch_extra_counts, - Channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), + channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), params.min_count, params.min_tpm, params.expression_aggregation, diff --git a/modules/local/chromhmm/binarize_bams/tests/main.nf.test b/modules/local/chromhmm/binarize_bams/tests/main.nf.test index 5c9fe118..2aeae795 100644 --- a/modules/local/chromhmm/binarize_bams/tests/main.nf.test +++ b/modules/local/chromhmm/binarize_bams/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -66,7 +66,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -109,7 +109,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ diff --git a/modules/local/counts/filter_genes/tests/main.nf.test b/modules/local/counts/filter_genes/tests/main.nf.test index 74833b13..77e5b7db 100644 --- a/modules/local/counts/filter_genes/tests/main.nf.test +++ b/modules/local/counts/filter_genes/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { [ id: 'test'], file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true) ] - input[1] = Channel.empty() + input[1] = channel.empty() input[2] = PREPARE_GENOME.out.gene_map input[3] = 'sum' """ diff --git a/modules/local/motifs/filter_motifs/tests/main.nf.test b/modules/local/motifs/filter_motifs/tests/main.nf.test index e3fa5ce8..40550610 100644 --- a/modules/local/motifs/filter_motifs/tests/main.nf.test +++ b/modules/local/motifs/filter_motifs/tests/main.nf.test @@ -26,7 +26,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -47,7 +47,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -66,7 +66,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } @@ -87,7 +87,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } diff --git a/subworkflows/local/chromhmm/main.nf b/subworkflows/local/chromhmm/main.nf index 003b5aa1..bbc2ce0b 100644 --- a/subworkflows/local/chromhmm/main.nf +++ b/subworkflows/local/chromhmm/main.nf @@ -14,7 +14,7 @@ workflow CHROMHMM { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_files = ch_samplesheet_bam.map{ _meta, signal, control -> [signal, control]}.flatten().filter { f -> f != null } diff --git a/subworkflows/local/chromhmm/tests/main.nf.test b/subworkflows/local/chromhmm/tests/main.nf.test index c069c78c..58c3d5d2 100644 --- a/subworkflows/local/chromhmm/tests/main.nf.test +++ b/subworkflows/local/chromhmm/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -60,7 +60,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -98,7 +98,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } diff --git a/subworkflows/local/counts/main.nf b/subworkflows/local/counts/main.nf index 268d73b2..3a75bcbd 100644 --- a/subworkflows/local/counts/main.nf +++ b/subworkflows/local/counts/main.nf @@ -21,7 +21,7 @@ workflow COUNTS { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() COMBINE_COUNTS( ch_counts.map { counts -> [[id: "counts"], counts] }, @@ -58,7 +58,7 @@ workflow COUNTS { ch_versions = ch_versions.mix(PREPARE_DESIGN.out.versions) DESEQ2_DIFFERENTIAL( - Channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> + channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> [ [ id: reference + ":" + target, diff --git a/subworkflows/local/counts/tests/main.nf.test b/subworkflows/local/counts/tests/main.nf.test index f983047e..7435782a 100644 --- a/subworkflows/local/counts/tests/main.nf.test +++ b/subworkflows/local/counts/tests/main.nf.test @@ -24,8 +24,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = Channel.empty() + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -68,8 +68,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = Channel.empty() + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -102,8 +102,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) - input[3] = Channel.from([ + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) + input[3] = channel.from([ [[id: 'L1-WT1'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT1-count.txt', checkIfExists: true)], [[id: 'L1-WT2'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT2-count.txt', checkIfExists: true)], [[id: 'L1-WT4'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT4-count.txt', checkIfExists: true)], diff --git a/subworkflows/local/dynamite/main.nf b/subworkflows/local/dynamite/main.nf index 27e94ba2..0b429599 100644 --- a/subworkflows/local/dynamite/main.nf +++ b/subworkflows/local/dynamite/main.nf @@ -13,7 +13,7 @@ workflow DYNAMITE { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/dynamite/tests/main.nf.test b/subworkflows/local/dynamite/tests/main.nf.test index fc88558d..ed5adbfb 100644 --- a/subworkflows/local/dynamite/tests/main.nf.test +++ b/subworkflows/local/dynamite/tests/main.nf.test @@ -11,11 +11,11 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) @@ -42,11 +42,11 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index 9d234377..ef5033f3 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -14,7 +14,7 @@ workflow FIMO { motifs_meme main: - ch_versions = Channel.empty() + ch_versions = channel.empty() FILTER_MOTIFS(tf_ranking, motifs_meme) ch_versions = ch_versions.mix(FILTER_MOTIFS.out.versions) diff --git a/subworkflows/local/footprinting/main.nf b/subworkflows/local/footprinting/main.nf index 0d2308c5..44b80cf9 100644 --- a/subworkflows/local/footprinting/main.nf +++ b/subworkflows/local/footprinting/main.nf @@ -7,7 +7,7 @@ workflow FOOTPRINTING { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_footprint_split = ch_peaks.branch { meta, _peaks -> footprinting: meta.footprinting diff --git a/subworkflows/local/footprinting/tests/main.nf.test b/subworkflows/local/footprinting/tests/main.nf.test index 56c0fd9e..7988ed36 100644 --- a/subworkflows/local/footprinting/tests/main.nf.test +++ b/subworkflows/local/footprinting/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/merge_samples/main.nf b/subworkflows/local/merge_samples/main.nf index dddcb602..cdf2f0e0 100644 --- a/subworkflows/local/merge_samples/main.nf +++ b/subworkflows/local/merge_samples/main.nf @@ -11,7 +11,7 @@ workflow MERGE_SAMPLES { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ANNOTATE_SAMPLES(ch_peaks, [], false) ch_versions = ch_versions.mix(ANNOTATE_SAMPLES.out.versions) diff --git a/subworkflows/local/merge_samples/tests/main.nf.test b/subworkflows/local/merge_samples/tests/main.nf.test index 5918c62f..1010c3a7 100644 --- a/subworkflows/local/merge_samples/tests/main.nf.test +++ b/subworkflows/local/merge_samples/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/motifs/main.nf b/subworkflows/local/motifs/main.nf index 97119aae..a510b42d 100644 --- a/subworkflows/local/motifs/main.nf +++ b/subworkflows/local/motifs/main.nf @@ -13,10 +13,10 @@ workflow MOTIFS { remove_duplicates main: - ch_versions = Channel.empty() + ch_versions = channel.empty() if (motifs) { - ch_motifs = Channel.value(motifs) + ch_motifs = channel.value(motifs) } else { if (taxon_id) { diff --git a/subworkflows/local/peaks/main.nf b/subworkflows/local/peaks/main.nf index 38e5fe7b..bb439869 100644 --- a/subworkflows/local/peaks/main.nf +++ b/subworkflows/local/peaks/main.nf @@ -34,7 +34,7 @@ workflow PEAKS { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() CLEAN_BED(ch_peaks, [], false) ch_peaks = CLEAN_BED.out.output @@ -55,14 +55,14 @@ workflow PEAKS { ch_versions = ch_versions.mix(SORT_PEAKS.out.versions) } - ch_chromhmm_out = Channel.empty() + ch_chromhmm_out = channel.empty() if (!params.skip_chromhmm) { CHROMHMM(ch_samplesheet_bam, chrom_sizes, chromhmm_states, chromhmm_threshold, chromhmm_enhancer_marks, chromhmm_promoter_marks) ch_chromhmm_out = ch_chromhmm_out.mix(CHROMHMM.out.enhancers.mix(CHROMHMM.out.promoters)) ch_versions = ch_versions.mix(CHROMHMM.out.versions) } - ch_rose_out = Channel.empty() + ch_rose_out = channel.empty() if (!params.skip_rose) { if (params.skip_chromhmm) { log.warn("Rose can only be run if chromhmm is also run. If you want to run rose, please set --skip_chromhmm to false.") diff --git a/subworkflows/local/peaks/tests/main.nf.test b/subworkflows/local/peaks/tests/main.nf.test index 2b2436f5..2bb16751 100644 --- a/subworkflows/local/peaks/tests/main.nf.test +++ b/subworkflows/local/peaks/tests/main.nf.test @@ -35,7 +35,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -45,10 +45,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = Channel.from([ + input[6] = channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -56,7 +56,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -95,7 +95,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -105,10 +105,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = Channel.from([ + input[6] = channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -116,7 +116,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index f80d650b..90db0777 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -11,10 +11,10 @@ workflow PREPARE_GENOME { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() - ch_fasta = Channel.value([[id: 'fasta'], fasta]) - ch_gtf = Channel.value([[id: 'gtf'], gtf]) + ch_fasta = channel.value([[id: 'fasta'], fasta]) + ch_gtf = channel.value([[id: 'gtf'], gtf]) if (fasta.extension == 'gz') { GUNZIP_FASTA(ch_fasta) diff --git a/subworkflows/local/ranking/main.nf b/subworkflows/local/ranking/main.nf index 05e96cfc..cc0b6508 100644 --- a/subworkflows/local/ranking/main.nf +++ b/subworkflows/local/ranking/main.nf @@ -15,7 +15,7 @@ workflow RANKING { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/ranking/tests/main.nf.test b/subworkflows/local/ranking/tests/main.nf.test index 7f9873ee..f318f9ad 100644 --- a/subworkflows/local/ranking/tests/main.nf.test +++ b/subworkflows/local/ranking/tests/main.nf.test @@ -9,15 +9,15 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = Channel.value([ + input[2] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) @@ -41,15 +41,15 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = Channel.value([ + input[2] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/report/main.nf b/subworkflows/local/report/main.nf index 7bd06e50..d23bbb8f 100644 --- a/subworkflows/local/report/main.nf +++ b/subworkflows/local/report/main.nf @@ -46,8 +46,8 @@ workflow REPORT { workflow, parameters_schema: "nextflow_schema.json" ) - ch_workflow_summary = Channel.value(paramsSummaryToYAML(summary_params)) - ch_methods_description = Channel.value(methodsDescriptionText()) + ch_workflow_summary = channel.value(paramsSummaryToYAML(summary_params)) + ch_methods_description = channel.value(methodsDescriptionText()) PREPROCESS( gtf, diff --git a/subworkflows/local/rose/main.nf b/subworkflows/local/rose/main.nf index 20f28962..8748ba3d 100644 --- a/subworkflows/local/rose/main.nf +++ b/subworkflows/local/rose/main.nf @@ -18,7 +18,7 @@ workflow ROSE { chrom_sizes main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // Convert GTF to BED format and collapse regions to a single base pair at their start positions FILTER_CONVERT_GTF(ch_gtf, [], false) @@ -44,7 +44,7 @@ workflow ROSE { promoters: meta.assay.contains('promoters') } - ch_filter_predictions = Channel.empty() + ch_filter_predictions = channel.empty() .mix( predicted_regions.enhancers.combine(CONSTRUCT_TSS.out.bed), predicted_regions.promoters.combine(INVERT_TSS.out.bed), diff --git a/subworkflows/local/rose/tests/main.nf.test b/subworkflows/local/rose/tests/main.nf.test index 382a0d38..a3f156fe 100644 --- a/subworkflows/local/rose/tests/main.nf.test +++ b/subworkflows/local/rose/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of( + input[0] = channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) @@ -62,7 +62,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of( + input[0] = channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) diff --git a/subworkflows/local/sneep/main.nf b/subworkflows/local/sneep/main.nf index 65ce0f66..45e70ce4 100644 --- a/subworkflows/local/sneep/main.nf +++ b/subworkflows/local/sneep/main.nf @@ -14,7 +14,7 @@ workflow SNEEP { motif_regions main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // Filter transfac and scale file for motifs found with FIMO FILTER_SCALES_MOTIFS( diff --git a/subworkflows/local/sneep/tests/main.nf.test b/subworkflows/local/sneep/tests/main.nf.test index 05ef3ce3..b888242f 100644 --- a/subworkflows/local/sneep/tests/main.nf.test +++ b/subworkflows/local/sneep/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = Channel.value([ + input[4] = channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) @@ -69,7 +69,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = Channel.value([ + input[4] = channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) diff --git a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf index 24737424..8910aed4 100644 --- a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf @@ -35,7 +35,7 @@ workflow PIPELINE_INITIALISATION { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Print version and exit if required and dump pipeline parameters to JSON file @@ -79,8 +79,8 @@ workflow PIPELINE_INITIALISATION { } .set { ch_samplesheet } - ch_samplesheet_bam = params.input_bam ? Channel.fromList(samplesheetToList(params.input_bam, "${projectDir}/assets/schema_input_bam.json")) : Channel.empty() - ch_counts_design = Channel.fromList(samplesheetToList(params.counts_design, "${projectDir}/assets/schema_counts_design.json")) + ch_samplesheet_bam = params.input_bam ? channel.fromList(samplesheetToList(params.input_bam, "${projectDir}/assets/schema_input_bam.json")) : channel.empty() + ch_counts_design = channel.fromList(samplesheetToList(params.counts_design, "${projectDir}/assets/schema_counts_design.json")) emit: samplesheet = ch_samplesheet diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index bfd25876..2f30e9a4 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) } // diff --git a/workflows/tfactivity.nf b/workflows/tfactivity.nf index 2220dde6..a167cac5 100644 --- a/workflows/tfactivity.nf +++ b/workflows/tfactivity.nf @@ -59,7 +59,7 @@ workflow TFACTIVITY { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_conditions = ch_samplesheet .map { meta, _peak_file -> meta.condition } @@ -133,7 +133,7 @@ workflow TFACTIVITY { ) ch_versions = ch_versions.mix(RANKING.out.versions) - ch_fimo_binding_sites = Channel.empty() + ch_fimo_binding_sites = channel.empty() if (!params.skip_fimo) { if (duplicate_motifs == "merge") { From a3bdcf1a8de19de0388d63aac6c639e409d33548 Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Wed, 12 Nov 2025 22:46:15 +0100 Subject: [PATCH 2/5] Add significant binding sites filter --- conf/modules.config | 10 ++++++++++ nextflow.config | 3 +++ nextflow_schema.json | 18 ++++++++++++++++++ subworkflows/local/fimo/main.nf | 11 ++++++++--- workflows/tfactivity.nf | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 104a515d..954e2667 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -619,6 +619,16 @@ process { memory = { 36.GB * task.attempt } } + withName: ".*:FIMO:SELECT_SIGNIFICANT" { + ext.args = {"'NR==1 || \$9 <= ${params.fimo_qvalue_threshold}'"} + ext.prefix = {"${meta.id}_significant"} + publishDir = [ + path: { "${params.outdir}/06_fimo/05_significant_results" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + /* SNEEP */ diff --git a/nextflow.config b/nextflow.config index 39d80aa6..503283e2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -40,6 +40,9 @@ params { // SNEEP options skip_sneep = false + // FIMO options + fimo_qvalue_threshold = 0.05 + dynamite_ofolds = 3 dynamite_ifolds = 6 dynamite_alpha = 0.1 diff --git a/nextflow_schema.json b/nextflow_schema.json index 6ac9a4b8..c43b476b 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -270,6 +270,21 @@ } } }, + "fimo_options": { + "title": "FIMO options", + "type": "object", + "fa_icon": "fas fa-search", + "description": "Options for FIMO (Find Individual Motif Occurrences) analysis.", + "properties": { + "fimo_qvalue_threshold": { + "type": "number", + "default": 0.05, + "description": "Q-value threshold for filtering significant FIMO results.", + "fa_icon": "fas fa-filter", + "help_text": "Q-value threshold for filtering significant FIMO results. Only motif occurrences with q-values below this threshold will be kept. The default value is 0.05." + } + } + }, "dynamite_options": { "title": "DYNAMITE options", "type": "object", @@ -582,6 +597,9 @@ { "$ref": "#/$defs/optional_steps" }, + { + "$ref": "#/$defs/fimo_options" + }, { "$ref": "#/$defs/dynamite_options" }, diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index ef5033f3..0a8619bd 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -5,6 +5,7 @@ include { GAWK as CONCAT_FILTER_GFF } from "../../../modules/nf-core include { GNU_SORT as SORT_GFF } from "../../../modules/nf-core/gnu/sort" include { GAWK as CONCAT_FILTER_TSV } from "../../../modules/nf-core/gawk" include { CSVTK_SORT as SORT_TSV } from '../../../modules/nf-core/csvtk/sort' +include { GAWK as SELECT_SIGNIFICANT } from "../../../modules/nf-core/gawk" workflow FIMO { take: @@ -67,8 +68,12 @@ workflow FIMO { SORT_TSV(CONCAT_FILTER_TSV.out.output, 'tsv', 'tsv') ch_versions = ch_versions.mix(SORT_TSV.out.versions) + SELECT_SIGNIFICANT(SORT_TSV.out.sorted, [], false) + ch_versions = ch_versions.mix(SELECT_SIGNIFICANT.out.versions) + emit: - gff = SORT_GFF.out.sorted - tsv = SORT_TSV.out.sorted - versions = ch_versions + gff = SORT_GFF.out.sorted + tsv = SORT_TSV.out.sorted + tsv_significant = SELECT_SIGNIFICANT.out.output + versions = ch_versions } diff --git a/workflows/tfactivity.nf b/workflows/tfactivity.nf index a167cac5..69fdde32 100644 --- a/workflows/tfactivity.nf +++ b/workflows/tfactivity.nf @@ -147,7 +147,7 @@ workflow TFACTIVITY { MOTIFS.out.meme, ) ch_versions = ch_versions.mix(FIMO.out.versions) - ch_fimo_binding_sites = FIMO.out.tsv + ch_fimo_binding_sites = FIMO.out.tsv_significant } if (!params.skip_sneep) { From f3efe2684c92e7d6e554d17e99b5b77466b75b70 Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Wed, 12 Nov 2025 22:53:30 +0100 Subject: [PATCH 3/5] Revert "Replace 'Channel' with 'channel' as prior is deprecated" This reverts commit 00fa69946f15b2adc0fb2d26a619cc40fb1027bf. --- main.nf | 8 ++++---- .../chromhmm/binarize_bams/tests/main.nf.test | 6 +++--- .../local/counts/filter_genes/tests/main.nf.test | 2 +- .../motifs/filter_motifs/tests/main.nf.test | 8 ++++---- subworkflows/local/chromhmm/main.nf | 2 +- subworkflows/local/chromhmm/tests/main.nf.test | 6 +++--- subworkflows/local/counts/main.nf | 4 ++-- subworkflows/local/counts/tests/main.nf.test | 12 ++++++------ subworkflows/local/dynamite/main.nf | 2 +- subworkflows/local/dynamite/tests/main.nf.test | 8 ++++---- subworkflows/local/fimo/main.nf | 2 +- subworkflows/local/footprinting/main.nf | 2 +- .../local/footprinting/tests/main.nf.test | 4 ++-- subworkflows/local/merge_samples/main.nf | 2 +- .../local/merge_samples/tests/main.nf.test | 4 ++-- subworkflows/local/motifs/main.nf | 4 ++-- subworkflows/local/peaks/main.nf | 6 +++--- subworkflows/local/peaks/tests/main.nf.test | 16 ++++++++-------- subworkflows/local/prepare_genome/main.nf | 6 +++--- subworkflows/local/ranking/main.nf | 2 +- subworkflows/local/ranking/tests/main.nf.test | 12 ++++++------ subworkflows/local/report/main.nf | 4 ++-- subworkflows/local/rose/main.nf | 4 ++-- subworkflows/local/rose/tests/main.nf.test | 4 ++-- subworkflows/local/sneep/main.nf | 2 +- subworkflows/local/sneep/tests/main.nf.test | 4 ++-- .../utils_nfcore_tfactivity_pipeline/main.nf | 6 +++--- .../nf-core/utils_nfcore_pipeline/main.nf | 2 +- workflows/tfactivity.nf | 4 ++-- 29 files changed, 74 insertions(+), 74 deletions(-) diff --git a/main.nf b/main.nf index 3900bd65..3e574450 100644 --- a/main.nf +++ b/main.nf @@ -51,14 +51,14 @@ workflow NFCORE_TFACTIVITY { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() fasta = file(params.fasta, checkIfExists: true) gtf = file(params.gtf, checkIfExists: true) - ch_blacklist = channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) + ch_blacklist = Channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) ch_motifs = params.motifs ? file(params.motifs, checkIfExists: true) : null - ch_counts = channel.value(file(params.counts, checkIfExists: true)) + ch_counts = Channel.value(file(params.counts, checkIfExists: true)) snps = params.snps ? file(params.snps, checkIfExists: true) : null sneep_scale_file = params.sneep_scale_file ? file(params.sneep_scale_file, checkIfExists: true) : null @@ -101,7 +101,7 @@ workflow NFCORE_TFACTIVITY { params.duplicate_motifs, ch_counts, ch_extra_counts, - channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), + Channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), params.min_count, params.min_tpm, params.expression_aggregation, diff --git a/modules/local/chromhmm/binarize_bams/tests/main.nf.test b/modules/local/chromhmm/binarize_bams/tests/main.nf.test index 2aeae795..5c9fe118 100644 --- a/modules/local/chromhmm/binarize_bams/tests/main.nf.test +++ b/modules/local/chromhmm/binarize_bams/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_process { when { process { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -66,7 +66,7 @@ nextflow_process { when { process { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -109,7 +109,7 @@ nextflow_process { when { process { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ diff --git a/modules/local/counts/filter_genes/tests/main.nf.test b/modules/local/counts/filter_genes/tests/main.nf.test index 77e5b7db..74833b13 100644 --- a/modules/local/counts/filter_genes/tests/main.nf.test +++ b/modules/local/counts/filter_genes/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { [ id: 'test'], file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true) ] - input[1] = channel.empty() + input[1] = Channel.empty() input[2] = PREPARE_GENOME.out.gene_map input[3] = 'sum' """ diff --git a/modules/local/motifs/filter_motifs/tests/main.nf.test b/modules/local/motifs/filter_motifs/tests/main.nf.test index 40550610..e3fa5ce8 100644 --- a/modules/local/motifs/filter_motifs/tests/main.nf.test +++ b/modules/local/motifs/filter_motifs/tests/main.nf.test @@ -26,7 +26,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -47,7 +47,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -66,7 +66,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } @@ -87,7 +87,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } diff --git a/subworkflows/local/chromhmm/main.nf b/subworkflows/local/chromhmm/main.nf index bbc2ce0b..003b5aa1 100644 --- a/subworkflows/local/chromhmm/main.nf +++ b/subworkflows/local/chromhmm/main.nf @@ -14,7 +14,7 @@ workflow CHROMHMM { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ch_files = ch_samplesheet_bam.map{ _meta, signal, control -> [signal, control]}.flatten().filter { f -> f != null } diff --git a/subworkflows/local/chromhmm/tests/main.nf.test b/subworkflows/local/chromhmm/tests/main.nf.test index 58c3d5d2..c069c78c 100644 --- a/subworkflows/local/chromhmm/tests/main.nf.test +++ b/subworkflows/local/chromhmm/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -60,7 +60,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -98,7 +98,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } diff --git a/subworkflows/local/counts/main.nf b/subworkflows/local/counts/main.nf index 3a75bcbd..268d73b2 100644 --- a/subworkflows/local/counts/main.nf +++ b/subworkflows/local/counts/main.nf @@ -21,7 +21,7 @@ workflow COUNTS { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() COMBINE_COUNTS( ch_counts.map { counts -> [[id: "counts"], counts] }, @@ -58,7 +58,7 @@ workflow COUNTS { ch_versions = ch_versions.mix(PREPARE_DESIGN.out.versions) DESEQ2_DIFFERENTIAL( - channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> + Channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> [ [ id: reference + ":" + target, diff --git a/subworkflows/local/counts/tests/main.nf.test b/subworkflows/local/counts/tests/main.nf.test index 7435782a..f983047e 100644 --- a/subworkflows/local/counts/tests/main.nf.test +++ b/subworkflows/local/counts/tests/main.nf.test @@ -24,8 +24,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = channel.empty() + input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = Channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -68,8 +68,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = channel.empty() + input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = Channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -102,8 +102,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) - input[3] = channel.from([ + input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) + input[3] = Channel.from([ [[id: 'L1-WT1'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT1-count.txt', checkIfExists: true)], [[id: 'L1-WT2'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT2-count.txt', checkIfExists: true)], [[id: 'L1-WT4'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT4-count.txt', checkIfExists: true)], diff --git a/subworkflows/local/dynamite/main.nf b/subworkflows/local/dynamite/main.nf index 0b429599..27e94ba2 100644 --- a/subworkflows/local/dynamite/main.nf +++ b/subworkflows/local/dynamite/main.nf @@ -13,7 +13,7 @@ workflow DYNAMITE { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/dynamite/tests/main.nf.test b/subworkflows/local/dynamite/tests/main.nf.test index ed5adbfb..fc88558d 100644 --- a/subworkflows/local/dynamite/tests/main.nf.test +++ b/subworkflows/local/dynamite/tests/main.nf.test @@ -11,11 +11,11 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.value([ + input[0] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = channel.value([ + input[1] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) @@ -42,11 +42,11 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.value([ + input[0] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = channel.value([ + input[1] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index 0a8619bd..9e922c1d 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -15,7 +15,7 @@ workflow FIMO { motifs_meme main: - ch_versions = channel.empty() + ch_versions = Channel.empty() FILTER_MOTIFS(tf_ranking, motifs_meme) ch_versions = ch_versions.mix(FILTER_MOTIFS.out.versions) diff --git a/subworkflows/local/footprinting/main.nf b/subworkflows/local/footprinting/main.nf index 44b80cf9..0d2308c5 100644 --- a/subworkflows/local/footprinting/main.nf +++ b/subworkflows/local/footprinting/main.nf @@ -7,7 +7,7 @@ workflow FOOTPRINTING { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ch_footprint_split = ch_peaks.branch { meta, _peaks -> footprinting: meta.footprinting diff --git a/subworkflows/local/footprinting/tests/main.nf.test b/subworkflows/local/footprinting/tests/main.nf.test index 7988ed36..56c0fd9e 100644 --- a/subworkflows/local/footprinting/tests/main.nf.test +++ b/subworkflows/local/footprinting/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/merge_samples/main.nf b/subworkflows/local/merge_samples/main.nf index cdf2f0e0..dddcb602 100644 --- a/subworkflows/local/merge_samples/main.nf +++ b/subworkflows/local/merge_samples/main.nf @@ -11,7 +11,7 @@ workflow MERGE_SAMPLES { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ANNOTATE_SAMPLES(ch_peaks, [], false) ch_versions = ch_versions.mix(ANNOTATE_SAMPLES.out.versions) diff --git a/subworkflows/local/merge_samples/tests/main.nf.test b/subworkflows/local/merge_samples/tests/main.nf.test index 1010c3a7..5918c62f 100644 --- a/subworkflows/local/merge_samples/tests/main.nf.test +++ b/subworkflows/local/merge_samples/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/motifs/main.nf b/subworkflows/local/motifs/main.nf index a510b42d..97119aae 100644 --- a/subworkflows/local/motifs/main.nf +++ b/subworkflows/local/motifs/main.nf @@ -13,10 +13,10 @@ workflow MOTIFS { remove_duplicates main: - ch_versions = channel.empty() + ch_versions = Channel.empty() if (motifs) { - ch_motifs = channel.value(motifs) + ch_motifs = Channel.value(motifs) } else { if (taxon_id) { diff --git a/subworkflows/local/peaks/main.nf b/subworkflows/local/peaks/main.nf index bb439869..38e5fe7b 100644 --- a/subworkflows/local/peaks/main.nf +++ b/subworkflows/local/peaks/main.nf @@ -34,7 +34,7 @@ workflow PEAKS { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() CLEAN_BED(ch_peaks, [], false) ch_peaks = CLEAN_BED.out.output @@ -55,14 +55,14 @@ workflow PEAKS { ch_versions = ch_versions.mix(SORT_PEAKS.out.versions) } - ch_chromhmm_out = channel.empty() + ch_chromhmm_out = Channel.empty() if (!params.skip_chromhmm) { CHROMHMM(ch_samplesheet_bam, chrom_sizes, chromhmm_states, chromhmm_threshold, chromhmm_enhancer_marks, chromhmm_promoter_marks) ch_chromhmm_out = ch_chromhmm_out.mix(CHROMHMM.out.enhancers.mix(CHROMHMM.out.promoters)) ch_versions = ch_versions.mix(CHROMHMM.out.versions) } - ch_rose_out = channel.empty() + ch_rose_out = Channel.empty() if (!params.skip_rose) { if (params.skip_chromhmm) { log.warn("Rose can only be run if chromhmm is also run. If you want to run rose, please set --skip_chromhmm to false.") diff --git a/subworkflows/local/peaks/tests/main.nf.test b/subworkflows/local/peaks/tests/main.nf.test index 2bb16751..2b2436f5 100644 --- a/subworkflows/local/peaks/tests/main.nf.test +++ b/subworkflows/local/peaks/tests/main.nf.test @@ -35,7 +35,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -45,10 +45,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = channel.from([ + input[6] = Channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -56,7 +56,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -95,7 +95,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.from([ + input[0] = Channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -105,10 +105,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = channel.from([ + input[6] = Channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -116,7 +116,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 90db0777..f80d650b 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -11,10 +11,10 @@ workflow PREPARE_GENOME { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() - ch_fasta = channel.value([[id: 'fasta'], fasta]) - ch_gtf = channel.value([[id: 'gtf'], gtf]) + ch_fasta = Channel.value([[id: 'fasta'], fasta]) + ch_gtf = Channel.value([[id: 'gtf'], gtf]) if (fasta.extension == 'gz') { GUNZIP_FASTA(ch_fasta) diff --git a/subworkflows/local/ranking/main.nf b/subworkflows/local/ranking/main.nf index cc0b6508..05e96cfc 100644 --- a/subworkflows/local/ranking/main.nf +++ b/subworkflows/local/ranking/main.nf @@ -15,7 +15,7 @@ workflow RANKING { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/ranking/tests/main.nf.test b/subworkflows/local/ranking/tests/main.nf.test index f318f9ad..7f9873ee 100644 --- a/subworkflows/local/ranking/tests/main.nf.test +++ b/subworkflows/local/ranking/tests/main.nf.test @@ -9,15 +9,15 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.value([ + input[0] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = channel.value([ + input[1] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = channel.value([ + input[2] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) @@ -41,15 +41,15 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.value([ + input[0] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = channel.value([ + input[1] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = channel.value([ + input[2] = Channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/report/main.nf b/subworkflows/local/report/main.nf index d23bbb8f..7bd06e50 100644 --- a/subworkflows/local/report/main.nf +++ b/subworkflows/local/report/main.nf @@ -46,8 +46,8 @@ workflow REPORT { workflow, parameters_schema: "nextflow_schema.json" ) - ch_workflow_summary = channel.value(paramsSummaryToYAML(summary_params)) - ch_methods_description = channel.value(methodsDescriptionText()) + ch_workflow_summary = Channel.value(paramsSummaryToYAML(summary_params)) + ch_methods_description = Channel.value(methodsDescriptionText()) PREPROCESS( gtf, diff --git a/subworkflows/local/rose/main.nf b/subworkflows/local/rose/main.nf index 8748ba3d..20f28962 100644 --- a/subworkflows/local/rose/main.nf +++ b/subworkflows/local/rose/main.nf @@ -18,7 +18,7 @@ workflow ROSE { chrom_sizes main: - ch_versions = channel.empty() + ch_versions = Channel.empty() // Convert GTF to BED format and collapse regions to a single base pair at their start positions FILTER_CONVERT_GTF(ch_gtf, [], false) @@ -44,7 +44,7 @@ workflow ROSE { promoters: meta.assay.contains('promoters') } - ch_filter_predictions = channel.empty() + ch_filter_predictions = Channel.empty() .mix( predicted_regions.enhancers.combine(CONSTRUCT_TSS.out.bed), predicted_regions.promoters.combine(INVERT_TSS.out.bed), diff --git a/subworkflows/local/rose/tests/main.nf.test b/subworkflows/local/rose/tests/main.nf.test index a3f156fe..382a0d38 100644 --- a/subworkflows/local/rose/tests/main.nf.test +++ b/subworkflows/local/rose/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.of( + input[0] = Channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) @@ -62,7 +62,7 @@ nextflow_workflow { when { workflow { """ - input[0] = channel.of( + input[0] = Channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) diff --git a/subworkflows/local/sneep/main.nf b/subworkflows/local/sneep/main.nf index 45e70ce4..65ce0f66 100644 --- a/subworkflows/local/sneep/main.nf +++ b/subworkflows/local/sneep/main.nf @@ -14,7 +14,7 @@ workflow SNEEP { motif_regions main: - ch_versions = channel.empty() + ch_versions = Channel.empty() // Filter transfac and scale file for motifs found with FIMO FILTER_SCALES_MOTIFS( diff --git a/subworkflows/local/sneep/tests/main.nf.test b/subworkflows/local/sneep/tests/main.nf.test index b888242f..05ef3ce3 100644 --- a/subworkflows/local/sneep/tests/main.nf.test +++ b/subworkflows/local/sneep/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = channel.value([ + input[4] = Channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) @@ -69,7 +69,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = channel.value([ + input[4] = Channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) diff --git a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf index 8910aed4..24737424 100644 --- a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf @@ -35,7 +35,7 @@ workflow PIPELINE_INITIALISATION { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() // // Print version and exit if required and dump pipeline parameters to JSON file @@ -79,8 +79,8 @@ workflow PIPELINE_INITIALISATION { } .set { ch_samplesheet } - ch_samplesheet_bam = params.input_bam ? channel.fromList(samplesheetToList(params.input_bam, "${projectDir}/assets/schema_input_bam.json")) : channel.empty() - ch_counts_design = channel.fromList(samplesheetToList(params.counts_design, "${projectDir}/assets/schema_counts_design.json")) + ch_samplesheet_bam = params.input_bam ? Channel.fromList(samplesheetToList(params.input_bam, "${projectDir}/assets/schema_input_bam.json")) : Channel.empty() + ch_counts_design = Channel.fromList(samplesheetToList(params.counts_design, "${projectDir}/assets/schema_counts_design.json")) emit: samplesheet = ch_samplesheet diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 2f30e9a4..bfd25876 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) } // diff --git a/workflows/tfactivity.nf b/workflows/tfactivity.nf index 69fdde32..41088c29 100644 --- a/workflows/tfactivity.nf +++ b/workflows/tfactivity.nf @@ -59,7 +59,7 @@ workflow TFACTIVITY { main: - ch_versions = channel.empty() + ch_versions = Channel.empty() ch_conditions = ch_samplesheet .map { meta, _peak_file -> meta.condition } @@ -133,7 +133,7 @@ workflow TFACTIVITY { ) ch_versions = ch_versions.mix(RANKING.out.versions) - ch_fimo_binding_sites = channel.empty() + ch_fimo_binding_sites = Channel.empty() if (!params.skip_fimo) { if (duplicate_motifs == "merge") { From a1628a165028640ffc85bf6848d33a299284fb09 Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Thu, 13 Nov 2025 18:36:19 +0100 Subject: [PATCH 4/5] Fix failing FIMO tests --- .../local/fimo/tests/main.nf.test.snap | 48 ++++++++++++++++--- subworkflows/local/fimo/tests/nextflow.config | 7 ++- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/subworkflows/local/fimo/tests/main.nf.test.snap b/subworkflows/local/fimo/tests/main.nf.test.snap index baa1ff74..74109e51 100644 --- a/subworkflows/local/fimo/tests/main.nf.test.snap +++ b/subworkflows/local/fimo/tests/main.nf.test.snap @@ -19,6 +19,14 @@ ] ], "2": [ + [ + { + "id": "L10_chromHMM_promoters" + }, + "L10_chromHMM_promoters_significant.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", @@ -26,6 +34,7 @@ "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,d9cf2bc9a6b5f0916586f0b5184b580f", "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ], @@ -45,6 +54,14 @@ "L10_chromHMM_promoters.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "tsv_significant": [ + [ + { + "id": "L10_chromHMM_promoters" + }, + "L10_chromHMM_promoters_significant.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], "versions": [ "versions.yml:md5,09deaa382cdc983ffad29500b0c47210", "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", @@ -53,6 +70,7 @@ "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,d9cf2bc9a6b5f0916586f0b5184b580f", "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ] @@ -60,9 +78,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-09-28T13:45:59.335325874" + "timestamp": "2025-11-13T18:36:04.422878191" }, "Should run without failures": { "content": [ @@ -80,16 +98,25 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,b9dccc98df70fa127fed3ec9f5d2b0cd" + "L10_chromHMM_promoters.tsv:md5,903892dbd88b1cf1fe69f6e85ede5974" ] ], "2": [ + [ + { + "id": "L10_chromHMM_promoters" + }, + "L10_chromHMM_promoters_significant.tsv:md5,6ec71314deae3fb80be236a018899406" + ] + ], + "3": [ "versions.yml:md5,270cc8fd3cf5da52f09e2bcfb66844d1", "versions.yml:md5,37d1f45c834fbc3c356023cdfed0918a", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,d9cf2bc9a6b5f0916586f0b5184b580f", "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ], @@ -106,7 +133,15 @@ { "id": "L10_chromHMM_promoters" }, - "L10_chromHMM_promoters.tsv:md5,b9dccc98df70fa127fed3ec9f5d2b0cd" + "L10_chromHMM_promoters.tsv:md5,903892dbd88b1cf1fe69f6e85ede5974" + ] + ], + "tsv_significant": [ + [ + { + "id": "L10_chromHMM_promoters" + }, + "L10_chromHMM_promoters_significant.tsv:md5,6ec71314deae3fb80be236a018899406" ] ], "versions": [ @@ -116,6 +151,7 @@ "versions.yml:md5,612da238fbeb03191d349ddc72093946", "versions.yml:md5,91d4e73ea846dae7e805279e47204dc7", "versions.yml:md5,c1dfd15a1f2163efd0fc318809c8a071", + "versions.yml:md5,d9cf2bc9a6b5f0916586f0b5184b580f", "versions.yml:md5,def0f65b2a7925e2541586ea7ad06118", "versions.yml:md5,e50e1883b0220a195e1c520411dcbc63" ] @@ -123,8 +159,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-09-28T13:45:35.150219947" + "timestamp": "2025-11-13T18:35:49.650684716" } } \ No newline at end of file diff --git a/subworkflows/local/fimo/tests/nextflow.config b/subworkflows/local/fimo/tests/nextflow.config index d4f8b01a..88a79a40 100644 --- a/subworkflows/local/fimo/tests/nextflow.config +++ b/subworkflows/local/fimo/tests/nextflow.config @@ -12,7 +12,12 @@ process { 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" { + 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" } + + withName: "FIMO:SELECT_SIGNIFICANT" { + ext.args = {"'NR==1 || \$9 <= 0.4'"} + ext.prefix = {"${meta.id}_significant"} + } } From 78a4054c3eda5e0ed83f00bf2682def66ecf1ce9 Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Thu, 13 Nov 2025 19:38:59 +0100 Subject: [PATCH 5/5] Update pipeline-level test snapshots --- tests/default.nf.test.snap | 52 +++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 0a0aafac..d52d72ae 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,7 +1,7 @@ { "Should run with bed only": { "content": [ - 174, + 179, { "AFFINITY_MEAN": { "numpy": "2.2.6", @@ -143,6 +143,9 @@ "RUN_FIMO": { "fimo": "5.5.8" }, + "SELECT_SIGNIFICANT": { + "gawk": "5.3.0" + }, "SORT_BED": { "coreutils": 9.3 }, @@ -599,6 +602,12 @@ "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", + "06_fimo/05_significant_results", + "06_fimo/05_significant_results/L10_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/L1_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/L1_H3K4me3_significant.tsv", + "06_fimo/05_significant_results/p6_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/p6_H3K4me3_significant.tsv", "07_sneep", "07_sneep/01_filtered_scales_motifs", "07_sneep/01_filtered_scales_motifs/filtered_sneep_scale_mouse_218.txt", @@ -3949,6 +3958,11 @@ "L1_H3K4me3.tsv:md5,234fdab4f7c07b423f8f022b6c3d0d8a", "p6_H3K27ac.tsv:md5,d75f51f8af229ad6082a3bbe38f94f14", "p6_H3K4me3.tsv:md5,b1004c2222c3b0e75062dbb0083d46eb", + "L10_H3K27ac_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "L1_H3K27ac_significant.tsv:md5,0700a8ce866a2ca40795461eecf1bdf6", + "L1_H3K4me3_significant.tsv:md5,a2b971328c33a981678d90d16849c272", + "p6_H3K27ac_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "p6_H3K4me3_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,4e48a06e991fdd12712c25823eebc5be", @@ -3975,13 +3989,13 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-09-28T13:58:48.753999494" + "timestamp": "2025-11-13T19:36:12.666238946" }, "Should run with both bed and bam input": { "content": [ - 396, + 407, { "AFFINITY_MEAN": { "numpy": "2.2.6", @@ -4148,6 +4162,9 @@ "RUN_FIMO": { "fimo": "5.5.8" }, + "SELECT_SIGNIFICANT": { + "gawk": "5.3.0" + }, "SORT_BED": { "coreutils": 9.3 }, @@ -5163,6 +5180,18 @@ "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", + "06_fimo/05_significant_results", + "06_fimo/05_significant_results/L10_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/L10_chromHMM_enhancers_significant.tsv", + "06_fimo/05_significant_results/L10_chromHMM_promoters_significant.tsv", + "06_fimo/05_significant_results/L1_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/L1_H3K4me3_significant.tsv", + "06_fimo/05_significant_results/L1_chromHMM_enhancers_significant.tsv", + "06_fimo/05_significant_results/L1_chromHMM_promoters_significant.tsv", + "06_fimo/05_significant_results/p6_H3K27ac_significant.tsv", + "06_fimo/05_significant_results/p6_H3K4me3_significant.tsv", + "06_fimo/05_significant_results/p6_chromHMM_enhancers_significant.tsv", + "06_fimo/05_significant_results/p6_chromHMM_promoters_significant.tsv", "07_sneep", "07_sneep/01_filtered_scales_motifs", "07_sneep/01_filtered_scales_motifs/filtered_sneep_scale_mouse_218.txt", @@ -10054,6 +10083,17 @@ "p6_H3K4me3.tsv:md5,264817038ac5cd1062b224364c96a451", "p6_chromHMM_enhancers.tsv:md5,38f7bdbc36fbe617905a88934d402630", "p6_chromHMM_promoters.tsv:md5,95a3cfa56a471160f6d1d2b35ddd5362", + "L10_H3K27ac_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "L10_chromHMM_enhancers_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "L10_chromHMM_promoters_significant.tsv:md5,8a21488440735b59233f13af69d9d387", + "L1_H3K27ac_significant.tsv:md5,0700a8ce866a2ca40795461eecf1bdf6", + "L1_H3K4me3_significant.tsv:md5,a2b971328c33a981678d90d16849c272", + "L1_chromHMM_enhancers_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "L1_chromHMM_promoters_significant.tsv:md5,4695ea8aec0374345d4276338add6d75", + "p6_H3K27ac_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "p6_H3K4me3_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "p6_chromHMM_enhancers_significant.tsv:md5,cd7825b546b90fc8e7a8eb1cc8533ca3", + "p6_chromHMM_promoters_significant.tsv:md5,188507b513f0016ecb82965de3b58bd7", "filtered_sneep_scale_mouse_218.txt:md5,26199aaf8103de723163c03bfa8b88b2", "filtered_sneep_transfac_mouse_218.txt:md5,d41d8cd98f00b204e9800998ecf8427e", "L10_H3K27ac.bed:md5,59f68dd95564876b3fe43e9af1195bfa", @@ -10104,8 +10144,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-09-28T13:53:09.941876368" + "timestamp": "2025-11-13T19:32:43.987079271" } } \ No newline at end of file