From c3fe6e90faa4c02f6ce451e7418a87b883ff4ea1 Mon Sep 17 00:00:00 2001 From: Daniel Schmitz Date: Mon, 18 Nov 2024 14:18:02 +0100 Subject: [PATCH 1/2] Added module trgt/plot (#7003) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Imported module from branch trgt * Changed test snapshots because plot is unstable between environments --------- Co-authored-by: Matthias Hörtenhuber --- modules/nf-core/trgt/plot/environment.yml | 6 + modules/nf-core/trgt/plot/main.nf | 56 +++++++ modules/nf-core/trgt/plot/meta.yml | 94 ++++++++++++ modules/nf-core/trgt/plot/tests/main.nf.test | 142 ++++++++++++++++++ .../nf-core/trgt/plot/tests/main.nf.test.snap | 28 ++++ .../nf-core/trgt/plot/tests/nextflow.config | 6 + 6 files changed, 332 insertions(+) create mode 100644 modules/nf-core/trgt/plot/environment.yml create mode 100644 modules/nf-core/trgt/plot/main.nf create mode 100644 modules/nf-core/trgt/plot/meta.yml create mode 100644 modules/nf-core/trgt/plot/tests/main.nf.test create mode 100644 modules/nf-core/trgt/plot/tests/main.nf.test.snap create mode 100644 modules/nf-core/trgt/plot/tests/nextflow.config diff --git a/modules/nf-core/trgt/plot/environment.yml b/modules/nf-core/trgt/plot/environment.yml new file mode 100644 index 00000000000..614dc872b7b --- /dev/null +++ b/modules/nf-core/trgt/plot/environment.yml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - "bioconda::trgt=1.2.0" diff --git a/modules/nf-core/trgt/plot/main.nf b/modules/nf-core/trgt/plot/main.nf new file mode 100644 index 00000000000..f60fd8a150c --- /dev/null +++ b/modules/nf-core/trgt/plot/main.nf @@ -0,0 +1,56 @@ +process TRGT_PLOT { + 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/trgt:1.2.0--h9ee0642_0': + 'biocontainers/trgt:1.2.0--h9ee0642_0' }" + + input: + tuple val(meta) , path(bam), path(bai), path(vcf), path(tbi), val(repeat_id) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + tuple val(meta4), path(repeats) + + output: + tuple val(meta), path("*.{png,pdf,svg}"), emit: plot + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}_${repeat_id}" + // If user didn't specify an output path, plot to PNG + def output_arg = args.contains("--image") || args.contains("-o") ? "" : "--image ${prefix}.png" + + """ + trgt plot \\ + $args \\ + --genome ${fasta} \\ + --repeats ${repeats} \\ + --spanning-reads ${bam} \\ + --vcf ${vcf} \\ + --repeat-id ${repeat_id} \\ + $output_arg + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + trgt: \$(trgt --version |& sed '1!d ; s/trgt //') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.png + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + trgt: \$(trgt --version |& sed '1!d ; s/trgt //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/trgt/plot/meta.yml b/modules/nf-core/trgt/plot/meta.yml new file mode 100644 index 00000000000..b1052d8c742 --- /dev/null +++ b/modules/nf-core/trgt/plot/meta.yml @@ -0,0 +1,94 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "trgt_plot" +description: Visualize tandem repeats genotyped by TRGT +keywords: + - trgt + - repeat expansion + - plotting + - pacbio + - genomics +tools: + - "trgt": + description: "Tandem repeat genotyping and visualization from PacBio HiFi data" + homepage: "https://github.com/PacificBiosciences/trgt" + documentation: "https://github.com/PacificBiosciences/trgt/blob/main/docs/tutorial.md" + tool_dev_url: "https://github.com/PacificBiosciences/trgt" + doi: "10.1038/s41587-023-02057-3" + licence: + ["Pacific Biosciences Software License (https://github.com/PacificBiosciences/trgt/blob/main/LICENSE.md)"] + +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - bam: + type: file + description: "Sorted reads spanning tandem repeat from TRGT output" + pattern: "*.bam" + - bai: + type: file + description: "Index for reads" + pattern: "*.bai" + - vcf: + type: file + description: "Sorted tandem repeat genotypes called by TRGT" + pattern: "*.vcf.gz" + - tbi: + type: file + description: "Index for genotypes" + pattern: "*.{tbi,csi}" + - repeat_id: + type: string + description: "ID of tandem repeat to plot" + - - meta2: + type: map + description: | + Groovy map containing reference information + e.g. `[ id: 'genome' ]` + - fasta: + type: file + description: "FASTA reference file" + pattern: "*.{fasta,fa,fna}" + - - meta3: + type: map + description: | + Groovy map containing reference information + e.g. `[ id: 'genome' ]` + - fai: + type: file + description: "Index for FASTA file" + pattern: "*.fai" + - - meta4: + type: map + description: | + Groovy map containing repeat information + e.g. `[ id: 'repeats' ]` + - repeats: + type: file + description: "BED file with repeat coordinates and structure" + pattern: "*.bed" + +output: + - plot: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + - "*.{png,pdf,svg}": + type: file + description: "Plot of region and reads spanning tandem repeat" + pattern: "*.{png,pdf,svg}" + - versions: + - "versions.yml": + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@Schmytzi" +maintainers: + - "@Schmytzi" diff --git a/modules/nf-core/trgt/plot/tests/main.nf.test b/modules/nf-core/trgt/plot/tests/main.nf.test new file mode 100644 index 00000000000..dcf871df9f8 --- /dev/null +++ b/modules/nf-core/trgt/plot/tests/main.nf.test @@ -0,0 +1,142 @@ +// nf-core modules test trgt/plot +nextflow_process { + + name "Test Process TRGT_PLOT" + script "../main.nf" + process "TRGT_PLOT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "trgt" + tag "trgt/plot" + tag "trgt/genotype" + tag "samtools/faidx" + tag "samtools/sort" + tag "samtools/index" + tag "bcftools/sort" + tag "gunzip" + + setup { + run("GUNZIP"){ + script "../../../gunzip/main.nf" + process { + """ + input[0] = [ + [ id : 'chr22' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr22_chr22_KI270734v1_random/sequence/genome.fa.gz', checkIfExists: true) + ] + """ + } + } + run("SAMTOOLS_FAIDX"){ + script "../../../samtools/faidx/main.nf" + process { + """ + input[0] = GUNZIP.out.gunzip + input[1] = [[],[]] + """ + } + } + run("TRGT_GENOTYPE"){ + script "../../genotype/main.nf" + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true), + 'XX' + ] + input[1] = GUNZIP.out.gunzip + input[2] = SAMTOOLS_FAIDX.out.fai + input[3] = Channel.of('chr22\t18890357\t18890451\tID=TEST;MOTIFS=AT;STRUC=(AT)n') + .collectFile(name : 'repeats.bed', newLine: false) + .map { file -> [ [ id : 'chr22' ], file ] } + """ + } + } + run("SAMTOOLS_SORT"){ + script "../../../samtools/sort/main.nf" + process { + """ + input[0] = TRGT_GENOTYPE.out.bam + input[1] = [[],[]] + """ + } + } + run("SAMTOOLS_INDEX"){ + script "../../../samtools/index/main.nf" + process { + """ + input[0] = SAMTOOLS_SORT.out.bam + """ + } + } + run("BCFTOOLS_SORT"){ + script "../../../bcftools/sort/main.nf" + process { + """ + input[0] = TRGT_GENOTYPE.out.vcf + """ + } + } + } + + test("homo sapiens - [bam, bai, vcf, TEST], fasta, fai, bed") { + when { + process { + """ + input[0] = SAMTOOLS_SORT.out.bam + .join(SAMTOOLS_INDEX.out.bai) + .join(BCFTOOLS_SORT.out.vcf) + .join(BCFTOOLS_SORT.out.tbi) + .map { tuple -> tuple + 'TEST' } + input[1] = GUNZIP.out.gunzip + input[2] = SAMTOOLS_FAIDX.out.fai + input[3] = Channel.of('chr22\t18890357\t18890451\tID=TEST;MOTIFS=AT;STRUC=(AT)n') + .collectFile(name : 'repeats.bed', newLine: false) + .map { file -> [ [ id : 'chr22' ], file ] } + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.plot.get(0).get(1)).name, //unstable + process.out.versions + ).match() } + ) + } + } + + test("homo sapiens - [bam, bai, vcf, TEST], fasta, fai, bed - stub") { + options "-stub" + when { + process { + """ + input[0] = SAMTOOLS_SORT.out.bam + .join(SAMTOOLS_INDEX.out.bai) + .join(BCFTOOLS_SORT.out.vcf) + .join(BCFTOOLS_SORT.out.tbi) + .map { tuple -> tuple + 'TEST' } + input[1] = GUNZIP.out.gunzip + input[2] = SAMTOOLS_FAIDX.out.fai + input[3] = Channel.of('chr22\t18890357\t18890451\tID=TEST;MOTIFS=AT;STRUC=(AT)n') + .collectFile(name : 'repeats.bed', newLine: false) + .map { file -> [ [ id : 'chr22' ], file ] } + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.plot.get(0).get(1)).name, //unstable + process.out.versions + ).match() } + ) + } + } +} diff --git a/modules/nf-core/trgt/plot/tests/main.nf.test.snap b/modules/nf-core/trgt/plot/tests/main.nf.test.snap new file mode 100644 index 00000000000..e8614fde091 --- /dev/null +++ b/modules/nf-core/trgt/plot/tests/main.nf.test.snap @@ -0,0 +1,28 @@ +{ + "homo sapiens - [bam, bai, vcf, TEST], fasta, fai, bed - stub": { + "content": [ + "test.png", + [ + "versions.yml:md5,24cc939a0b88728bae8a2102feaf542c" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-11-18T13:58:28.083155724" + }, + "homo sapiens - [bam, bai, vcf, TEST], fasta, fai, bed": { + "content": [ + "test_TEST.png", + [ + "versions.yml:md5,24cc939a0b88728bae8a2102feaf542c" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-11-18T13:57:59.291774232" + } +} \ No newline at end of file diff --git a/modules/nf-core/trgt/plot/tests/nextflow.config b/modules/nf-core/trgt/plot/tests/nextflow.config new file mode 100644 index 00000000000..7b9314db3e7 --- /dev/null +++ b/modules/nf-core/trgt/plot/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: "BCFTOOLS_SORT" { + ext.args = "--write-index=tbi --output-type z" + ext.prefix = "sorted_" + } +} From af84433c2e619cf28e026d4140b1b8763ae3690b Mon Sep 17 00:00:00 2001 From: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:38:51 +0530 Subject: [PATCH 2/2] improve workflow logic for `fastq_align_dedup_bismark` (#7005) * improve workflow logic * add paired-end tests * update meta.yml * minor formatting fix * apply suggestions from code review --- .../nf-core/fastq_align_dedup_bismark/main.nf | 127 +++--- .../fastq_align_dedup_bismark/meta.yml | 10 +- .../tests/main.nf.test | 148 ++++++- .../tests/main.nf.test.snap | 394 +++++++++++++----- .../tests/nextflow.config | 2 +- 5 files changed, 491 insertions(+), 190 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_dedup_bismark/main.nf b/subworkflows/nf-core/fastq_align_dedup_bismark/main.nf index 1497e5adda8..e5f2ffe5af2 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bismark/main.nf +++ b/subworkflows/nf-core/fastq_align_dedup_bismark/main.nf @@ -1,11 +1,11 @@ -include { BISMARK_ALIGN } from '../../../modules/nf-core/bismark/align/main' -include { BISMARK_DEDUPLICATE } from '../../../modules/nf-core/bismark/deduplicate/main' -include { BISMARK_METHYLATIONEXTRACTOR } from '../../../modules/nf-core/bismark/methylationextractor/main' -include { BISMARK_COVERAGE2CYTOSINE } from '../../../modules/nf-core/bismark/coverage2cytosine/main' -include { BISMARK_REPORT } from '../../../modules/nf-core/bismark/report/main' -include { BISMARK_SUMMARY } from '../../../modules/nf-core/bismark/summary/main' -include { SAMTOOLS_SORT as SAMTOOLS_SORT_DEDUPLICATED } from '../../../modules/nf-core/samtools/sort/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_DEDUPLICATED } from '../../../modules/nf-core/samtools/index/main' +include { BISMARK_ALIGN } from '../../../modules/nf-core/bismark/align/main' +include { BISMARK_DEDUPLICATE } from '../../../modules/nf-core/bismark/deduplicate/main' +include { SAMTOOLS_SORT } from '../../../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_INDEX } from '../../../modules/nf-core/samtools/index/main' +include { BISMARK_METHYLATIONEXTRACTOR } from '../../../modules/nf-core/bismark/methylationextractor/main' +include { BISMARK_COVERAGE2CYTOSINE } from '../../../modules/nf-core/bismark/coverage2cytosine/main' +include { BISMARK_REPORT } from '../../../modules/nf-core/bismark/report/main' +include { BISMARK_SUMMARY } from '../../../modules/nf-core/bismark/summary/main' workflow FASTQ_ALIGN_DEDUP_BISMARK { @@ -17,18 +17,20 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK { cytosine_report // boolean: whether the run coverage2cytosine main: - ch_versions = Channel.empty() - ch_coverage2cytosine_coverage = Channel.empty() - ch_coverage2cytosine_report = Channel.empty() - ch_coverage2cytosine_summary = Channel.empty() + ch_alignments = Channel.empty() + ch_alignment_reports = Channel.empty() ch_methylation_bedgraph = Channel.empty() ch_methylation_calls = Channel.empty() ch_methylation_coverage = Channel.empty() ch_methylation_report = Channel.empty() ch_methylation_mbias = Channel.empty() + ch_coverage2cytosine_coverage = Channel.empty() + ch_coverage2cytosine_report = Channel.empty() + ch_coverage2cytosine_summary = Channel.empty() ch_bismark_report = Channel.empty() ch_bismark_summary = Channel.empty() ch_multiqc_files = Channel.empty() + ch_versions = Channel.empty() /* * Align with bismark @@ -38,28 +40,44 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK { ch_fasta, ch_bismark_index ) + ch_alignments = BISMARK_ALIGN.out.bam + ch_alignment_reports = BISMARK_ALIGN.out.report.map{ meta, report -> [ meta, report, [] ] } ch_versions = ch_versions.mix(BISMARK_ALIGN.out.versions) - if (skip_deduplication) { - alignments = BISMARK_ALIGN.out.bam - alignment_reports = BISMARK_ALIGN.out.report.map{ meta, report -> [ meta, report, [] ] } - } else { + if (!skip_deduplication) { /* * Run deduplicate_bismark */ BISMARK_DEDUPLICATE ( BISMARK_ALIGN.out.bam ) - alignments = BISMARK_DEDUPLICATE.out.bam - alignment_reports = BISMARK_ALIGN.out.report.join(BISMARK_DEDUPLICATE.out.report) - ch_versions = ch_versions.mix(BISMARK_DEDUPLICATE.out.versions) + ch_alignments = BISMARK_DEDUPLICATE.out.bam + ch_alignment_reports = BISMARK_ALIGN.out.report.join(BISMARK_DEDUPLICATE.out.report) + ch_versions = ch_versions.mix(BISMARK_DEDUPLICATE.out.versions) } + /* + * MODULE: Run samtools sort on aligned or deduplicated bam + */ + SAMTOOLS_SORT ( + ch_alignments, + [[:],[]] // [ [meta], [fasta]] + ) + ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions) + + /* + * MODULE: Run samtools index on aligned or deduplicated bam + */ + SAMTOOLS_INDEX ( + SAMTOOLS_SORT.out.bam + ) + ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions) + /* * Run bismark_methylation_extractor */ BISMARK_METHYLATIONEXTRACTOR ( - alignments, + ch_alignments, ch_bismark_index ) ch_methylation_bedgraph = BISMARK_METHYLATIONEXTRACTOR.out.bedgraph @@ -74,7 +92,7 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK { */ if (cytosine_report) { BISMARK_COVERAGE2CYTOSINE ( - BISMARK_METHYLATIONEXTRACTOR.out.coverage, + ch_methylation_coverage, ch_fasta, ch_bismark_index ) @@ -88,7 +106,7 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK { * Generate bismark sample reports */ BISMARK_REPORT ( - alignment_reports + ch_alignment_reports .join(ch_methylation_report) .join(ch_methylation_mbias) ) @@ -100,54 +118,37 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK { */ BISMARK_SUMMARY ( BISMARK_ALIGN.out.bam.collect{ meta, bam -> bam.name }, - alignment_reports.collect{ meta, align_report, dedup_report -> align_report }, - alignment_reports.collect{ meta, align_report, dedup_report -> dedup_report }.ifEmpty([]), - BISMARK_METHYLATIONEXTRACTOR.out.report.collect{ meta, report -> report }, - BISMARK_METHYLATIONEXTRACTOR.out.mbias.collect{ meta, mbias -> mbias } + ch_alignment_reports.collect{ meta, align_report, dedup_report -> align_report }, + ch_alignment_reports.collect{ meta, align_report, dedup_report -> dedup_report }.ifEmpty([]), + ch_methylation_report.collect{ meta, report -> report }, + ch_methylation_mbias.collect{ meta, mbias -> mbias } ) ch_bismark_summary = BISMARK_SUMMARY.out.summary ch_versions = ch_versions.mix(BISMARK_SUMMARY.out.versions) - /* - * MODULE: Run samtools sort on dedup bam - */ - SAMTOOLS_SORT_DEDUPLICATED ( - alignments, - [[:],[]] // [ [meta], [fasta]] - ) - ch_versions = ch_versions.mix(SAMTOOLS_SORT_DEDUPLICATED.out.versions) - - /* - * MODULE: Run samtools index on dedup bam - */ - SAMTOOLS_INDEX_DEDUPLICATED ( - SAMTOOLS_SORT_DEDUPLICATED.out.bam - ) - ch_versions = ch_versions.mix(SAMTOOLS_INDEX_DEDUPLICATED.out.versions) - /* * Collect MultiQC inputs */ - ch_multiqc_files = BISMARK_SUMMARY.out.summary - .mix(alignment_reports.collect{ meta, align_report, dedup_report -> align_report }) - .mix(alignment_reports.collect{ meta, align_report, dedup_report -> dedup_report }) - .mix(BISMARK_METHYLATIONEXTRACTOR.out.report.collect{ meta, report -> report }) - .mix(BISMARK_METHYLATIONEXTRACTOR.out.mbias.collect{ meta, mbias -> mbias }) - .mix(BISMARK_REPORT.out.report.collect{ meta, report -> report }) + ch_multiqc_files = ch_bismark_summary + .mix(ch_alignment_reports.collect{ meta, align_report, dedup_report -> align_report }) + .mix(ch_alignment_reports.collect{ meta, align_report, dedup_report -> dedup_report }) + .mix(ch_methylation_report.collect{ meta, report -> report }) + .mix(ch_methylation_mbias.collect{ meta, mbias -> mbias }) + .mix(ch_bismark_report.collect{ meta, report -> report }) emit: - dedup_bam = SAMTOOLS_SORT_DEDUPLICATED.out.bam // channel: [ val(meta), [ bam ] ] - dedup_bam_index = SAMTOOLS_INDEX_DEDUPLICATED.out.bai // channel: [ val(meta), [ bai ] ] - coverage2cytosine_coverage = ch_coverage2cytosine_coverage // channel: [ val(meta), [ coverage ] ] - coverage2cytosine_report = ch_coverage2cytosine_report // channel: [ val(meta), [ report ] ] - coverage2cytosine_summary = ch_coverage2cytosine_summary // channel: [ val(meta), [ summary ] ] - methylation_bedgraph = ch_methylation_bedgraph // channel: [ val(meta), [ bedgraph ] ] - methylation_calls = ch_methylation_calls // channel: [ val(meta), [ methylation_calls ] ] - methylation_coverage = ch_methylation_coverage // channel: [ val(meta), [ coverage ] ] - methylation_report = ch_methylation_report // channel: [ val(meta), [ report ] ] - methylation_mbias = ch_methylation_mbias // channel: [ val(meta), [ mbias ] ] - bismark_report = ch_bismark_report // channel: [ val(meta), [ report ] ] - bismark_summary = ch_bismark_summary // channel: [ val(meta), [ summary ] ] - multiqc = ch_multiqc_files // path: *{html,txt} - versions = ch_versions // path: *.version.txt + bam = SAMTOOLS_SORT.out.bam // channel: [ val(meta), [ bam ] ] + bai = SAMTOOLS_INDEX.out.bai // channel: [ val(meta), [ bai ] ] + coverage2cytosine_coverage = ch_coverage2cytosine_coverage // channel: [ val(meta), [ coverage ] ] + coverage2cytosine_report = ch_coverage2cytosine_report // channel: [ val(meta), [ report ] ] + coverage2cytosine_summary = ch_coverage2cytosine_summary // channel: [ val(meta), [ summary ] ] + methylation_bedgraph = ch_methylation_bedgraph // channel: [ val(meta), [ bedgraph ] ] + methylation_calls = ch_methylation_calls // channel: [ val(meta), [ methylation_calls ] ] + methylation_coverage = ch_methylation_coverage // channel: [ val(meta), [ coverage ] ] + methylation_report = ch_methylation_report // channel: [ val(meta), [ report ] ] + methylation_mbias = ch_methylation_mbias // channel: [ val(meta), [ mbias ] ] + bismark_report = ch_bismark_report // channel: [ val(meta), [ report ] ] + bismark_summary = ch_bismark_summary // channel: [ val(meta), [ summary ] ] + multiqc = ch_multiqc_files // path: *{html,txt} + versions = ch_versions // path: *.version.txt } diff --git a/subworkflows/nf-core/fastq_align_dedup_bismark/meta.yml b/subworkflows/nf-core/fastq_align_dedup_bismark/meta.yml index 4f3aa80b946..7622b98e892 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bismark/meta.yml +++ b/subworkflows/nf-core/fastq_align_dedup_bismark/meta.yml @@ -32,7 +32,7 @@ input: description: | Structure: [ val(meta), path(fasta) ] pattern: "*.{fa,fa.gz}" - - ch_index: + - ch_bismark_index: description: | Bismark genome index files Structure: [ val(meta), path(index) ] @@ -46,16 +46,16 @@ input: description: | Produce coverage2cytosine reports that relates methylation calls back to genomic cytosine contexts output: - - dedup_bam: + - bam: type: file description: | - Channel containing deduplicated BAM files. + Channel containing aligned or deduplicated BAM files. Structure: [ val(meta), path(bam) ] pattern: "*.bam" - - dedup_bam_index: + - bai: type: file description: | - Channel containing deduplicated BAM index files. + Channel containing aligned or deduplicated BAM index files. Structure: [ val(meta), path(bam.bai) ] pattern: "*.bai" - coverage2cytosine_coverage: diff --git a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test index f30c4344449..27bf692afdd 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test @@ -44,7 +44,7 @@ nextflow_workflow { } } - test("Params: bismark | default") { + test("Params: bismark single-end | default") { when { params { @@ -74,8 +74,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, @@ -93,7 +93,57 @@ nextflow_workflow { } } - test("Params: bismark | skip_deduplication") { + test("Params: bismark paired-end | default") { + + when { + params { + aligner = "bismark" + cytosine_report = false + skip_deduplication = false + } + + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], + file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa', checkIfExists: true) + ]) + input[2] = BOWTIE2.out.untar + input[3] = params.skip_deduplication + input[4] = params.cytosine_report + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, + workflow.out.coverage2cytosine_coverage, + workflow.out.coverage2cytosine_report, + workflow.out.coverage2cytosine_summary, + workflow.out.methylation_bedgraph, + workflow.out.methylation_calls, + workflow.out.methylation_coverage, + workflow.out.methylation_report, + workflow.out.methylation_mbias, + workflow.out.bismark_report.collect { meta, report -> file(report).name }, + workflow.out.bismark_summary[0][1], + workflow.out.multiqc.flatten().collect { path -> file(path).name }, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bismark paired-end | skip_deduplication") { when { params { @@ -105,7 +155,8 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'test', single_end:true ], - file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz', checkIfExists: true) + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) ]) input[1] = Channel.of([ [:], @@ -122,8 +173,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, @@ -141,7 +192,7 @@ nextflow_workflow { } } - test("Params: bismark | cytosine_report") { + test("Params: bismark paired-end | cytosine_report") { when { params { @@ -153,7 +204,8 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'test', single_end:true ], - file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz', checkIfExists: true) + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) ]) input[1] = Channel.of([ [:], @@ -170,8 +222,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, @@ -189,7 +241,7 @@ nextflow_workflow { } } - test("Params: bismark_hisat | default") { + test("Params: bismark_hisat single-end | default") { when { params { @@ -219,8 +271,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, @@ -238,7 +290,57 @@ nextflow_workflow { } } - test("Params: bismark_hisat | skip_deduplication") { + test("Params: bismark_hisat paired-end | default") { + + when { + params { + aligner = "bismark_hisat" + cytosine_report = false + skip_deduplication = false + } + + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], + file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa', checkIfExists: true) + ]) + input[2] = HISAT2.out.untar + input[3] = params.skip_deduplication + input[4] = params.cytosine_report + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot( + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, + workflow.out.coverage2cytosine_coverage, + workflow.out.coverage2cytosine_report, + workflow.out.coverage2cytosine_summary, + workflow.out.methylation_bedgraph, + workflow.out.methylation_calls, + workflow.out.methylation_coverage, + workflow.out.methylation_report, + workflow.out.methylation_mbias, + workflow.out.bismark_report.collect { meta, report -> file(report).name }, + workflow.out.bismark_summary[0][1], + workflow.out.multiqc.flatten().collect { path -> file(path).name }, + workflow.out.versions + ).match() } + ) + } + } + + test("Params: bismark_hisat paired-end | skip_deduplication") { when { params { @@ -250,7 +352,8 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'test', single_end:true ], - file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz', checkIfExists: true) + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) ]) input[1] = Channel.of([ [:], @@ -267,8 +370,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, @@ -286,7 +389,7 @@ nextflow_workflow { } } - test("Params: bismark_hisat | cytosine_report") { + test("Params: bismark_hisat paired-end | cytosine_report") { when { params { @@ -298,7 +401,8 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'test', single_end:true ], - file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz', checkIfExists: true) + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R1.fastq.gz', checkIfExists: true), + file('https://github.com/nf-core/test-datasets/raw/methylseq/testdata/Ecoli_10K_methylated_R2.fastq.gz', checkIfExists: true) ]) input[1] = Channel.of([ [:], @@ -315,8 +419,8 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.dedup.collect { bam(it[1]).getReadsMD5() }, - workflow.out.dedup_bam_index.collect { meta, bai -> file(bai).name }, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.coverage2cytosine_coverage, workflow.out.coverage2cytosine_report, workflow.out.coverage2cytosine_summary, diff --git a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test.snap index b8f199fb126..a4d82189455 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/main.nf.test.snap @@ -1,8 +1,8 @@ { - "Params: bismark | skip_deduplication": { + "Params: bismark_hisat paired-end | default": { "content": [ [ - + "4bf31467bec7b5d5669aa4ac16f6f93f" ], [ "test.sorted.bam.bai" @@ -22,7 +22,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.bedGraph.gz:md5,6896f135c70e2f4944cb43260a687c6c" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.bedGraph.gz:md5,036f675959865a43f49899108d53b546" ] ], [ @@ -32,12 +32,12 @@ "single_end": true }, [ - "CHG_OB_SRR389222_sub1_bismark_bt2.txt.gz:md5,11ae58ebe6513375468ebe63a521d6e3", - "CHG_OT_SRR389222_sub1_bismark_bt2.txt.gz:md5,d0754aef3f7066881bdee1adf72b4bd1", - "CHH_OB_SRR389222_sub1_bismark_bt2.txt.gz:md5,12e9e4ebf59e6b23fb52f4872f534251", - "CHH_OT_SRR389222_sub1_bismark_bt2.txt.gz:md5,b800b59b0987650ac6eb4d2eb25451ad", - "CpG_OB_SRR389222_sub1_bismark_bt2.txt.gz:md5,21d614f45ecf703117550cb2eebfa3d5", - "CpG_OT_SRR389222_sub1_bismark_bt2.txt.gz:md5,8bbe9103623f502908e81cc573754524" + "CHG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" ] ] ], @@ -47,7 +47,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.bismark.cov.gz:md5,4e31b9a432731c75a604c89cb9d471ad" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.bismark.cov.gz:md5,63511c46275713088957950285acd653" ] ], [ @@ -56,7 +56,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2_splitting_report.txt:md5,d1bc9da2811d0f20981d01c3b1f4c925" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated_splitting_report.txt:md5,5c5711d5cff9b9fb2cbb30617bf7400d" ] ], [ @@ -65,40 +65,42 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.M-bias.txt:md5,d1083f305a444487fe977362a0174159" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" ] ], [ - "SRR389222_sub1_bismark_bt2_SE_report.html" + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html" ], - "bismark_summary_report.txt:md5,13f7305cf7003f54e0eba22f3590889a", + "bismark_summary_report.txt:md5,9f62c10d005c39d3e5ee7961b6b0bf6b", [ - "SRR389222_sub1_bismark_bt2.M-bias.txt", - "SRR389222_sub1_bismark_bt2_SE_report.html", - "SRR389222_sub1_bismark_bt2_SE_report.txt", - "SRR389222_sub1_bismark_bt2_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplication_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.txt", "bismark_summary_report.html", "bismark_summary_report.txt" ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", + "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272" + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:19:32.095795684" + "timestamp": "2024-11-17T05:13:17.213711049" }, - "Params: bismark | default": { + "Params: bismark single-end | default": { "content": [ [ - + "35d55bee1ca653931716e40dac4aba30" ], [ "test.sorted.bam.bai" @@ -179,24 +181,24 @@ ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272" + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:18:51.250132036" + "timestamp": "2024-11-17T05:10:13.435134357" }, - "Params: bismark | cytosine_report": { + "Params: bismark paired-end | cytosine_report": { "content": [ [ - + "4bf31467bec7b5d5669aa4ac16f6f93f" ], [ "test.sorted.bam.bai" @@ -210,7 +212,7 @@ "id": "test", "single_end": true }, - "test.CpG_report.txt.gz:md5,33af7ef6af01da4f1e12457ff1d782c6" + "test.CpG_report.txt.gz:md5,48cfcbd77d450c55fc64c8e6d939fa03" ] ], [ @@ -219,7 +221,7 @@ "id": "test", "single_end": true }, - "test.cytosine_context_summary.txt:md5,0e8c65559470bc64c42dbd0278a531de" + "test.cytosine_context_summary.txt:md5,d9df9696701e5799a06a18af4e49d648" ] ], [ @@ -228,7 +230,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.deduplicated.bedGraph.gz:md5,5d7312489e51ca88e1ce1f689db93a64" + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.bedGraph.gz:md5,036f675959865a43f49899108d53b546" ] ], [ @@ -238,12 +240,12 @@ "single_end": true }, [ - "CHG_OB_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,5c177e6f00dfc6e2335a55c6b70efa0c", - "CHG_OT_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,5362d479358f644fe2c17cfe02f310f8", - "CHH_OB_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,9469ac28e4369032b855ce1a794a56a4", - "CHH_OT_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,d7628ac941d3fea97297a8dfcfb7aed1", - "CpG_OB_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,f0404fc1fc18c7ff58e8766b405239ed", - "CpG_OT_SRR389222_sub1_bismark_bt2.deduplicated.txt.gz:md5,67d04d843e9e1abc8643bc25b27a9ff5" + "CHG_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" ] ] ], @@ -253,7 +255,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.deduplicated.bismark.cov.gz:md5,eb0d3f96ed97c5d12afeeb49c234849d" + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.bismark.cov.gz:md5,63511c46275713088957950285acd653" ] ], [ @@ -262,7 +264,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.deduplicated_splitting_report.txt:md5,ec268cc572b8bcfea0959b47c7510f05" + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated_splitting_report.txt:md5,d994b435696e984419ef01ea7dc51b2c" ] ], [ @@ -271,30 +273,30 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_bt2.deduplicated.M-bias.txt:md5,290ebfeca4da7809cf9adfe60bab1b29" + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" ] ], [ - "SRR389222_sub1_bismark_bt2_SE_report.html" + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html" ], - "bismark_summary_report.txt:md5,46f54eec58516c027e20bc9bdcaaae14", + "bismark_summary_report.txt:md5,855dfc95b1dbb0876aff2831380bba99", [ - "SRR389222_sub1_bismark_bt2.deduplicated.M-bias.txt", - "SRR389222_sub1_bismark_bt2.deduplicated_splitting_report.txt", - "SRR389222_sub1_bismark_bt2.deduplication_report.txt", - "SRR389222_sub1_bismark_bt2_SE_report.html", - "SRR389222_sub1_bismark_bt2_SE_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.deduplication_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.txt", "bismark_summary_report.html", "bismark_summary_report.txt" ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272", + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c", "versions.yml:md5,eb23ca81cb3427b8c5a8a9a93def4882" ] ], @@ -302,12 +304,12 @@ "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:20:14.052464546" + "timestamp": "2024-11-17T05:11:57.080233925" }, - "Params: bismark_hisat | cytosine_report": { + "Params: bismark_hisat paired-end | cytosine_report": { "content": [ [ - + "4bf31467bec7b5d5669aa4ac16f6f93f" ], [ "test.sorted.bam.bai" @@ -321,7 +323,7 @@ "id": "test", "single_end": true }, - "test.CpG_report.txt.gz:md5,d05837f07e4866f007d1f25166376b10" + "test.CpG_report.txt.gz:md5,48cfcbd77d450c55fc64c8e6d939fa03" ] ], [ @@ -330,7 +332,7 @@ "id": "test", "single_end": true }, - "test.cytosine_context_summary.txt:md5,c2e99c47feb351c6666990bec7d1a9bd" + "test.cytosine_context_summary.txt:md5,d9df9696701e5799a06a18af4e49d648" ] ], [ @@ -339,7 +341,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.deduplicated.bedGraph.gz:md5,1f1b14f7be535e6098ece13ea1406bfc" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.bedGraph.gz:md5,036f675959865a43f49899108d53b546" ] ], [ @@ -349,12 +351,12 @@ "single_end": true }, [ - "CHG_OB_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,5c177e6f00dfc6e2335a55c6b70efa0c", - "CHG_OT_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,138bccceb9ae71ecdae6828fd8fc327f", - "CHH_OB_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,9469ac28e4369032b855ce1a794a56a4", - "CHH_OT_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,f1acfc10c9f9ffb80f2a7a947a210ad7", - "CpG_OB_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,f0404fc1fc18c7ff58e8766b405239ed", - "CpG_OT_SRR389222_sub1_bismark_hisat2.deduplicated.txt.gz:md5,75b9acaf689411154f906bcfa7264abf" + "CHG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" ] ] ], @@ -364,7 +366,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.deduplicated.bismark.cov.gz:md5,ec4a2575b47822ef478b3bda35c70590" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.bismark.cov.gz:md5,63511c46275713088957950285acd653" ] ], [ @@ -373,7 +375,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.deduplicated_splitting_report.txt:md5,eaee004ea3fffb9b8aaf968f41f9f903" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated_splitting_report.txt:md5,5c5711d5cff9b9fb2cbb30617bf7400d" ] ], [ @@ -382,30 +384,30 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.deduplicated.M-bias.txt:md5,82b760a6824f55f6732297374d77a6ec" + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" ] ], [ - "SRR389222_sub1_bismark_hisat2_SE_report.html" + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html" ], - "bismark_summary_report.txt:md5,762c303acee29bfffef35b3d9e04d153", + "bismark_summary_report.txt:md5,9f62c10d005c39d3e5ee7961b6b0bf6b", [ - "SRR389222_sub1_bismark_hisat2.deduplicated.M-bias.txt", - "SRR389222_sub1_bismark_hisat2.deduplicated_splitting_report.txt", - "SRR389222_sub1_bismark_hisat2.deduplication_report.txt", - "SRR389222_sub1_bismark_hisat2_SE_report.html", - "SRR389222_sub1_bismark_hisat2_SE_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplicated_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2.deduplication_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.txt", "bismark_summary_report.html", "bismark_summary_report.txt" ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272", + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c", "versions.yml:md5,eb23ca81cb3427b8c5a8a9a93def4882" ] ], @@ -413,12 +415,12 @@ "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:22:14.454171707" + "timestamp": "2024-11-17T05:14:44.263768701" }, - "Params: bismark_hisat | default": { + "Params: bismark_hisat single-end | default": { "content": [ [ - + "dae445da532c973dc9149f3ceba2d2c5" ], [ "test.sorted.bam.bai" @@ -499,24 +501,218 @@ ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", + "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", + "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", + "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", + "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T05:12:39.424047426" + }, + "Params: bismark paired-end | default": { + "content": [ + [ + "4bf31467bec7b5d5669aa4ac16f6f93f" + ], + [ + "test.sorted.bam.bai" + ], + [ + + ], + [ + + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.bedGraph.gz:md5,036f675959865a43f49899108d53b546" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + [ + "CHG_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" + ] + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.bismark.cov.gz:md5,63511c46275713088957950285acd653" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated_splitting_report.txt:md5,d994b435696e984419ef01ea7dc51b2c" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" + ] + ], + [ + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html" + ], + "bismark_summary_report.txt:md5,855dfc95b1dbb0876aff2831380bba99", + [ + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.deduplicated_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.deduplication_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.txt", + "bismark_summary_report.html", + "bismark_summary_report.txt" + ], + [ + "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", "versions.yml:md5,a675051417ba65700b5db32d98aa65b6", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272" + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:20:53.556708293" + "timestamp": "2024-11-17T05:10:47.730967756" }, - "Params: bismark_hisat | skip_deduplication": { + "Params: bismark_hisat paired-end | skip_deduplication": { "content": [ + [ + "4bf31467bec7b5d5669aa4ac16f6f93f" + ], + [ + "test.sorted.bam.bai" + ], + [ + + ], + [ + + ], [ + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_hisat2.bedGraph.gz:md5,036f675959865a43f49899108d53b546" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + [ + "CHG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_hisat2.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" + ] + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_hisat2.bismark.cov.gz:md5,63511c46275713088957950285acd653" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_hisat2_splitting_report.txt:md5,7767e575a343a9b077dcd03e594550f1" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "Ecoli_10K_methylated_R1_bismark_hisat2.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" + ] + ], + [ + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html" + ], + "bismark_summary_report.txt:md5,dd73bb37e3116c25480990bd37f3f99f", + [ + "Ecoli_10K_methylated_R1_bismark_hisat2.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_hisat2_SE_report.txt", + "Ecoli_10K_methylated_R1_bismark_hisat2_splitting_report.txt", + "bismark_summary_report.html", + "bismark_summary_report.txt" + ], + [ + "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", + "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", + "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", + "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-17T05:13:57.892659443" + }, + "Params: bismark paired-end | skip_deduplication": { + "content": [ + [ + "4bf31467bec7b5d5669aa4ac16f6f93f" ], [ "test.sorted.bam.bai" @@ -536,7 +732,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.bedGraph.gz:md5,75be0d8be0134a48fd55e15a49568d3f" + "Ecoli_10K_methylated_R1_bismark_bt2.bedGraph.gz:md5,036f675959865a43f49899108d53b546" ] ], [ @@ -546,12 +742,12 @@ "single_end": true }, [ - "CHG_OB_SRR389222_sub1_bismark_hisat2.txt.gz:md5,11ae58ebe6513375468ebe63a521d6e3", - "CHG_OT_SRR389222_sub1_bismark_hisat2.txt.gz:md5,2963a2702be660068818073a2989c790", - "CHH_OB_SRR389222_sub1_bismark_hisat2.txt.gz:md5,12e9e4ebf59e6b23fb52f4872f534251", - "CHH_OT_SRR389222_sub1_bismark_hisat2.txt.gz:md5,e6815f62702d06dc01d12ea18dbd9a03", - "CpG_OB_SRR389222_sub1_bismark_hisat2.txt.gz:md5,21d614f45ecf703117550cb2eebfa3d5", - "CpG_OT_SRR389222_sub1_bismark_hisat2.txt.gz:md5,1a07c82f278b4ed637d33833df1e9749" + "CHG_OB_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,2c1285905b97b35a9088f811e2bda70e", + "CHG_OT_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,473499e02bab8a14f8c804746bc98486", + "CHH_OB_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,dda9a584b2a9bc7b84d39fe6210f8bfc", + "CHH_OT_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,265670d72805a8689afe35ace9a7148a", + "CpG_OB_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,d2912083fda7c2b4ad5916fe9cd8acf7", + "CpG_OT_Ecoli_10K_methylated_R1_bismark_bt2.txt.gz:md5,3f1d464af4efb77956f06546eabf8f1a" ] ] ], @@ -561,7 +757,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.bismark.cov.gz:md5,ab610e006112a52e5ecb230a1704f236" + "Ecoli_10K_methylated_R1_bismark_bt2.bismark.cov.gz:md5,63511c46275713088957950285acd653" ] ], [ @@ -570,7 +766,7 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2_splitting_report.txt:md5,e6b01d28d7248361750dbd23eef667df" + "Ecoli_10K_methylated_R1_bismark_bt2_splitting_report.txt:md5,39c7721863c121645d68a4827e57ec77" ] ], [ @@ -579,34 +775,34 @@ "id": "test", "single_end": true }, - "SRR389222_sub1_bismark_hisat2.M-bias.txt:md5,bbfe49763c571a55a50d1e46c0fb4e46" + "Ecoli_10K_methylated_R1_bismark_bt2.M-bias.txt:md5,857b28589351f2c63f587a2c040db748" ] ], [ - "SRR389222_sub1_bismark_hisat2_SE_report.html" + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html" ], - "bismark_summary_report.txt:md5,7a466655c11944b6035901910378e559", + "bismark_summary_report.txt:md5,9f639cca6fe43c0461d2da88d931a036", [ - "SRR389222_sub1_bismark_hisat2.M-bias.txt", - "SRR389222_sub1_bismark_hisat2_SE_report.html", - "SRR389222_sub1_bismark_hisat2_SE_report.txt", - "SRR389222_sub1_bismark_hisat2_splitting_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2.M-bias.txt", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.html", + "Ecoli_10K_methylated_R1_bismark_bt2_SE_report.txt", + "Ecoli_10K_methylated_R1_bismark_bt2_splitting_report.txt", "bismark_summary_report.html", "bismark_summary_report.txt" ], [ "versions.yml:md5,46e043d0037e7446544ae1e25b65536c", - "versions.yml:md5,6c516cc03aa69228e503c540ee3794aa", + "versions.yml:md5,6b5bf82c070f4410ead76cc9a363529c", "versions.yml:md5,6f2f867f534bb0ae0ffbdc52d036afce", "versions.yml:md5,9b480db277eebeb6265cbd003553c22c", "versions.yml:md5,aa64d431e6cfc5ffcbd5012a76b0c1a3", - "versions.yml:md5,df1a6bcb24960ee4a22a2cc914c65272" + "versions.yml:md5,c2438ca96ec6728b06c8706639eb233c" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-15T15:21:33.809590706" + "timestamp": "2024-11-17T05:11:19.884389766" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/nextflow.config b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/nextflow.config index 903bb19fa88..8d94d8ff37b 100644 --- a/subworkflows/nf-core/fastq_align_dedup_bismark/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_align_dedup_bismark/tests/nextflow.config @@ -9,7 +9,7 @@ process { ext.args = { params.aligner == 'bismark_hisat' ? ' --hisat2' : ' --bowtie2' } } - withName: 'SAMTOOLS_SORT_DEDUPLICATED' { + withName: 'SAMTOOLS_SORT' { ext.prefix = { "${meta.id}.sorted" } } }