From 3f1fde802f3de4d20827f0fb33b7832600156204 Mon Sep 17 00:00:00 2001 From: njspix Date: Thu, 8 Dec 2022 14:13:07 -0500 Subject: [PATCH 01/28] add biscuit modules --- modules.json | 12 +++ .../nf-core/biscuit/biscuitblaster/main.nf | 52 +++++++++++++ .../nf-core/biscuit/biscuitblaster/meta.yml | 78 +++++++++++++++++++ modules/nf-core/biscuit/index/main.nf | 33 ++++++++ modules/nf-core/biscuit/index/meta.yml | 38 +++++++++ modules/nf-core/biscuit/qc/main.nf | 40 ++++++++++ modules/nf-core/biscuit/qc/meta.yml | 51 ++++++++++++ 7 files changed, 304 insertions(+) create mode 100644 modules/nf-core/biscuit/biscuitblaster/main.nf create mode 100644 modules/nf-core/biscuit/biscuitblaster/meta.yml create mode 100644 modules/nf-core/biscuit/index/main.nf create mode 100644 modules/nf-core/biscuit/index/meta.yml create mode 100644 modules/nf-core/biscuit/qc/main.nf create mode 100644 modules/nf-core/biscuit/qc/meta.yml diff --git a/modules.json b/modules.json index aacfbf71..1f4d8f81 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,18 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "biscuit/biscuitblaster": { + "branch": "master", + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + }, + "biscuit/index": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "biscuit/qc": { + "branch": "master", + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + }, "bismark/align": { "branch": "master", "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf new file mode 100644 index 00000000..d1c0e042 --- /dev/null +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -0,0 +1,52 @@ +process BISCUIT_BLASTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samblaster=0.1.26 bioconda::samtools=1.15=h1170115_1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit align \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $reads | \\ + samblaster \\ + $args2 | \\ + samtools sort \\ + -@ $samtools_cpus \\ + $args3 \\ + --write-index \\ + -o ${prefix}.bam##idx##${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/biscuitblaster/meta.yml b/modules/nf-core/biscuit/biscuitblaster/meta.yml new file mode 100644 index 00000000..eb22dd0f --- /dev/null +++ b/modules/nf-core/biscuit/biscuitblaster/meta.yml @@ -0,0 +1,78 @@ +name: biscuit_blaster + +description: A fast, compact one-liner to produce duplicate-marked, sorted, and indexed BAM files using Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/biscuitblaster/ + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + - samblaster: + description: | + samblaster is a fast and flexible program for marking duplicates in read-id grouped paired-end SAM files. + It can also optionally output discordant read pairs and/or split read mappings to separate SAM files, + and/or unmapped/clipped reads to a separate FASTQ file. + By default, samblaster reads SAM input from stdin and writes SAM to stdout. + homepage: None + documentation: https://github.com/GregoryFaust/samblaster + tool_dev_url: https://github.com/GregoryFaust/samblaster + doi: "10.1093/bioinformatics/btu314" + licence: ["MIT"] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - bai: + type: file + description: Output BAM index + pattern: "*.{bai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/index/main.nf b/modules/nf-core/biscuit/index/main.nf new file mode 100644 index 00000000..9aa04330 --- /dev/null +++ b/modules/nf-core/biscuit/index/main.nf @@ -0,0 +1,33 @@ +process BISCUIT_INDEX { + tag "$fasta" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + path fasta, stageAs: "BiscuitIndex/*" + + output: + path "BiscuitIndex/*.fa*", emit: index, includeInputs: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + biscuit \\ + index \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/index/meta.yml b/modules/nf-core/biscuit/index/meta.yml new file mode 100644 index 00000000..96134f65 --- /dev/null +++ b/modules/nf-core/biscuit/index/meta.yml @@ -0,0 +1,38 @@ +name: biscuit_index +description: Indexes a reference genome for use with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - reference + - fasta + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - fasta: + type: file + description: Input genome fasta file + +output: + - index: + type: dir + description: Biscuit genome index directory + pattern: "BiscuitIndex" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/qc/main.nf b/modules/nf-core/biscuit/qc/main.nf new file mode 100644 index 00000000..6a4c48d1 --- /dev/null +++ b/modules/nf-core/biscuit/qc/main.nf @@ -0,0 +1,40 @@ +process BISCUIT_QC { + tag "$meta.id" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + tuple val(meta), path(bam) + path(index) + + output: + tuple val(meta), path("*.txt"), emit: biscuit_qc_reports + 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}" + def se = meta.single_end ? "-s" : "" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit qc \\ + $args \\ + $se \\ + \$INDEX \\ + $bam \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/qc/meta.yml b/modules/nf-core/biscuit/qc/meta.yml new file mode 100644 index 00000000..a3e65a90 --- /dev/null +++ b/modules/nf-core/biscuit/qc/meta.yml @@ -0,0 +1,51 @@ +name: biscuit_qc +description: Perform basic quality control on a BAM file generated with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - BAM + - quality control + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file produced using Biscuit + +output: + - biscuit_qc_reports: + type: file + description: | + Summary files containing the following information: + - CpG retention by position in read + - CpH retention by position in read + - Read duplication statistics + - Insert size distribution + - Distribution of mapping qualities + - Proportion of reads mapping to each strand + - Read-averaged cytosine conversion rate for CpA, CpC, CpG, and CpT + pattern: "*.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" From 694f7bb69743a049d2b361e717e73ce68c188ca8 Mon Sep 17 00:00:00 2001 From: njspix Date: Mon, 12 Dec 2022 17:11:24 -0500 Subject: [PATCH 02/28] install new modules --- modules.json | 8 ++ .../nf-core/biscuit/biscuitblaster/main.nf | 52 +++++++++++++ .../nf-core/biscuit/biscuitblaster/meta.yml | 78 +++++++++++++++++++ modules/nf-core/biscuit/index/main.nf | 33 ++++++++ modules/nf-core/biscuit/index/meta.yml | 38 +++++++++ 5 files changed, 209 insertions(+) create mode 100644 modules/nf-core/biscuit/biscuitblaster/main.nf create mode 100644 modules/nf-core/biscuit/biscuitblaster/meta.yml create mode 100644 modules/nf-core/biscuit/index/main.nf create mode 100644 modules/nf-core/biscuit/index/meta.yml diff --git a/modules.json b/modules.json index aacfbf71..aed81287 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,14 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "biscuit/biscuitblaster": { + "branch": "master", + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + }, + "biscuit/index": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, "bismark/align": { "branch": "master", "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf new file mode 100644 index 00000000..d1c0e042 --- /dev/null +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -0,0 +1,52 @@ +process BISCUIT_BLASTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samblaster=0.1.26 bioconda::samtools=1.15=h1170115_1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit align \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $reads | \\ + samblaster \\ + $args2 | \\ + samtools sort \\ + -@ $samtools_cpus \\ + $args3 \\ + --write-index \\ + -o ${prefix}.bam##idx##${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/biscuitblaster/meta.yml b/modules/nf-core/biscuit/biscuitblaster/meta.yml new file mode 100644 index 00000000..eb22dd0f --- /dev/null +++ b/modules/nf-core/biscuit/biscuitblaster/meta.yml @@ -0,0 +1,78 @@ +name: biscuit_blaster + +description: A fast, compact one-liner to produce duplicate-marked, sorted, and indexed BAM files using Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/biscuitblaster/ + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + - samblaster: + description: | + samblaster is a fast and flexible program for marking duplicates in read-id grouped paired-end SAM files. + It can also optionally output discordant read pairs and/or split read mappings to separate SAM files, + and/or unmapped/clipped reads to a separate FASTQ file. + By default, samblaster reads SAM input from stdin and writes SAM to stdout. + homepage: None + documentation: https://github.com/GregoryFaust/samblaster + tool_dev_url: https://github.com/GregoryFaust/samblaster + doi: "10.1093/bioinformatics/btu314" + licence: ["MIT"] + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - bai: + type: file + description: Output BAM index + pattern: "*.{bai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/index/main.nf b/modules/nf-core/biscuit/index/main.nf new file mode 100644 index 00000000..9aa04330 --- /dev/null +++ b/modules/nf-core/biscuit/index/main.nf @@ -0,0 +1,33 @@ +process BISCUIT_INDEX { + tag "$fasta" + label 'process_long' + + conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + path fasta, stageAs: "BiscuitIndex/*" + + output: + path "BiscuitIndex/*.fa*", emit: index, includeInputs: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + biscuit \\ + index \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/index/meta.yml b/modules/nf-core/biscuit/index/meta.yml new file mode 100644 index 00000000..96134f65 --- /dev/null +++ b/modules/nf-core/biscuit/index/meta.yml @@ -0,0 +1,38 @@ +name: biscuit_index +description: Indexes a reference genome for use with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - reference + - fasta + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - fasta: + type: file + description: Input genome fasta file + +output: + - index: + type: dir + description: Biscuit genome index directory + pattern: "BiscuitIndex" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" From 7fc6063424c489546ef7c260ce2892febe6d7d9f Mon Sep 17 00:00:00 2001 From: njspix Date: Mon, 12 Dec 2022 17:19:25 -0500 Subject: [PATCH 03/28] git fixes --- modules/nf-core/biscuit/qc/main.nf | 40 ---------------------- modules/nf-core/biscuit/qc/meta.yml | 51 ----------------------------- 2 files changed, 91 deletions(-) delete mode 100644 modules/nf-core/biscuit/qc/main.nf delete mode 100644 modules/nf-core/biscuit/qc/meta.yml diff --git a/modules/nf-core/biscuit/qc/main.nf b/modules/nf-core/biscuit/qc/main.nf deleted file mode 100644 index 6a4c48d1..00000000 --- a/modules/nf-core/biscuit/qc/main.nf +++ /dev/null @@ -1,40 +0,0 @@ -process BISCUIT_QC { - tag "$meta.id" - label 'process_long' - - conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': - 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" - - input: - tuple val(meta), path(bam) - path(index) - - output: - tuple val(meta), path("*.txt"), emit: biscuit_qc_reports - 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}" - def se = meta.single_end ? "-s" : "" - """ - INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` - - biscuit qc \\ - $args \\ - $se \\ - \$INDEX \\ - $bam \\ - $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/biscuit/qc/meta.yml b/modules/nf-core/biscuit/qc/meta.yml deleted file mode 100644 index a3e65a90..00000000 --- a/modules/nf-core/biscuit/qc/meta.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: biscuit_qc -description: Perform basic quality control on a BAM file generated with Biscuit -keywords: - - biscuit - - DNA methylation - - WGBS - - scWGBS - - bisulfite sequencing - - index - - BAM - - quality control - -tools: - - biscuit: - description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data - homepage: https://huishenlab.github.io/biscuit/ - documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc - tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" - licence: ["MIT"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file produced using Biscuit - -output: - - biscuit_qc_reports: - type: file - description: | - Summary files containing the following information: - - CpG retention by position in read - - CpH retention by position in read - - Read duplication statistics - - Insert size distribution - - Distribution of mapping qualities - - Proportion of reads mapping to each strand - - Read-averaged cytosine conversion rate for CpA, CpC, CpG, and CpT - pattern: "*.txt" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@njspix" From 0f1e2603a470f077546c99c7f911832814689890 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 12 Dec 2022 17:43:24 -0500 Subject: [PATCH 04/28] just starting to prototype biscuit --- conf/modules.config | 32 ++++++++++++++++++++++++++ main.nf | 1 + nextflow_schema.json | 25 +++++++++++++++++---- subworkflows/local/biscuit.nf | 42 +++++++++++++++++++++++++++++++++++ workflows/methylseq.nf | 4 ++++ 5 files changed, 100 insertions(+), 4 deletions(-) create mode 100644 subworkflows/local/biscuit.nf diff --git a/conf/modules.config b/conf/modules.config index b2894593..71be7743 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -307,6 +307,38 @@ process { ] } + withName: BISCUIT_INDEX { + ext.args = '' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/reference_genome" }, + saveAs: { it =~ /.*\.yml/ ? null : it }, + mode: params.publish_dir_mode, + enabled: params.save_reference + ] + } + + withName: BISCUIT_BLASTER { + ext.args = '' + ext.args2 = { [ + meta.single_end ? "--ignoreUnmated" : "" + ].join(' ').trim() } + ext.args3 = '' + publishDir = [ + // [ + // path: { "${params.outdir}/${params.aligner}/alignments/unmapped" }, + // mode: params.publish_dir_mode, + // pattern: "*.fq.gz", + // enabled: params.unmapped + // ], + [ + path: { "${params.outdir}/${params.aligner}/alignments" }, + mode: params.publish_dir_mode, + pattern: "*.bam.*", + enabled: (params.save_align_intermeds || params.skip_deduplication || params.rrbs) + ] + ] + } + withName: PICARD_MARKDUPLICATES { ext.args = "--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --PROGRAM_RECORD_ID 'null' --TMP_DIR tmp" ext.prefix = { "${meta.id}.markdup.sorted" } diff --git a/main.nf b/main.nf index 9005c882..20493bfe 100644 --- a/main.nf +++ b/main.nf @@ -21,6 +21,7 @@ nextflow.enable.dsl = 2 params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta') params.fasta_index = WorkflowMain.getGenomeAttribute(params, 'fasta_index') params.bismark_index = WorkflowMain.getGenomeAttribute(params, 'bismark') +params.biscuit_index = WorkflowMain.getGenomeAttribute(params, 'biscuit') params.bwa_meth_index = WorkflowMain.getGenomeAttribute(params, 'bwa_meth') /* diff --git a/nextflow_schema.json b/nextflow_schema.json index 28f5ee3d..1151eccb 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,7 +10,10 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir"], + "required": [ + "input", + "outdir" + ], "properties": { "input": { "type": "string", @@ -141,7 +144,12 @@ "default": "bismark", "description": "Alignment tool to use.", "fa_icon": "fas fa-dot-circle", - "enum": ["bismark", "bismark_hisat", "bwameth"], + "enum": [ + "bismark", + "bismark_hisat", + "bwameth", + "biscuit" + ], "help_text": "The nf-core/methylseq package is actually two pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel) instead of Bismark. To run this workflow, run the pipeline with the command line flag `--aligner bwameth`." }, "comprehensive": { @@ -151,7 +159,9 @@ "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well." } }, - "required": ["aligner"], + "required": [ + "aligner" + ], "fa_icon": "fas fa-braille" }, "special_library_types": { @@ -418,7 +428,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"] + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ] }, "validate_params": { "type": "boolean", diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf new file mode 100644 index 00000000..111f4ef1 --- /dev/null +++ b/subworkflows/local/biscuit.nf @@ -0,0 +1,42 @@ +/* + * biscuit subworkflow + */ + +include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' +include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' + +workflow BISCUIT { + take: + reads // channel: [ val(meta), [ reads ] ] + + main: + versions = Channel.empty() + + /* + * Generate biscuit index if not supplied + */ + if (params.biscuit_index) { + biscuit_index = file(params.biscuit_index) + } else { + BISCUIT_INDEX(params.fasta) + biscuit_index = BISCUIT_INDEX.out.index + versions = versions.mix(BISCUIT_INDEX.out.versions) + } + + /* + * Align with biscuit + */ + BISCUIT_BLASTER ( + reads, + biscuit_index + ) + versions = versions.mix(BISCUIT_BLASTER.out.versions) + + multiqc_files = Channel.empty() + + emit: + bam = BISCUIT_BLASTER.out.bam + dedup = BISCUIT_BLASTER.out.bam + mqc = multiqc_files // path: *{html,txt} + versions +} diff --git a/workflows/methylseq.nf b/workflows/methylseq.nf index bd810135..172356bf 100644 --- a/workflows/methylseq.nf +++ b/workflows/methylseq.nf @@ -46,6 +46,10 @@ if( params.aligner =~ /bismark/ ){ else if ( params.aligner == 'bwameth' ){ include { BWAMETH as ALIGNER } from '../subworkflows/local/bwameth' } +// Aligner: biscuit +else if ( params.aligner == "biscuit" ){ + include { BISCUIT as ALIGNER } from '../subworkflows/local/biscuit' +} /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From a44715cf9ac0295148f3ec92a9df0b60c701c6a7 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:05:01 -0500 Subject: [PATCH 05/28] local change biscuit modules; hopefully upstream soon --- README.md | 35 +++--- modules.json | 4 + modules/nf-core/biscuit/align/main.nf | 46 ++++++++ modules/nf-core/biscuit/align/meta.yml | 108 ++++++++++++++++++ .../nf-core/biscuit/biscuitblaster/main.nf | 53 +++++++++ subworkflows/local/biscuit.nf | 25 ++-- 6 files changed, 245 insertions(+), 26 deletions(-) create mode 100644 modules/nf-core/biscuit/align/main.nf create mode 100644 modules/nf-core/biscuit/align/meta.yml diff --git a/README.md b/README.md index 1770c924..0314dfb9 100644 --- a/README.md +++ b/README.md @@ -22,23 +22,24 @@ On release, automated continuous integration tests run the pipeline on a full-si ## Pipeline Summary -The pipeline allows you to choose between running either [Bismark](https://github.com/FelixKrueger/Bismark) or [bwa-meth](https://github.com/brentp/bwa-meth) / [MethylDackel](https://github.com/dpryan79/methyldackel). -Choose between workflows by using `--aligner bismark` (default, uses bowtie2 for alignment), `--aligner bismark_hisat` or `--aligner bwameth`. - -| Step | Bismark workflow | bwa-meth workflow | -| -------------------------------------------- | ---------------- | --------------------- | -| Generate Reference Genome Index _(optional)_ | Bismark | bwa-meth | -| Merge re-sequenced FastQ files | cat | cat | -| Raw data QC | FastQC | FastQC | -| Adapter sequence trimming | Trim Galore! | Trim Galore! | -| Align Reads | Bismark | bwa-meth | -| Deduplicate Alignments | Bismark | Picard MarkDuplicates | -| Extract methylation calls | Bismark | MethylDackel | -| Sample report | Bismark | - | -| Summary Report | Bismark | - | -| Alignment QC | Qualimap | Qualimap | -| Sample complexity | Preseq | Preseq | -| Project Report | MultiQC | MultiQC | +The pipeline allows you to choose between running either [Bismark](https://github.com/FelixKrueger/Bismark), [bwa-meth](https://github.com/brentp/bwa-meth) / [MethylDackel](https://github.com/dpryan79/methyldackel), or [biscuit](https://huishenlab.github.io/biscuit/). +Choose between workflows by using `--aligner bismark` (default, uses bowtie2 for alignment), `--aligner bismark_hisat`, `--aligner bwameth`, or `--aligner biscuit`. + +| Step | Bismark workflow | bwa-meth workflow | Biscuit workflow | +| -------------------------------------------- | ---------------- | --------------------- | ---------------- | +| Generate Reference Genome Index _(optional)_ | Bismark | bwa-meth | Biscuit `index` | +| Merge re-sequenced FastQ files | cat | cat | cat | +| Raw data QC | FastQC | FastQC | FastQC | +| Adapter sequence trimming | Trim Galore! | Trim Galore! | Cutadapt | +| Align Reads | Bismark | bwa-meth | biscuit `align` | +| Deduplicate Alignments | Bismark | Picard MarkDuplicates | samblaster | +| Extract methylation calls | Bismark | MethylDackel | Biscuit `pileup` | +| Summarize methylation data to bsseq object | - | - | Biscuiteer | +| Sample report | Bismark | - | Biscuit `qc` | +| Summary Report | Bismark | - | Biscuit `qc` | +| Alignment QC | Qualimap | Qualimap | Qualimap | +| Sample complexity | Preseq | Preseq | Preseq | +| Project Report | MultiQC | MultiQC | MultiQC | ## Quick Start diff --git a/modules.json b/modules.json index aed81287..b6415609 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,10 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "biscuit/align": { + "branch": "master", + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + }, "biscuit/biscuitblaster": { "branch": "master", "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" diff --git a/modules/nf-core/biscuit/align/main.nf b/modules/nf-core/biscuit/align/main.nf new file mode 100644 index 00000000..b7f55e7b --- /dev/null +++ b/modules/nf-core/biscuit/align/main.nf @@ -0,0 +1,46 @@ +process BISCUIT_ALIGN { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': + 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.bam"), path("*.bai"), emit: indexed_bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + set -o pipefail + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit align \\ + $args \\ + -@ $biscuit_cpus \\ + \$INDEX \\ + $reads \\ + | samtools sort $args2 --threads $samtools_cpus --write-index -o ${prefix}.bam##idx##${prefix}.bam.bai - + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/align/meta.yml b/modules/nf-core/biscuit/align/meta.yml new file mode 100644 index 00000000..ad6d97f3 --- /dev/null +++ b/modules/nf-core/biscuit/align/meta.yml @@ -0,0 +1,108 @@ +name: biscuit_align +description: Aligns single- or paired-end reads from bisulfite-converted libraries to a reference genome using Biscuit. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of inpuname: biscuit_align +description: Aligns single- or paired-end reads from bisulfite-converted libraries to a reference genome using Biscuit. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/alignment + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - bai: + type: file + description: Output BAM index + pattern: "*.{bai}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" +t fastq files of size 1 and 2 for single-end and paired-end data, + respectively. + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf index d1c0e042..4d181832 100644 --- a/modules/nf-core/biscuit/biscuitblaster/main.nf +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -7,10 +7,63 @@ process BISCUIT_BLASTER { 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + input: + tuple val(meta), path(reads) + path indexprocess BISCUIT_BLASTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::biscuit=1.1.0.20220707 bioconda::samblaster=0.1.26 bioconda::samtools=1.16.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': + 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + input: tuple val(meta), path(reads) path index + output: + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.bam"), path("*.bai"), emit: indexed_bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def args3 = task.ext.args3 ?: '' + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) + def samtools_cpus = task.cpus-biscuit_cpus + """ + set -o pipefail + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit align \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $reads | \\ + samblaster \\ + $args2 | \\ + samtools sort \\ + -@ $samtools_cpus \\ + $args3 \\ + --write-index \\ + -o ${prefix}.bam##idx##${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' ) + END_VERSIONS + """ +} + + output: tuple val(meta), path("*.bam"), emit: bam tuple val(meta), path("*.bai"), emit: bai diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 111f4ef1..69eb64e1 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -3,7 +3,7 @@ */ include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' -include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' +include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' workflow BISCUIT { take: @@ -24,19 +24,26 @@ workflow BISCUIT { } /* - * Align with biscuit + * Align with biscuit; mark duplicates unless params.skip_deduplication */ - BISCUIT_BLASTER ( - reads, - biscuit_index - ) - versions = versions.mix(BISCUIT_BLASTER.out.versions) + if (params.skip_deduplication || params.rrbs){ + BISCUIT_ALIGN ( + reads, + biscuit_index + ) + versions = versions.mix(BISCUIT_ALIGN.out.versions) + } else { + BISCUIT_BLASTER ( + reads, + biscuit_index + ) + } multiqc_files = Channel.empty() emit: - bam = BISCUIT_BLASTER.out.bam - dedup = BISCUIT_BLASTER.out.bam + bam = BISCUIT_ALIGN.out.bam + dedup = BISCUIT_ALIGN.out.bam mqc = multiqc_files // path: *{html,txt} versions } From d6bcf6a74bc00a2a812c3cc6d8ed6b56981f9065 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:16:59 -0500 Subject: [PATCH 06/28] adding pileup --- modules.json | 8 +++ modules/nf-core/biscuit/pileup/main.nf | 45 ++++++++++++++++ modules/nf-core/biscuit/pileup/meta.yml | 70 +++++++++++++++++++++++++ modules/nf-core/biscuit/qc/main.nf | 40 ++++++++++++++ modules/nf-core/biscuit/qc/meta.yml | 51 ++++++++++++++++++ subworkflows/local/biscuit.nf | 36 ++++++++++++- 6 files changed, 248 insertions(+), 2 deletions(-) create mode 100644 modules/nf-core/biscuit/pileup/main.nf create mode 100644 modules/nf-core/biscuit/pileup/meta.yml create mode 100644 modules/nf-core/biscuit/qc/main.nf create mode 100644 modules/nf-core/biscuit/qc/meta.yml diff --git a/modules.json b/modules.json index b6415609..a336440b 100644 --- a/modules.json +++ b/modules.json @@ -17,6 +17,14 @@ "branch": "master", "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" }, + "biscuit/pileup": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c" + }, + "biscuit/qc": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c" + }, "bismark/align": { "branch": "master", "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" diff --git a/modules/nf-core/biscuit/pileup/main.nf b/modules/nf-core/biscuit/pileup/main.nf new file mode 100644 index 00000000..9cbd8982 --- /dev/null +++ b/modules/nf-core/biscuit/pileup/main.nf @@ -0,0 +1,45 @@ +process BISCUIT_PILEUP { + tag "$meta.id" + label 'process_high' + + conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15=h1170115_1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(normal_bams), path(normal_bais), path(tumor_bam), path(tumor_bai) + path index + + output: + tuple val(meta), path("*.vcf.gz"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) + def bgzip_cpus = task.cpus-biscuit_cpus + if ( tumor_bam != [] && normal_bams.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: Tumor BAM provided with more than one normal BAM" + if ( tumor_bam.toList().size() > 1 ) error "[BISCUIT_PILEUP] error: more than one tumor BAM provided" + input = ( tumor_bam==[] ) ? "${normal_bams}" : "-S -T ${tumor_bam} -I ${normal_bams}" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit pileup \\ + -@ $biscuit_cpus \\ + $args \\ + \$INDEX \\ + $input \\ + | bgzip -@ $bgzip_cpus $args2 > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/pileup/meta.yml b/modules/nf-core/biscuit/pileup/meta.yml new file mode 100644 index 00000000..87c3891a --- /dev/null +++ b/modules/nf-core/biscuit/pileup/meta.yml @@ -0,0 +1,70 @@ +name: biscuit_pileup +description: Computes cytosine methylation and callable SNV mutations, optionally in reference to a germline BAM to call somatic variants +keywords: + - bisulfite + - DNA methylation + - pileup + - variant calling + - WGBS + - scWGBS + - bam + - vcf +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/pileup.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - normal_bams: + type: file(s) + description: | + BAM files to be analyzed. If no tumor_bam file is provided, any number of "normal" BAMs may be provided + ("normal" here is just a semantic issue, these BAMs could be from tumor or any other kind of tissue). If a + tumor BAM file is provided, exactly one normal (germline) BAM must be provided. + pattern: "*.{bam}" + - normal_bais: + type: file(s) + description: BAM index file or files corresponding to the provided normal_bams + pattern: "*.{bai}" + - tumor_bam: + type: file(s) + description: | + Optional. If a tumor BAM file is provided, pileup will run in "somatic" mode and will annotate variants with + their somatic state (present in tumor only, present in normal only, present in both, etc). Note that if a + tumor BAM file is provided, exactly one normal BAM must be provided. + pattern: "*.{bam}" + - tumor_bai: + type: file(s) + description: Optional. BAM index file corresponding to provided tumor_bam + pattern: "*.{bai}" + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: vcf file with methylation information + pattern: "*.{vcf.gz}" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/qc/main.nf b/modules/nf-core/biscuit/qc/main.nf new file mode 100644 index 00000000..12f4d839 --- /dev/null +++ b/modules/nf-core/biscuit/qc/main.nf @@ -0,0 +1,40 @@ +process BISCUIT_QC { + tag "$meta.id" + label 'process_long' + + conda "bioconda::biscuit=1.0.2.20220113" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + tuple val(meta), path(bam) + path(index) + + output: + tuple val(meta), path("*.txt"), emit: biscuit_qc_reports + 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}" + def se = meta.single_end ? "-s" : "" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit qc \\ + $args \\ + $se \\ + \$INDEX \\ + $bam \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/qc/meta.yml b/modules/nf-core/biscuit/qc/meta.yml new file mode 100644 index 00000000..a3e65a90 --- /dev/null +++ b/modules/nf-core/biscuit/qc/meta.yml @@ -0,0 +1,51 @@ +name: biscuit_qc +description: Perform basic quality control on a BAM file generated with Biscuit +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - index + - BAM + - quality control + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file produced using Biscuit + +output: + - biscuit_qc_reports: + type: file + description: | + Summary files containing the following information: + - CpG retention by position in read + - CpH retention by position in read + - Read duplication statistics + - Insert size distribution + - Distribution of mapping qualities + - Proportion of reads mapping to each strand + - Read-averaged cytosine conversion rate for CpA, CpC, CpG, and CpT + pattern: "*.txt" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 69eb64e1..2726e9a9 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -2,8 +2,10 @@ * biscuit subworkflow */ -include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' -include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' +include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' +include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' +include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' +include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' workflow BISCUIT { take: @@ -32,13 +34,32 @@ workflow BISCUIT { biscuit_index ) versions = versions.mix(BISCUIT_ALIGN.out.versions) + alignments = BISCUIT_ALIGN.out.indexed_bam } else { BISCUIT_BLASTER ( reads, biscuit_index ) + versions = versions.mix(BISCUIT_BLASTER.out.versions) + alignments = BISCUIT_BLASTER.out.indexed_bam } + /* + * Extract methylation calls + */ + BISCUIT_PILEUP ( + alignments.map { + meta, bam, bai -> [ meta, bam, bai, [], [] ] // Supply empty lists for tumor bam/bai (optional inputs to pileup process) + }, + biscuit_index + ) + versions = versions.mix(BISCUIT_PILEUP.out.versions) + + /* + * QC alignments + */ + + multiqc_files = Channel.empty() emit: @@ -47,3 +68,14 @@ workflow BISCUIT { mqc = multiqc_files // path: *{html,txt} versions } + + +// TODO: +// methylation extraction +// samtools flagstat, stats +// reports +// multiqc + + + + From ab1a7d128e831e47a264e1c5d3f4d455b1a58483 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 14 Dec 2022 17:21:32 -0500 Subject: [PATCH 07/28] fix a bit of epic munging --- .../nf-core/biscuit/biscuitblaster/main.nf | 52 ------------------- subworkflows/local/biscuit.nf | 20 ++++--- 2 files changed, 13 insertions(+), 59 deletions(-) diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf index 4d181832..dea13907 100644 --- a/modules/nf-core/biscuit/biscuitblaster/main.nf +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -2,17 +2,6 @@ process BISCUIT_BLASTER { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113 bioconda::samblaster=0.1.26 bioconda::samtools=1.15=h1170115_1" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': - 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" - - input: - tuple val(meta), path(reads) - path indexprocess BISCUIT_BLASTER { - tag "$meta.id" - label 'process_high' - conda (params.enable_conda ? "bioconda::biscuit=1.1.0.20220707 bioconda::samblaster=0.1.26 bioconda::samtools=1.16.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': @@ -62,44 +51,3 @@ process BISCUIT_BLASTER { END_VERSIONS """ } - - - output: - tuple val(meta), path("*.bam"), emit: bam - tuple val(meta), path("*.bai"), emit: bai - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def prefix = task.ext.prefix ?: "${meta.id}" - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def args3 = task.ext.args3 ?: '' - def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) - def samtools_cpus = task.cpus-biscuit_cpus - """ - INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` - - biscuit align \\ - -@ $biscuit_cpus \\ - $args \\ - \$INDEX \\ - $reads | \\ - samblaster \\ - $args2 | \\ - samtools sort \\ - -@ $samtools_cpus \\ - $args3 \\ - --write-index \\ - -o ${prefix}.bam##idx##${prefix}.bam.bai - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) - samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) - samblaster: \$( samblaster --version |& sed 's/^.*samblaster: Version //' ) - END_VERSIONS - """ -} diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 2726e9a9..ae3b3068 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -2,10 +2,11 @@ * biscuit subworkflow */ -include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' -include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' -include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' -include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' +include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' +include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' +include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' +include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' +include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' workflow BISCUIT { take: @@ -58,13 +59,18 @@ workflow BISCUIT { /* * QC alignments */ - + // BISCUIT_QC ( + // alignments.map { + // meta, bam, bai -> [ meta, bam ] // remove bai index + // }, + // biscuit_index + // ) multiqc_files = Channel.empty() emit: - bam = BISCUIT_ALIGN.out.bam - dedup = BISCUIT_ALIGN.out.bam + bam = alignments + dedup = alignments mqc = multiqc_files // path: *{html,txt} versions } From 84748ae245f34277a7fb2b655f6d3f17a1b54959 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:49:47 -0500 Subject: [PATCH 08/28] filling out biscuit, changing some options --- nextflow.config | 5 +- subworkflows/local/biscuit.nf | 110 +++++++++++++++++++++++++++++----- 2 files changed, 99 insertions(+), 16 deletions(-) diff --git a/nextflow.config b/nextflow.config index a2b55c61..d4c8e997 100644 --- a/nextflow.config +++ b/nextflow.config @@ -33,6 +33,7 @@ params { // Alignment options aligner = 'bismark' comprehensive = false + merge_cg = true // Library presets pbat = false @@ -54,7 +55,6 @@ params { // Bismark options non_directional = false - cytosine_report = false relax_mismatches = false num_mismatches = 0.6 // 0.6 will allow a penalty of bp * -0.6 @@ -76,6 +76,9 @@ params { ignore_flags = false methyl_kit = false + // Biscuit options + bs_conv_filter = 0.1 + // Skipping options skip_trimming = false skip_deduplication = false diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index ae3b3068..efbb2d15 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -5,8 +5,15 @@ include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' +include { BISCUIT_BSCONV } from '../../modules/nf-core/biscuit/bsconv/main' include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' +include { BISCUIT_VCF2BED } from '../../modules/nf-core/biscuit/vcf2bed/main' +include { BISCUIT_MERGECG } from '../../modules/nf-core/biscuit/mergecg/main' include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' +if (params.nomeseq) { + include { BISCUIT_VCF2BED as BISCUIT_VCF2BED_NOME } from '../../modules/nf-core/biscuit/vcf2bed/main' + include { BISCUIT_MERGECG as BISCUIT_MERGECG_NOME } from '../../modules/nf-core/biscuit/mergecg/main' +} workflow BISCUIT { take: @@ -26,6 +33,15 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_INDEX.out.versions) } + /* + * If we're using the --pbat option, biscuit will be set to -b 1. + * However, that would force the reads to align to the opposite strands we want, + * so we have to reverse the read order in the list (read 2 first, then read 1) + */ + if (params.pbat) { + reads = reads.map{meta, reads -> meta.single_end ? [meta, reads] : [meta, reads.reverse()]} + } + /* * Align with biscuit; mark duplicates unless params.skip_deduplication */ @@ -35,42 +51,106 @@ workflow BISCUIT { biscuit_index ) versions = versions.mix(BISCUIT_ALIGN.out.versions) - alignments = BISCUIT_ALIGN.out.indexed_bam + alignments = BISCUIT_ALIGN.out.bam } else { BISCUIT_BLASTER ( reads, biscuit_index ) versions = versions.mix(BISCUIT_BLASTER.out.versions) - alignments = BISCUIT_BLASTER.out.indexed_bam + alignments = BISCUIT_BLASTER.out.bam } /* - * Extract methylation calls + * Filter out reads with poor bisulfite conversion + */ + if (params.skip_bs_conv_filter < 1) { + BISCUIT_BSCONV( + alignments, + biscuit_index + ) + alignments = BISCUIT_BSCONV.out.bsconv_bam + versions = versions.mix(BISCUIT_BSCONV.out.versions) + } + + /* + * Extract all snp and methlyation information */ BISCUIT_PILEUP ( - alignments.map { - meta, bam, bai -> [ meta, bam, bai, [], [] ] // Supply empty lists for tumor bam/bai (optional inputs to pileup process) - }, + alignments, biscuit_index ) versions = versions.mix(BISCUIT_PILEUP.out.versions) + /* + * Extract methlation information + */ + BISCUIT_VCF2BED ( + BISCUIT_PILEUP.out.vcf + ) + versions = versions.mix(BISCUIT_VCF2BED.out.versions) + + if (params.nomeseq) { + /* + * Extract accessibility information + */ + BISCUIT_VCF2BED_NOME ( + BISCUIT_PILEUP.out.vcf + ) + versions = versions.mix(BISCUIT_VCF2BED_NOME.out.versions) + + /* + * Merge information from neighboring C and G, where both are in HCGD context + */ + if (params.merge_cg) { + BISCUIT_MERGECG_NOME ( + BISCUIT_VCF2BED.out.bed, + biscuit_index + ) + me_bed = BISCUIT_MERGECG.out.bed + versions = versions.mix(BISCUIT_MERGECG.out.versions) + } else { + me_bed = BISCUIT_VCF2BED.out.bed + } + + } + + /* + * Merge information from neighboring C and G in CpG context + */ + if (params.merge_cg) { + BISCUIT_MERGECG ( + BISCUIT_VCF2BED.out.bed, + biscuit_index + ) + me_bed = BISCUIT_MERGECG.out.bed + versions = versions.mix(BISCUIT_MERGECG.out.versions) + } else { + me_bed = BISCUIT_VCF2BED.out.bed + } + /* * QC alignments */ - // BISCUIT_QC ( - // alignments.map { - // meta, bam, bai -> [ meta, bam ] // remove bai index - // }, - // biscuit_index - // ) + BISCUIT_QC ( + alignments, + biscuit_index + ) + versions = versions.mix(BISCUIT_QC.out.versions) - multiqc_files = Channel.empty() + /* + * Collect MultiQC inputs + */ + if (!params.skip_multiqc) { + BISCUIT_QC.out.biscuit_qc_reports.collect{ it[1] } + .set{ multiqc_files } + } else { + multiqc_files = Channel.empty() + } emit: - bam = alignments - dedup = alignments + bam = alignments.map{meta, bam, bai -> [ meta, bam]} + dedup = alignments.map{meta, bam, bai -> [ meta, bam]} mqc = multiqc_files // path: *{html,txt} versions } From 41e873d2ad3bc10cef3bb7de3030df7a8e9e4413 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:55:44 -0500 Subject: [PATCH 09/28] params update --- README.md | 1 - conf/modules.config | 113 +++++++++++++++++++++-- modules.json | 105 +++++++++++++++------ modules/nf-core/biscuit/bsconv/main.nf | 39 ++++++++ modules/nf-core/biscuit/bsconv/meta.yml | 55 +++++++++++ modules/nf-core/biscuit/mergecg/main.nf | 43 +++++++++ modules/nf-core/biscuit/mergecg/meta.yml | 51 ++++++++++ modules/nf-core/biscuit/vcf2bed/main.nf | 39 ++++++++ modules/nf-core/biscuit/vcf2bed/meta.yml | 48 ++++++++++ nextflow_schema.json | 75 ++++++++------- subworkflows/local/bismark.nf | 2 +- tests/bismark/main.nf.test | 4 +- 12 files changed, 502 insertions(+), 73 deletions(-) create mode 100644 modules/nf-core/biscuit/bsconv/main.nf create mode 100644 modules/nf-core/biscuit/bsconv/meta.yml create mode 100644 modules/nf-core/biscuit/mergecg/main.nf create mode 100644 modules/nf-core/biscuit/mergecg/meta.yml create mode 100644 modules/nf-core/biscuit/vcf2bed/main.nf create mode 100644 modules/nf-core/biscuit/vcf2bed/meta.yml diff --git a/README.md b/README.md index 0314dfb9..fa78b664 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Choose between workflows by using `--aligner bismark` (default, uses bowtie2 for | Align Reads | Bismark | bwa-meth | biscuit `align` | | Deduplicate Alignments | Bismark | Picard MarkDuplicates | samblaster | | Extract methylation calls | Bismark | MethylDackel | Biscuit `pileup` | -| Summarize methylation data to bsseq object | - | - | Biscuiteer | | Sample report | Bismark | - | Biscuit `qc` | | Summary Report | Bismark | - | Biscuit `qc` | | Alignment QC | Qualimap | Qualimap | Qualimap | diff --git a/conf/modules.config b/conf/modules.config index 71be7743..d9169c52 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -317,19 +317,30 @@ process { ] } + withName: BISCUIT_ALIGN { + ext.args = { [ + (params.pbat || !params.non_directional) ? '-b 1' : '', + ].join(' ').trim() } + ext.args2 = '' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/alignments" }, + mode: params.publish_dir_mode, + pattern: "*.bam.*", + enabled: (params.save_align_intermeds || params.skip_deduplication || params.rrbs) + ] + ] + } + withName: BISCUIT_BLASTER { - ext.args = '' + ext.args = { [ + (params.pbat || !params.non_directional) ? '-b 1' : '', + ].join(' ').trim() } ext.args2 = { [ meta.single_end ? "--ignoreUnmated" : "" ].join(' ').trim() } ext.args3 = '' publishDir = [ - // [ - // path: { "${params.outdir}/${params.aligner}/alignments/unmapped" }, - // mode: params.publish_dir_mode, - // pattern: "*.fq.gz", - // enabled: params.unmapped - // ], [ path: { "${params.outdir}/${params.aligner}/alignments" }, mode: params.publish_dir_mode, @@ -339,6 +350,94 @@ process { ] } + withName: BISCUIT_BSCONV { + ext.args = { "-f ${params.bs_conv_filter}" } + } + + withName: BISCUIT_PILEUP { + errorStrategy = 'retry' + maxRetries = 3 + ext.args = { [ + (params.no_overlap) ? '' : '-d', + (params.nomeseq) ? 'N' : '' + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/methylation_calls/" }, + mode: params.publish_dir_mode, + pattern: "*.vcf.gz" + ] + } + + withName: BISCUIT_VCF2BED { + ext.args = { [ + (params.meth_cutoff > 0) ? "-k ${params.meth_cutoff}" : '-k 1', + (params.comprehensive) ? '-t c' : '', + (params.nomeseq) ? '-t hcg' : '' + ].join(' ').trim() } + publishDir = [ + enabled: !params.merge_cg + ] + } + + withName: BISCUIT_VCF2BED_NOME { + ext.args = { [ + (params.meth_cutoff > 0) ? "-k ${params.meth_cutoff}" : '-k 1', + (params.nomeseq) ? '-t gch' : '' + ].join(' ').trim() } + } + + withName: BISCUIT_MERGECG { + ext.args = '' + publishDir = [ + enabled: params.merge_cg + ] + } + + withName: BISCUIT_MERGECG_NOME { + ext.args = '-N' + } + + withName: BISCUIT_QC { + ext.args = '' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/qc/mbias/cpg" }, + mode: params.publish_dir_mode, + pattern: "*_CpGRetentionByReadPos.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/mbias/cph" }, + mode: params.publish_dir_mode, + pattern: "*_CpHRetentionByReadPos.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/dup_report/" }, + mode: params.publish_dir_mode, + pattern: "*_dup_report.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/insert_size/" }, + mode: params.publish_dir_mode, + pattern: "*_isize_table.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/mapping_qual/" }, + mode: params.publish_dir_mode, + pattern: "*_mapq_table.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/mapping_strand/" }, + mode: params.publish_dir_mode, + pattern: "*_strand_table.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/qc/conversion/" }, + mode: params.publish_dir_mode, + pattern: "*_totalReadConversionRate.txt" + ], + ] + } + withName: PICARD_MARKDUPLICATES { ext.args = "--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --PROGRAM_RECORD_ID 'null' --TMP_DIR tmp" ext.prefix = { "${meta.id}.markdup.sorted" } diff --git a/modules.json b/modules.json index a336440b..de2a57d4 100644 --- a/modules.json +++ b/modules.json @@ -7,123 +7,168 @@ "nf-core": { "biscuit/align": { "branch": "master", - "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4", + "installed_by": ["modules"] }, "biscuit/biscuitblaster": { "branch": "master", - "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4" + "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4", + "installed_by": ["modules"] + }, + "biscuit/bsconv": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] }, "biscuit/index": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] + }, + "biscuit/mergecg": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] }, "biscuit/pileup": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c" + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] }, "biscuit/qc": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c" + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] + }, + "biscuit/vcf2bed": { + "branch": "master", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "installed_by": ["modules"] }, "bismark/align": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/coverage2cytosine": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/deduplicate": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/genomepreparation": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/methylationextractor": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/report": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bismark/summary": { "branch": "master", - "git_sha": "e84cc8f07607ad7970db9b6cf79b815b78d9cacd" + "git_sha": "e84cc8f07607ad7970db9b6cf79b815b78d9cacd", + "installed_by": ["modules"] }, "bwameth/align": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "bwameth/index": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0" + "git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0", + "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "3dd73937b084b547f9272bc901e0f120a7913fd8" + "git_sha": "3dd73937b084b547f9272bc901e0f120a7913fd8", + "installed_by": ["modules"] }, "methyldackel/extract": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "methyldackel/mbias": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5" + "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "picard/markduplicates": { "branch": "master", - "git_sha": "eca65aa4a5e2e192ac44d6962c8f9260f314ffb8" + "git_sha": "eca65aa4a5e2e192ac44d6962c8f9260f314ffb8", + "installed_by": ["modules"] }, "preseq/lcextrap": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "qualimap/bamqc": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "qualimap/bamqccram": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "installed_by": ["modules"] }, "trimgalore": { "branch": "master", - "git_sha": "b51a69e30973c71950225c817ad07a3337d22c40" + "git_sha": "b51a69e30973c71950225c817ad07a3337d22c40", + "installed_by": ["modules"] } } } diff --git a/modules/nf-core/biscuit/bsconv/main.nf b/modules/nf-core/biscuit/bsconv/main.nf new file mode 100644 index 00000000..c335d24e --- /dev/null +++ b/modules/nf-core/biscuit/bsconv/main.nf @@ -0,0 +1,39 @@ +process BISCUIT_BSCONV { + tag "$meta.id" + label 'process_long' + + conda "bioconda::biscuit=1.0.2.20220113" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': + 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + + input: + tuple val(meta), path(bam), path(bai) + path(index) + + output: + tuple val(meta), path("*.bam"), emit: bsconv_bam + 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}" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit bsconv \\ + $args \\ + \$INDEX \\ + $bam \\ + ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/bsconv/meta.yml b/modules/nf-core/biscuit/bsconv/meta.yml new file mode 100644 index 00000000..fa05ee47 --- /dev/null +++ b/modules/nf-core/biscuit/bsconv/meta.yml @@ -0,0 +1,55 @@ +name: biscuit_bsconv +description: Summarize and/or filter reads based on bisulfite conversion rate +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bam + - filter + +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-bsconv + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file contained mapped reads + - bai: + type: file + description: BAM file index + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bsconv_bam: + type: file + description: Output BAM file containing filtered read alignments + pattern: "*.{bam}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/mergecg/main.nf b/modules/nf-core/biscuit/mergecg/main.nf new file mode 100644 index 00000000..9588ac02 --- /dev/null +++ b/modules/nf-core/biscuit/mergecg/main.nf @@ -0,0 +1,43 @@ +process BISCUIT_MERGECG { + tag "$meta.id" + label 'process_long' + + conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15=h1170115_1" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(bed) + path index + + output: + tuple val(meta), path("*.bed.gz"), emit: mergecg_bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` + + biscuit mergecg \\ + $args \\ + \$INDEX \\ + $bed | \\ + LC_ALL=C sort -k1,1 -k2,2n | \\ + bgzip \\ + $args2 \\ + -c > ${prefix}.bed.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$( biscuit version |& sed '1!d; s/^.*BISCUIT Version: //' ) + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/mergecg/meta.yml b/modules/nf-core/biscuit/mergecg/meta.yml new file mode 100644 index 00000000..25f6b9e2 --- /dev/null +++ b/modules/nf-core/biscuit/mergecg/meta.yml @@ -0,0 +1,51 @@ +name: biscuit_mergecg +description: Merges methylation information for opposite-strand C's in a CpG context +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - bed +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: | + Biscuit BED file (output of biscuit vcf2bed) + - index: + type: dir + description: Biscuit genome index directory (generated with 'biscuit index') + pattern: "BiscuitIndex" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - mergecg_bed: + type: file + description: Gzipped BED file with merged methylation information + pattern: "*.bed.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/modules/nf-core/biscuit/vcf2bed/main.nf b/modules/nf-core/biscuit/vcf2bed/main.nf new file mode 100644 index 00000000..6c5f72f1 --- /dev/null +++ b/modules/nf-core/biscuit/vcf2bed/main.nf @@ -0,0 +1,39 @@ +process BISCUIT_VCF2BED { + tag "$meta.id" + label 'process_long' + + conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': + 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + + input: + tuple val(meta), path(vcf) + + output: + tuple val(meta), path("*.bed.gz"), emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + biscuit vcf2bed \\ + $args \\ + $vcf | \\ + LC_ALL=C sort -k1,1 -k2,2n | \\ + bgzip \\ + $args2 \\ + -c > ${prefix}.bed.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + biscuit: \$(echo \$(biscuit version 2>&1) | sed 's/^.*BISCUIT Version: //; s/Using.*\$//') + samtools: \$( samtools --version |& sed '1!d; s/^.*samtools //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/biscuit/vcf2bed/meta.yml b/modules/nf-core/biscuit/vcf2bed/meta.yml new file mode 100644 index 00000000..c34d5a4d --- /dev/null +++ b/modules/nf-core/biscuit/vcf2bed/meta.yml @@ -0,0 +1,48 @@ +name: biscuit_vcf2bed +description: | + Summarizes methylation or SNV information from a Biscuit VCF in a + standard-compliant BED file. +keywords: + - biscuit + - DNA methylation + - WGBS + - scWGBS + - bisulfite sequencing + - aligner + - vcf +tools: + - biscuit: + description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data + homepage: https://huishenlab.github.io/biscuit/ + documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html + tool_dev_url: https://github.com/huishenlab/biscuit + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: Biscuit vcf file (output of biscuit pileup) + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bed: + type: file + description: Gzipped BED file with methylation or SNV information + pattern: "*.{bed.gz}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@njspix" diff --git a/nextflow_schema.json b/nextflow_schema.json index 1151eccb..7cea4da8 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -157,6 +157,32 @@ "description": "Output information for all cytosine contexts.", "fa_icon": "fas fa-arrows-alt", "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well." + }, + "merge_cg": { + "type": "boolean", + "description": "Bismark: output stranded cytosine report. Biscuit: don't merge data from neighboring C and G in CpG context", + "help_text": "By default, Bismark does not produce stranded calls. With this option the output considers all Cs on both forward and reverse strands and reports their position, strand, trinucleotide context and methylation state.", + "fa_icon": "fas fa-clipboard", + "default": true + }, + "no_overlap": { + "type": "boolean", + "default": true, + "description": "Ignore read 2 methylation when it overlaps read 1", + "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. ", + "fa_icon": "fas fa-allergies" + }, + "non_directional": { + "type": "boolean", + "description": "Run alignment against all four possible strands.", + "help_text": "By default, Bismark assumes that libraries are directional and does not align against complementary strands. If your library prep was not directional, use `--non_directional` to align against all four possible strands.\n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", + "fa_icon": "fas fa-exchange-alt" + }, + "meth_cutoff": { + "type": "integer", + "description": "Specify a minimum read coverage to report a methylation call", + "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", + "fa_icon": "fas fa-angle-double-down" } }, "required": [ @@ -223,6 +249,12 @@ "fa_icon": "fas fa-cut", "description": "Trimming preset for the Zymo kit.", "help_text": "Equivalent to `--clip_r1 10` `--clip_r2 15` `--three_prime_clip_r1 10` `--three_prime_clip_r2 10`.\n\nAlso sets the `--non_directional` flag for Bismark." + }, + "nomeseq": { + "type": "boolean", + "fa_icon": "fas fa-dna", + "description": "Sample is NOMe-seq or NMT-seq. Runs coverage2cytosine.", + "help_text": "Sets `--CX` during methylation extraction and `--nome` during the `coverage2cytosine` step.\n\nWill also force the coverage2cytosine step to run." } }, "fa_icon": "fas fa-prescription-bottle" @@ -273,18 +305,6 @@ "default": "", "fa_icon": "fas fa-circle", "properties": { - "non_directional": { - "type": "boolean", - "description": "Run alignment against all four possible strands.", - "help_text": "By default, Bismark assumes that libraries are directional and does not align against complementary strands. If your library prep was not directional, use `--non_directional` to align against all four possible strands.\n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", - "fa_icon": "fas fa-exchange-alt" - }, - "cytosine_report": { - "type": "boolean", - "description": "Output stranded cytosine report, following Bismark's bismark_methylation_extractor step.", - "help_text": "By default, Bismark does not produce stranded calls. With this option the output considers all Cs on both forward and reverse strands and reports their position, strand, trinucleotide context and methylation state.", - "fa_icon": "fas fa-clipboard" - }, "relax_mismatches": { "type": "boolean", "description": "Turn on to relax stringency for alignment (set allowed penalty with --num_mismatches).", @@ -298,19 +318,6 @@ "help_text": "Customise the penalty in the function used to filter reads based on mismatches. The parameter `--relax_mismatches` must also be specified.\n\nSee the parameter documentation for `--relax_mismatches` for an explanation.", "fa_icon": "fas fa-calculator" }, - "meth_cutoff": { - "type": "integer", - "description": "Specify a minimum read coverage to report a methylation call", - "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", - "fa_icon": "fas fa-angle-double-down" - }, - "no_overlap": { - "type": "boolean", - "default": true, - "description": "Ignore read 2 methylation when it overlaps read 1", - "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. ", - "fa_icon": "fas fa-allergies" - }, "ignore_r2": { "type": "integer", "default": 2, @@ -348,12 +355,6 @@ "fa_icon": "fas fa-expand-alt", "description": "The maximum insert size for valid paired-end alignments.", "help_text": "For example, if `--maxins 100` is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as `--minins` is also satisfied). A 61-bp gap would not be valid in that case.\n\nDefault: not specified. Bismark default: `500`." - }, - "nomeseq": { - "type": "boolean", - "fa_icon": "fas fa-dna", - "description": "Sample is NOMe-seq or NMT-seq. Runs coverage2cytosine.", - "help_text": "Sets `--CX` during methylation extraction and `--nome` during the `coverage2cytosine` step.\n\nWill also force the coverage2cytosine step to run." } } }, @@ -641,5 +642,15 @@ { "$ref": "#/definitions/institutional_config_options" } - ] + ], + "properties": { + "bs_conv_filter": { + "type": "number", + "default": 0.1 + }, + "biscuit_index": { + "type": "string", + "default": null + } + } } diff --git a/subworkflows/local/bismark.nf b/subworkflows/local/bismark.nf index c219432c..644da702 100644 --- a/subworkflows/local/bismark.nf +++ b/subworkflows/local/bismark.nf @@ -73,7 +73,7 @@ workflow BISMARK { /* * Run coverage2cytosine */ - if (params.cytosine_report || params.nomeseq) { + if (!params.merge_cg || params.nomeseq) { BISMARK_COVERAGE2CYTOSINE ( BISMARK_METHYLATIONEXTRACTOR.out.coverage, bismark_index diff --git a/tests/bismark/main.nf.test b/tests/bismark/main.nf.test index e84229dc..3949abba 100644 --- a/tests/bismark/main.nf.test +++ b/tests/bismark/main.nf.test @@ -30,7 +30,7 @@ nextflow_pipeline { aligner = "bismark" // Generated by previous test bismark_index = "$outputDir/bismark/reference_genome/BismarkIndex/" - cytosine_report = true + merge_cg = false outdir = "$outputDir" } } @@ -69,7 +69,7 @@ nextflow_pipeline { save_reference = true // Generated by previous test bismark_index = "$outputDir/bismark/reference_genome/BismarkIndex/" - cytosine_report = true + merge_cg = false outdir = "$outputDir" } } From 7691ea3d2adef6a97ccf2c91b14bd6b6e739ae2a Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Thu, 15 Dec 2022 14:00:04 -0500 Subject: [PATCH 10/28] more params tweaks --- nextflow_schema.json | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 7cea4da8..15ba7053 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -117,6 +117,11 @@ "help_text": "Directory for a bwa-meth genome reference index. Only used when using the bwa-meth aligner.\n\nNote that this is not a complete path, but the directory containing the reference. For example, if you have file paths such as `/path/to/ref/genome.fa.bwameth.c2t.bwt`, you should specify `/path/to/ref/`.", "fa_icon": "far fa-dot-circle" }, + "biscuit_index": { + "type": "string", + "fa_icon": "fas fa-cookie-bite", + "description": "Path to a directory containing a Biscuit reference index" + }, "igenomes_base": { "type": "string", "description": "Directory / URL base for iGenomes references.", @@ -385,6 +390,19 @@ }, "fa_icon": "far fa-circle" }, + "biscuit_options": { + "title": "Biscuit options", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-cookie-bite", + "properties": { + "bs_conv_filter": { + "type": "number", + "default": 0.1 + } + } + }, "skip_pipeline_steps": { "title": "Skip pipeline steps", "type": "object", @@ -630,6 +648,9 @@ { "$ref": "#/definitions/bwa_meth_options" }, + { + "$ref": "#/definitions/biscuit_options" + }, { "$ref": "#/definitions/skip_pipeline_steps" }, @@ -642,15 +663,5 @@ { "$ref": "#/definitions/institutional_config_options" } - ], - "properties": { - "bs_conv_filter": { - "type": "number", - "default": 0.1 - }, - "biscuit_index": { - "type": "string", - "default": null - } - } + ] } From 2470c546dfec74b3ce4ecc3d87282c4109ff3633 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Thu, 15 Dec 2022 17:07:03 -0500 Subject: [PATCH 11/28] more tweaks --- conf/modules.config | 27 +++++++++++-- subworkflows/local/biscuit.nf | 72 ++++++++++++++++++----------------- 2 files changed, 62 insertions(+), 37 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index d9169c52..5181f855 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -351,6 +351,7 @@ process { } withName: BISCUIT_BSCONV { + ext.prefix = { "${meta.id}_bsconv" } ext.args = { "-f ${params.bs_conv_filter}" } } @@ -359,7 +360,7 @@ process { maxRetries = 3 ext.args = { [ (params.no_overlap) ? '' : '-d', - (params.nomeseq) ? 'N' : '' + (params.nomeseq) ? '-N' : '' ].join(' ').trim() } publishDir = [ path: { "${params.outdir}/${params.aligner}/methylation_calls/" }, @@ -375,7 +376,10 @@ process { (params.nomeseq) ? '-t hcg' : '' ].join(' ').trim() } publishDir = [ - enabled: !params.merge_cg + path: { "${params.outdir}/${params.aligner}/meth_data/" }, + mode: params.publish_dir_mode, + enabled: !params.merge_cg, + pattern: "*.bed" ] } @@ -384,17 +388,34 @@ process { (params.meth_cutoff > 0) ? "-k ${params.meth_cutoff}" : '-k 1', (params.nomeseq) ? '-t gch' : '' ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/acessibility_data/" }, + mode: params.publish_dir_mode, + enabled: !params.merge_cg, + pattern: "*.bed" + ] } withName: BISCUIT_MERGECG { + ext.prefix = { "${meta.id}_mergecg" } ext.args = '' publishDir = [ - enabled: params.merge_cg + path: { "${params.outdir}/${params.aligner}/meth_data/" }, + mode: params.publish_dir_mode, + enabled: params.merge_cg, + pattern: "*.bed" ] } withName: BISCUIT_MERGECG_NOME { + ext.prefix = { "${meta.id}_mergecg" } ext.args = '-N' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/acessibility_data/" }, + mode: params.publish_dir_mode, + enabled: params.merge_cg, + pattern: "*.bed" + ] } withName: BISCUIT_QC { diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index efbb2d15..872dda65 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -6,10 +6,11 @@ include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' include { BISCUIT_BSCONV } from '../../modules/nf-core/biscuit/bsconv/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' -include { BISCUIT_VCF2BED } from '../../modules/nf-core/biscuit/vcf2bed/main' -include { BISCUIT_MERGECG } from '../../modules/nf-core/biscuit/mergecg/main' include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' +include { BISCUIT_VCF2BED as BISCUIT_VCF2BED_METH } from '../../modules/nf-core/biscuit/vcf2bed/main' +include { BISCUIT_MERGECG as BISCUIT_MERGECG_METH } from '../../modules/nf-core/biscuit/mergecg/main' if (params.nomeseq) { include { BISCUIT_VCF2BED as BISCUIT_VCF2BED_NOME } from '../../modules/nf-core/biscuit/vcf2bed/main' include { BISCUIT_MERGECG as BISCUIT_MERGECG_NOME } from '../../modules/nf-core/biscuit/mergecg/main' @@ -51,33 +52,41 @@ workflow BISCUIT { biscuit_index ) versions = versions.mix(BISCUIT_ALIGN.out.versions) - alignments = BISCUIT_ALIGN.out.bam + alignments = BISCUIT_ALIGN.out.indexed_bam } else { BISCUIT_BLASTER ( reads, biscuit_index ) versions = versions.mix(BISCUIT_BLASTER.out.versions) - alignments = BISCUIT_BLASTER.out.bam + alignments = BISCUIT_BLASTER.out.indexed_bam } /* * Filter out reads with poor bisulfite conversion */ - if (params.skip_bs_conv_filter < 1) { - BISCUIT_BSCONV( + if (params.bs_conv_filter < 1) { + BISCUIT_BSCONV ( alignments, biscuit_index ) - alignments = BISCUIT_BSCONV.out.bsconv_bam + + SAMTOOLS_INDEX ( BISCUIT_BSCONV.out.bsconv_bam ) + + BISCUIT_BSCONV.out.bsconv_bam + .mix(SAMTOOLS_INDEX.out.bai) + .groupTuple(by: 0, size: 2) + .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } + .set{ alignments } versions = versions.mix(BISCUIT_BSCONV.out.versions) + versions = versions.mix(SAMTOOLS_INDEX.out.versions) } /* * Extract all snp and methlyation information */ BISCUIT_PILEUP ( - alignments, + alignments.map{ meta, bam, bai -> [ meta, bam, bai, [], [] ] }, // add in blank lists for paired 'tumor' bam and index biscuit_index ) versions = versions.mix(BISCUIT_PILEUP.out.versions) @@ -85,55 +94,50 @@ workflow BISCUIT { /* * Extract methlation information */ - BISCUIT_VCF2BED ( + BISCUIT_VCF2BED_METH ( BISCUIT_PILEUP.out.vcf ) - versions = versions.mix(BISCUIT_VCF2BED.out.versions) + versions = versions.mix(BISCUIT_VCF2BED_METH.out.versions) + /* + * Extract accessibility information + */ if (params.nomeseq) { - /* - * Extract accessibility information - */ BISCUIT_VCF2BED_NOME ( BISCUIT_PILEUP.out.vcf ) + nome_bed = BISCUIT_VCF2BED_NOME.out.bed versions = versions.mix(BISCUIT_VCF2BED_NOME.out.versions) - - /* - * Merge information from neighboring C and G, where both are in HCGD context - */ - if (params.merge_cg) { - BISCUIT_MERGECG_NOME ( - BISCUIT_VCF2BED.out.bed, - biscuit_index - ) - me_bed = BISCUIT_MERGECG.out.bed - versions = versions.mix(BISCUIT_MERGECG.out.versions) - } else { - me_bed = BISCUIT_VCF2BED.out.bed - } - } /* * Merge information from neighboring C and G in CpG context */ if (params.merge_cg) { - BISCUIT_MERGECG ( - BISCUIT_VCF2BED.out.bed, + BISCUIT_MERGECG_METH ( + BISCUIT_VCF2BED_METH.out.bed, biscuit_index ) - me_bed = BISCUIT_MERGECG.out.bed - versions = versions.mix(BISCUIT_MERGECG.out.versions) + me_bed = BISCUIT_MERGECG_METH.out.mergecg_bed + versions = versions.mix(BISCUIT_MERGECG_METH.out.versions) + + if (params.nomeseq) { + BISCUIT_MERGECG_NOME ( + BISCUIT_VCF2BED_NOME.out.bed, + biscuit_index + ) + nome_bed = BISCUIT_MERGECG_NOME.out.mergecg_bed + versions = versions.mix(BISCUIT_MERGECG_NOME.out.versions) + } } else { - me_bed = BISCUIT_VCF2BED.out.bed + me_bed = BISCUIT_VCF2BED_METH.out.bed } /* * QC alignments */ BISCUIT_QC ( - alignments, + alignments.map{meta, bam, bai -> [meta, bam]}, biscuit_index ) versions = versions.mix(BISCUIT_QC.out.versions) From 96039c57dac0af733da4bb78ff5542bfe354aac0 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:48:42 -0500 Subject: [PATCH 12/28] install njspix biscuit modules (temp) --- modules.json | 26 ++++++---- modules/nf-core/biscuit/align/main.nf | 9 ++-- modules/nf-core/biscuit/align/meta.yml | 52 ------------------- .../nf-core/biscuit/biscuitblaster/main.nf | 9 ++-- subworkflows/local/biscuit.nf | 12 ++++- 5 files changed, 34 insertions(+), 74 deletions(-) diff --git a/modules.json b/modules.json index de2a57d4..ac57dfad 100644 --- a/modules.json +++ b/modules.json @@ -5,16 +5,6 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { - "biscuit/align": { - "branch": "master", - "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4", - "installed_by": ["modules"] - }, - "biscuit/biscuitblaster": { - "branch": "master", - "git_sha": "653588be2a4aadab487b530643dbc9baf7a485c4", - "installed_by": ["modules"] - }, "biscuit/bsconv": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", @@ -172,6 +162,22 @@ } } } + }, + "https://github.com/njspix/modules": { + "modules": { + "nf-core": { + "biscuit/align": { + "branch": "master", + "git_sha": "ff4a08b5155b1e21d782bba7984a2169a6515d77", + "installed_by": ["modules"] + }, + "biscuit/biscuitblaster": { + "branch": "master", + "git_sha": "086027e28e2cdccf2fd5f6c9914c80c76bfbb61d", + "installed_by": ["modules"] + } + } + } } } } diff --git a/modules/nf-core/biscuit/align/main.nf b/modules/nf-core/biscuit/align/main.nf index b7f55e7b..a5fb9ed7 100644 --- a/modules/nf-core/biscuit/align/main.nf +++ b/modules/nf-core/biscuit/align/main.nf @@ -2,7 +2,7 @@ process BISCUIT_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" : null) + conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" @@ -12,9 +12,9 @@ process BISCUIT_ALIGN { path index output: - tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bam"), path("*.bai"), emit: indexed_bam - path "versions.yml" , emit: versions + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -26,7 +26,6 @@ process BISCUIT_ALIGN { def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.9),1) def samtools_cpus = task.cpus-biscuit_cpus """ - set -o pipefail INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` biscuit align \\ diff --git a/modules/nf-core/biscuit/align/meta.yml b/modules/nf-core/biscuit/align/meta.yml index ad6d97f3..c396ee05 100644 --- a/modules/nf-core/biscuit/align/meta.yml +++ b/modules/nf-core/biscuit/align/meta.yml @@ -17,34 +17,6 @@ tools: doi: "" licence: ["MIT"] -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of inpuname: biscuit_align -description: Aligns single- or paired-end reads from bisulfite-converted libraries to a reference genome using Biscuit. -keywords: - - biscuit - - DNA methylation - - WGBS - - scWGBS - - bisulfite sequencing - - aligner - - bam -tools: - - biscuit: - description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data - homepage: https://huishenlab.github.io/biscuit/ - documentation: https://huishenlab.github.io/biscuit/docs/alignment - tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" - licence: ["MIT"] - input: - meta: type: map @@ -82,27 +54,3 @@ output: authors: - "@njspix" -t fastq files of size 1 and 2 for single-end and paired-end data, - respectively. - - index: - type: dir - description: Biscuit genome index directory (generated with 'biscuit index') - pattern: "BiscuitIndex" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@njspix" diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf index dea13907..96f428c0 100644 --- a/modules/nf-core/biscuit/biscuitblaster/main.nf +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -2,7 +2,7 @@ process BISCUIT_BLASTER { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::biscuit=1.1.0.20220707 bioconda::samblaster=0.1.26 bioconda::samtools=1.16.1" : null) + conda "bioconda::biscuit=1.1.0.20220707 bioconda::samblaster=0.1.26 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" @@ -12,9 +12,9 @@ process BISCUIT_BLASTER { path index output: - tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bam"), path("*.bai"), emit: indexed_bam - path "versions.yml" , emit: versions + tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.bai"), emit: bai + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -27,7 +27,6 @@ process BISCUIT_BLASTER { def biscuit_cpus = (int) Math.max(Math.floor(task.cpus*0.95),1) def samtools_cpus = task.cpus-biscuit_cpus """ - set -o pipefail INDEX=`find -L ./ -name "*.bis.amb" | sed 's/\\.bis.amb\$//'` biscuit align \\ diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 872dda65..9db1784d 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -52,14 +52,22 @@ workflow BISCUIT { biscuit_index ) versions = versions.mix(BISCUIT_ALIGN.out.versions) - alignments = BISCUIT_ALIGN.out.indexed_bam + BISCUIT_ALIGN.out.bam + .mix(BISCUIT_ALIGN.out.bai) + .groupTuple(by: 0, size: 2) + .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } + .set{ alignments } } else { BISCUIT_BLASTER ( reads, biscuit_index ) versions = versions.mix(BISCUIT_BLASTER.out.versions) - alignments = BISCUIT_BLASTER.out.indexed_bam + BISCUIT_BLASTER.out.bam + .mix(BISCUIT_BLASTER.out.bai) + .groupTuple(by: 0, size: 2) + .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } + .set{ alignments } } /* From c42d4b44ddf118e01c7ec0a66f7b58c1162bdcf1 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 19 Dec 2022 11:57:36 -0500 Subject: [PATCH 13/28] module updates --- modules.json | 88 +++++++++---------- modules/nf-core/biscuit/bsconv/main.nf | 7 +- modules/nf-core/biscuit/index/main.nf | 6 +- modules/nf-core/biscuit/mergecg/main.nf | 7 +- modules/nf-core/biscuit/pileup/main.nf | 6 +- modules/nf-core/biscuit/qc/main.nf | 6 +- modules/nf-core/biscuit/vcf2bed/main.nf | 6 +- modules/nf-core/bismark/align/main.nf | 2 +- .../nf-core/bismark/coverage2cytosine/main.nf | 2 +- modules/nf-core/bismark/deduplicate/main.nf | 2 +- .../nf-core/bismark/genomepreparation/main.nf | 2 +- .../bismark/methylationextractor/main.nf | 2 +- modules/nf-core/bismark/report/main.nf | 2 +- modules/nf-core/bismark/summary/main.nf | 2 +- modules/nf-core/bwameth/align/main.nf | 4 +- modules/nf-core/bwameth/index/main.nf | 2 +- modules/nf-core/cat/fastq/main.nf | 2 +- .../custom/dumpsoftwareversions/main.nf | 2 +- modules/nf-core/fastqc/main.nf | 12 ++- modules/nf-core/methyldackel/extract/main.nf | 2 +- modules/nf-core/methyldackel/mbias/main.nf | 2 +- modules/nf-core/multiqc/main.nf | 2 +- modules/nf-core/picard/markduplicates/main.nf | 2 +- modules/nf-core/preseq/lcextrap/main.nf | 2 +- modules/nf-core/qualimap/bamqc/main.nf | 2 +- modules/nf-core/qualimap/bamqccram/main.nf | 6 +- modules/nf-core/samtools/faidx/main.nf | 6 +- modules/nf-core/samtools/flagstat/main.nf | 6 +- modules/nf-core/samtools/index/main.nf | 6 +- modules/nf-core/samtools/sort/main.nf | 6 +- modules/nf-core/samtools/stats/main.nf | 6 +- modules/nf-core/trimgalore/main.nf | 2 +- subworkflows/local/biscuit.nf | 6 +- 33 files changed, 110 insertions(+), 108 deletions(-) diff --git a/modules.json b/modules.json index ac57dfad..10bd8e09 100644 --- a/modules.json +++ b/modules.json @@ -5,175 +5,169 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "biscuit/align": { + "branch": "master", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "installed_by": ["modules"] + }, + "biscuit/biscuitblaster": { + "branch": "master", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "installed_by": ["modules"] + }, "biscuit/bsconv": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "biscuit/index": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "biscuit/mergecg": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "biscuit/pileup": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "biscuit/qc": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "biscuit/vcf2bed": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", "installed_by": ["modules"] }, "bismark/align": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/coverage2cytosine": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/deduplicate": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/genomepreparation": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/methylationextractor": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/report": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bismark/summary": { "branch": "master", - "git_sha": "e84cc8f07607ad7970db9b6cf79b815b78d9cacd", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bwameth/align": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "bwameth/index": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "3dd73937b084b547f9272bc901e0f120a7913fd8", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "methyldackel/extract": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "methyldackel/mbias": { "branch": "master", - "git_sha": "cdaaf00a580a2b3378926b08dd44db1de44ed7b5", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "picard/markduplicates": { "branch": "master", - "git_sha": "eca65aa4a5e2e192ac44d6962c8f9260f314ffb8", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "preseq/lcextrap": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "qualimap/bamqc": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "qualimap/bamqccram": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "samtools/index": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", - "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, "trimgalore": { "branch": "master", - "git_sha": "b51a69e30973c71950225c817ad07a3337d22c40", - "installed_by": ["modules"] - } - } - } - }, - "https://github.com/njspix/modules": { - "modules": { - "nf-core": { - "biscuit/align": { - "branch": "master", - "git_sha": "ff4a08b5155b1e21d782bba7984a2169a6515d77", - "installed_by": ["modules"] - }, - "biscuit/biscuitblaster": { - "branch": "master", - "git_sha": "086027e28e2cdccf2fd5f6c9914c80c76bfbb61d", + "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] } } diff --git a/modules/nf-core/biscuit/bsconv/main.nf b/modules/nf-core/biscuit/bsconv/main.nf index c335d24e..67744609 100644 --- a/modules/nf-core/biscuit/bsconv/main.nf +++ b/modules/nf-core/biscuit/bsconv/main.nf @@ -2,10 +2,11 @@ process BISCUIT_BSCONV { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.0.2.20220113" + + conda "bioconda::biscuit=1.1.0.20220707" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': - 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': + 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/biscuit/index/main.nf b/modules/nf-core/biscuit/index/main.nf index 9aa04330..84b9cc38 100644 --- a/modules/nf-core/biscuit/index/main.nf +++ b/modules/nf-core/biscuit/index/main.nf @@ -2,10 +2,10 @@ process BISCUIT_INDEX { tag "$fasta" label 'process_long' - conda (params.enable_conda ? "bioconda::biscuit=1.0.2.20220113" : null) + conda "bioconda::biscuit=1.1.0.20220707" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': - 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': + 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: path fasta, stageAs: "BiscuitIndex/*" diff --git a/modules/nf-core/biscuit/mergecg/main.nf b/modules/nf-core/biscuit/mergecg/main.nf index 9588ac02..6840902f 100644 --- a/modules/nf-core/biscuit/mergecg/main.nf +++ b/modules/nf-core/biscuit/mergecg/main.nf @@ -2,10 +2,11 @@ process BISCUIT_MERGECG { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15=h1170115_1" + conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': - 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': + 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + input: tuple val(meta), path(bed) diff --git a/modules/nf-core/biscuit/pileup/main.nf b/modules/nf-core/biscuit/pileup/main.nf index 9cbd8982..c4ba9e6f 100644 --- a/modules/nf-core/biscuit/pileup/main.nf +++ b/modules/nf-core/biscuit/pileup/main.nf @@ -2,10 +2,10 @@ process BISCUIT_PILEUP { tag "$meta.id" label 'process_high' - conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15=h1170115_1" + conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': - 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': + 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(normal_bams), path(normal_bais), path(tumor_bam), path(tumor_bai) diff --git a/modules/nf-core/biscuit/qc/main.nf b/modules/nf-core/biscuit/qc/main.nf index 12f4d839..29e4eaa7 100644 --- a/modules/nf-core/biscuit/qc/main.nf +++ b/modules/nf-core/biscuit/qc/main.nf @@ -2,10 +2,10 @@ process BISCUIT_QC { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.0.2.20220113" + conda "bioconda::biscuit=1.1.0.20220707" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/biscuit:1.0.2.20220113--h81a5ba2_0': - 'quay.io/biocontainers/biscuit:1.0.2.20220113--h81a5ba2_0' }" + 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': + 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/biscuit/vcf2bed/main.nf b/modules/nf-core/biscuit/vcf2bed/main.nf index 6c5f72f1..426a9b42 100644 --- a/modules/nf-core/biscuit/vcf2bed/main.nf +++ b/modules/nf-core/biscuit/vcf2bed/main.nf @@ -2,10 +2,10 @@ process BISCUIT_VCF2BED { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.0.2.20220113 bioconda::samtools=1.15" + conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0': - 'quay.io/biocontainers/mulled-v2-db16f1c237a26ea9245cf9924f858974ff321d6e:17fa66297f088a1bc7560b7b90dc273bf23f2d8c-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': + 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/bismark/align/main.nf b/modules/nf-core/bismark/align/main.nf index eccb8550..a9231529 100644 --- a/modules/nf-core/bismark/align/main.nf +++ b/modules/nf-core/bismark/align/main.nf @@ -2,7 +2,7 @@ process BISMARK_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/coverage2cytosine/main.nf b/modules/nf-core/bismark/coverage2cytosine/main.nf index 5051f34c..5a38b063 100644 --- a/modules/nf-core/bismark/coverage2cytosine/main.nf +++ b/modules/nf-core/bismark/coverage2cytosine/main.nf @@ -2,7 +2,7 @@ process BISMARK_COVERAGE2CYTOSINE { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bismark=0.23.0" : null) + conda "bioconda::bismark=0.23.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/deduplicate/main.nf b/modules/nf-core/bismark/deduplicate/main.nf index be75b54d..b9889ed4 100644 --- a/modules/nf-core/bismark/deduplicate/main.nf +++ b/modules/nf-core/bismark/deduplicate/main.nf @@ -2,7 +2,7 @@ process BISMARK_DEDUPLICATE { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/genomepreparation/main.nf b/modules/nf-core/bismark/genomepreparation/main.nf index 695a10f8..6df704bf 100644 --- a/modules/nf-core/bismark/genomepreparation/main.nf +++ b/modules/nf-core/bismark/genomepreparation/main.nf @@ -2,7 +2,7 @@ process BISMARK_GENOMEPREPARATION { tag "$fasta" label 'process_high' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/methylationextractor/main.nf b/modules/nf-core/bismark/methylationextractor/main.nf index b8018ac7..fb29891f 100644 --- a/modules/nf-core/bismark/methylationextractor/main.nf +++ b/modules/nf-core/bismark/methylationextractor/main.nf @@ -2,7 +2,7 @@ process BISMARK_METHYLATIONEXTRACTOR { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/report/main.nf b/modules/nf-core/bismark/report/main.nf index 744c6cd1..c4364645 100644 --- a/modules/nf-core/bismark/report/main.nf +++ b/modules/nf-core/bismark/report/main.nf @@ -2,7 +2,7 @@ process BISMARK_REPORT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/summary/main.nf b/modules/nf-core/bismark/summary/main.nf index 60854fba..3e27b5d1 100644 --- a/modules/nf-core/bismark/summary/main.nf +++ b/modules/nf-core/bismark/summary/main.nf @@ -1,7 +1,7 @@ process BISMARK_SUMMARY { label 'process_low' - conda (params.enable_conda ? "bioconda::bismark=0.24.0" : null) + conda "bioconda::bismark=0.24.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'quay.io/biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bwameth/align/main.nf b/modules/nf-core/bwameth/align/main.nf index 6d9c4431..1d98ca92 100644 --- a/modules/nf-core/bwameth/align/main.nf +++ b/modules/nf-core/bwameth/align/main.nf @@ -2,7 +2,7 @@ process BWAMETH_ALIGN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::bwameth=0.2.2" : null) + conda "bioconda::bwameth=0.2.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bwameth:0.2.2--py_1' : 'quay.io/biocontainers/bwameth:0.2.2--py_1' }" @@ -24,7 +24,7 @@ process BWAMETH_ALIGN { def prefix = task.ext.prefix ?: "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ - INDEX=`find -L ${index} -name "*.bwameth.c2t" | sed 's/.bwameth.c2t//'` + INDEX=`find -L ${index} -name "*.bwameth.c2t" | sed 's/\\.bwameth.c2t\$//'` # Modify the timestamps so that bwameth doesn't complain about building the index # See https://github.com/nf-core/methylseq/pull/217 diff --git a/modules/nf-core/bwameth/index/main.nf b/modules/nf-core/bwameth/index/main.nf index 4c106826..852e9bfa 100644 --- a/modules/nf-core/bwameth/index/main.nf +++ b/modules/nf-core/bwameth/index/main.nf @@ -2,7 +2,7 @@ process BWAMETH_INDEX { tag "$fasta" label 'process_high' - conda (params.enable_conda ? "bioconda::bwameth=0.2.2" : null) + conda "bioconda::bwameth=0.2.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bwameth:0.2.2--py_1' : 'quay.io/biocontainers/bwameth:0.2.2--py_1' }" diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index 4fa365d3..8a0b5600 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -2,7 +2,7 @@ process CAT_FASTQ { tag "$meta.id" label 'process_single' - conda (params.enable_conda ? "conda-forge::sed=4.7" : null) + conda "conda-forge::sed=4.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : 'ubuntu:20.04' }" diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index cebb6e05..3df21765 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -2,7 +2,7 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_single' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null) + conda "bioconda::multiqc=1.13" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf index 3bebb240..9ae58381 100644 --- a/modules/nf-core/fastqc/main.nf +++ b/modules/nf-core/fastqc/main.nf @@ -2,7 +2,7 @@ process FASTQC { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null) + conda "bioconda::fastqc=0.11.9" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' : 'quay.io/biocontainers/fastqc:0.11.9--0' }" @@ -21,9 +21,15 @@ process FASTQC { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + // Make list of old name and new name pairs to use for renaming in the bash while loop + def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } + def rename_to = old_new_pairs*.join(' ').join(' ') + def renamed_files = old_new_pairs.collect{ old_name, new_name -> new_name }.join(' ') """ - printf "%s\\n" $reads | while read f; do [[ \$f =~ ^${prefix}.* ]] || ln -s \$f ${prefix}_\$f ; done - fastqc $args --threads $task.cpus ${prefix}* + printf "%s %s\\n" $rename_to | while read old_name new_name; do + [ -f "\${new_name}" ] || ln -s \$old_name \$new_name + done + fastqc $args --threads $task.cpus $renamed_files cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/methyldackel/extract/main.nf b/modules/nf-core/methyldackel/extract/main.nf index 2ad1dc68..d7d60254 100644 --- a/modules/nf-core/methyldackel/extract/main.nf +++ b/modules/nf-core/methyldackel/extract/main.nf @@ -2,7 +2,7 @@ process METHYLDACKEL_EXTRACT { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::methyldackel=0.6.0' : null) + conda "bioconda::methyldackel=0.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : 'quay.io/biocontainers/methyldackel:0.6.0--h22771d5_0' }" diff --git a/modules/nf-core/methyldackel/mbias/main.nf b/modules/nf-core/methyldackel/mbias/main.nf index 755e62f8..48b5a965 100644 --- a/modules/nf-core/methyldackel/mbias/main.nf +++ b/modules/nf-core/methyldackel/mbias/main.nf @@ -2,7 +2,7 @@ process METHYLDACKEL_MBIAS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? 'bioconda::methyldackel=0.6.0' : null) + conda "bioconda::methyldackel=0.6.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : 'quay.io/biocontainers/methyldackel:0.6.0--h22771d5_0' }" diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index a8159a57..68f66bea 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,7 +1,7 @@ process MULTIQC { label 'process_single' - conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null) + conda "bioconda::multiqc=1.13" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" diff --git a/modules/nf-core/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf index d1f3aaa1..14800392 100644 --- a/modules/nf-core/picard/markduplicates/main.nf +++ b/modules/nf-core/picard/markduplicates/main.nf @@ -2,7 +2,7 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.27.4" : null) + conda "bioconda::picard=2.27.4" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/picard:2.27.4--hdfd78af_0' : 'quay.io/biocontainers/picard:2.27.4--hdfd78af_0' }" diff --git a/modules/nf-core/preseq/lcextrap/main.nf b/modules/nf-core/preseq/lcextrap/main.nf index a98a922c..38275910 100644 --- a/modules/nf-core/preseq/lcextrap/main.nf +++ b/modules/nf-core/preseq/lcextrap/main.nf @@ -3,7 +3,7 @@ process PRESEQ_LCEXTRAP { label 'process_single' label 'error_ignore' - conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null) + conda "bioconda::preseq=3.1.2" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2': 'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }" diff --git a/modules/nf-core/qualimap/bamqc/main.nf b/modules/nf-core/qualimap/bamqc/main.nf index 3bfcb4c1..936471ba 100644 --- a/modules/nf-core/qualimap/bamqc/main.nf +++ b/modules/nf-core/qualimap/bamqc/main.nf @@ -2,7 +2,7 @@ process QUALIMAP_BAMQC { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::qualimap=2.2.2d" : null) + conda "bioconda::qualimap=2.2.2d" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1' : 'quay.io/biocontainers/qualimap:2.2.2d--1' }" diff --git a/modules/nf-core/qualimap/bamqccram/main.nf b/modules/nf-core/qualimap/bamqccram/main.nf index e136b8e2..25520406 100644 --- a/modules/nf-core/qualimap/bamqccram/main.nf +++ b/modules/nf-core/qualimap/bamqccram/main.nf @@ -2,10 +2,10 @@ process QUALIMAP_BAMQCCRAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::qualimap=2.2.2d bioconda::samtools=1.15.1" : null) + conda "bioconda::qualimap=2.2.2d bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:61f6d4658ac88635fc37623af50bba77561988ab-0' : - 'quay.io/biocontainers/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:61f6d4658ac88635fc37623af50bba77561988ab-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:00d3c18496ddf07ea580fd00d1dd203cf31ab630-0' : + 'quay.io/biocontainers/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:00d3c18496ddf07ea580fd00d1dd203cf31ab630-0' }" input: tuple val(meta), path(cram), path(crai) diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index ef940db2..ce6580d2 100644 --- a/modules/nf-core/samtools/faidx/main.nf +++ b/modules/nf-core/samtools/faidx/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FAIDX { tag "$fasta" label 'process_single' - conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index c3152aca..2120cd7d 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" label 'process_single' - conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index e04e63e8..8b95687a 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index ab7f1cca..84c167cd 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 9b0c3867..0a2a3640 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_STATS { tag "$meta.id" label 'process_single' - conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + conda "bioconda::samtools=1.16.1" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : - 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.16.1--h6899075_1' : + 'quay.io/biocontainers/samtools:1.16.1--h6899075_1' }" input: tuple val(meta), path(input), path(input_index) diff --git a/modules/nf-core/trimgalore/main.nf b/modules/nf-core/trimgalore/main.nf index 5b45e4d7..ab8bb14e 100644 --- a/modules/nf-core/trimgalore/main.nf +++ b/modules/nf-core/trimgalore/main.nf @@ -2,7 +2,7 @@ process TRIMGALORE { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::trim-galore=0.6.7' : null) + conda "bioconda::trim-galore=0.6.7" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/trim-galore:0.6.7--hdfd78af_0' : 'quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0' }" diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 9db1784d..46450ba9 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -54,7 +54,7 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_ALIGN.out.versions) BISCUIT_ALIGN.out.bam .mix(BISCUIT_ALIGN.out.bai) - .groupTuple(by: 0, size: 2) + .groupTuple(by: 0, size: 2, sort: true) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } } else { @@ -65,7 +65,7 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_BLASTER.out.versions) BISCUIT_BLASTER.out.bam .mix(BISCUIT_BLASTER.out.bai) - .groupTuple(by: 0, size: 2) + .groupTuple(by: 0, size: 2, sort: true) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } } @@ -83,7 +83,7 @@ workflow BISCUIT { BISCUIT_BSCONV.out.bsconv_bam .mix(SAMTOOLS_INDEX.out.bai) - .groupTuple(by: 0, size: 2) + .groupTuple(by: 0, size: 2, sort: true) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } versions = versions.mix(BISCUIT_BSCONV.out.versions) From ad32b36b404577d1a9cc754c5fb1641bc487a4f1 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 2 Jan 2023 14:26:36 -0500 Subject: [PATCH 14/28] update --- conf/modules.config | 31 ++++++++++++++++++++++--------- subworkflows/local/biscuit.nf | 26 +++++++++++++------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 5181f855..5e4207f1 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -363,8 +363,9 @@ process { (params.nomeseq) ? '-N' : '' ].join(' ').trim() } publishDir = [ - path: { "${params.outdir}/${params.aligner}/methylation_calls/" }, + path: { "${params.outdir}/${params.aligner}/snp_data/" }, mode: params.publish_dir_mode, + enabled: params.save_align_intermeds, pattern: "*.vcf.gz" ] } @@ -376,10 +377,10 @@ process { (params.nomeseq) ? '-t hcg' : '' ].join(' ').trim() } publishDir = [ - path: { "${params.outdir}/${params.aligner}/meth_data/" }, + path: { "${params.outdir}/${params.aligner}/methylation_calls/" }, mode: params.publish_dir_mode, enabled: !params.merge_cg, - pattern: "*.bed" + pattern: "*.bed.gz" ] } @@ -389,10 +390,10 @@ process { (params.nomeseq) ? '-t gch' : '' ].join(' ').trim() } publishDir = [ - path: { "${params.outdir}/${params.aligner}/acessibility_data/" }, + path: { "${params.outdir}/${params.aligner}/accessibility_data/" }, mode: params.publish_dir_mode, enabled: !params.merge_cg, - pattern: "*.bed" + pattern: "*.bed.gz" ] } @@ -400,10 +401,10 @@ process { ext.prefix = { "${meta.id}_mergecg" } ext.args = '' publishDir = [ - path: { "${params.outdir}/${params.aligner}/meth_data/" }, + path: { "${params.outdir}/${params.aligner}/methylation_calls/" }, mode: params.publish_dir_mode, enabled: params.merge_cg, - pattern: "*.bed" + pattern: "*.bed.gz" ] } @@ -411,10 +412,10 @@ process { ext.prefix = { "${meta.id}_mergecg" } ext.args = '-N' publishDir = [ - path: { "${params.outdir}/${params.aligner}/acessibility_data/" }, + path: { "${params.outdir}/${params.aligner}/accessibility_data/" }, mode: params.publish_dir_mode, enabled: params.merge_cg, - pattern: "*.bed" + pattern: "*.bed.gz" ] } @@ -536,6 +537,18 @@ process { ] } + withName: SAMTOOLS_INDEX_BSCONV { + ext.args = "" + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/alignments/bisulfite_conversion_filtered" }, + mode: params.publish_dir_mode, + pattern: "*.bam*", + enabled: params.save_align_intermeds + ] + ] + } + withName: SAMTOOLS_INDEX_DEDUPLICATED { ext.args = "" publishDir = [ diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 46450ba9..254aeb4b 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -2,13 +2,13 @@ * biscuit subworkflow */ -include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' -include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' -include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' -include { BISCUIT_BSCONV } from '../../modules/nf-core/biscuit/bsconv/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' -include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' -include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' +include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' +include { BISCUIT_ALIGN } from '../../modules/nf-core/biscuit/align/main' +include { BISCUIT_BLASTER } from '../../modules/nf-core/biscuit/biscuitblaster/main' +include { BISCUIT_BSCONV } from '../../modules/nf-core/biscuit/bsconv/main' +include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_BSCONV } from '../../modules/nf-core/samtools/index/main' +include { BISCUIT_PILEUP } from '../../modules/nf-core/biscuit/pileup/main' +include { BISCUIT_QC } from '../../modules/nf-core/biscuit/qc/main' include { BISCUIT_VCF2BED as BISCUIT_VCF2BED_METH } from '../../modules/nf-core/biscuit/vcf2bed/main' include { BISCUIT_MERGECG as BISCUIT_MERGECG_METH } from '../../modules/nf-core/biscuit/mergecg/main' if (params.nomeseq) { @@ -54,7 +54,7 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_ALIGN.out.versions) BISCUIT_ALIGN.out.bam .mix(BISCUIT_ALIGN.out.bai) - .groupTuple(by: 0, size: 2, sort: true) + .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } } else { @@ -65,7 +65,7 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_BLASTER.out.versions) BISCUIT_BLASTER.out.bam .mix(BISCUIT_BLASTER.out.bai) - .groupTuple(by: 0, size: 2, sort: true) + .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } } @@ -79,15 +79,15 @@ workflow BISCUIT { biscuit_index ) - SAMTOOLS_INDEX ( BISCUIT_BSCONV.out.bsconv_bam ) + SAMTOOLS_INDEX_BSCONV ( BISCUIT_BSCONV.out.bsconv_bam ) BISCUIT_BSCONV.out.bsconv_bam - .mix(SAMTOOLS_INDEX.out.bai) - .groupTuple(by: 0, size: 2, sort: true) + .mix(SAMTOOLS_INDEX_BSCONV.out.bai) + .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } versions = versions.mix(BISCUIT_BSCONV.out.versions) - versions = versions.mix(SAMTOOLS_INDEX.out.versions) + versions = versions.mix(SAMTOOLS_INDEX_BSCONV.out.versions) } /* From e14555cdf4cfffcbe05f22ea8be2f39a177138e0 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 2 Jan 2023 17:29:28 -0500 Subject: [PATCH 15/28] tweaks --- subworkflows/local/biscuit.nf | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/subworkflows/local/biscuit.nf b/subworkflows/local/biscuit.nf index 254aeb4b..6346a958 100644 --- a/subworkflows/local/biscuit.nf +++ b/subworkflows/local/biscuit.nf @@ -19,21 +19,13 @@ if (params.nomeseq) { workflow BISCUIT { take: reads // channel: [ val(meta), [ reads ] ] + biscuit_index // channel : /path/to/biscuit/index + skip_deduplication + merge_cg main: versions = Channel.empty() - /* - * Generate biscuit index if not supplied - */ - if (params.biscuit_index) { - biscuit_index = file(params.biscuit_index) - } else { - BISCUIT_INDEX(params.fasta) - biscuit_index = BISCUIT_INDEX.out.index - versions = versions.mix(BISCUIT_INDEX.out.versions) - } - /* * If we're using the --pbat option, biscuit will be set to -b 1. * However, that would force the reads to align to the opposite strands we want, @@ -46,7 +38,7 @@ workflow BISCUIT { /* * Align with biscuit; mark duplicates unless params.skip_deduplication */ - if (params.skip_deduplication || params.rrbs){ + if (skip_deduplication){ BISCUIT_ALIGN ( reads, biscuit_index @@ -54,7 +46,7 @@ workflow BISCUIT { versions = versions.mix(BISCUIT_ALIGN.out.versions) BISCUIT_ALIGN.out.bam .mix(BISCUIT_ALIGN.out.bai) - .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) + .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) // make sure the bam is always before its index .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } } else { @@ -83,7 +75,7 @@ workflow BISCUIT { BISCUIT_BSCONV.out.bsconv_bam .mix(SAMTOOLS_INDEX_BSCONV.out.bai) - .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) + .groupTuple(by: 0, size: 2, sort: {a, b -> a.toString() =~ /\.bai$/ ? 1: -1}) // make sure bam is always before bai .map{ meta, bam_bai -> [ meta, bam_bai[0], bam_bai[1] ] } .set{ alignments } versions = versions.mix(BISCUIT_BSCONV.out.versions) @@ -94,7 +86,7 @@ workflow BISCUIT { * Extract all snp and methlyation information */ BISCUIT_PILEUP ( - alignments.map{ meta, bam, bai -> [ meta, bam, bai, [], [] ] }, // add in blank lists for paired 'tumor' bam and index + alignments.map{ meta, bam, bai -> [ meta, bam, bai, [], [] ] }, // add in blank lists to cover 'optional' pileup inputs biscuit_index ) versions = versions.mix(BISCUIT_PILEUP.out.versions) @@ -169,10 +161,7 @@ workflow BISCUIT { // TODO: -// methylation extraction -// samtools flagstat, stats -// reports -// multiqc +// include SNP information? From 451d88075b737005a5b7f3358abd8effb094134c Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Mon, 2 Jan 2023 17:30:01 -0500 Subject: [PATCH 16/28] more config tweaks, refactoring --- CHANGELOG.md | 10 ++++++++++ conf/modules.config | 14 ++++++++++---- nextflow_schema.json | 25 ++++++++++++++----------- subworkflows/local/bismark.nf | 4 ++-- subworkflows/local/prepare_genome.nf | 17 +++++++++++++++++ tests/bismark/main.nf.test | 4 ++-- workflows/methylseq.nf | 20 ++++++++++++++++---- 7 files changed, 71 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6149abd9..91815876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # nf-core/methylseq +## Working list... + +### Pipeline Updates + +- Add `Biscuit` aligner as a separate, 3rd workflow + +## Refactoring + +- Replace `--cytosine_report` parameter with the more broadly applicable `--merge_cg` parameter (default `TRUE`). Setting `--merge_cg false` is equivalent to setting `--cytosine_report`. Parameter name is a bit more descriptive and allows for unified behavior between different pipelines. + ## [v2.3.0](https://github.com/nf-core/methylseq/releases/tag/2.3.0) - 2022-12-16 ### Pipeline Updates diff --git a/conf/modules.config b/conf/modules.config index 89988106..bb9ecb16 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -324,7 +324,7 @@ process { ext.args2 = '' publishDir = [ [ - path: { "${params.outdir}/${params.aligner}/alignments" }, + path: { "${params.outdir}/${params.aligner}/alignments/raw" }, mode: params.publish_dir_mode, pattern: "*.bam.*", enabled: (params.save_align_intermeds || params.skip_deduplication || params.rrbs) @@ -342,9 +342,9 @@ process { ext.args3 = '' publishDir = [ [ - path: { "${params.outdir}/${params.aligner}/alignments" }, + path: { "${params.outdir}/${params.aligner}/alignments/dup_marked" }, mode: params.publish_dir_mode, - pattern: "*.bam.*", + pattern: "*.bam*", enabled: (params.save_align_intermeds || params.skip_deduplication || params.rrbs) ] ] @@ -353,6 +353,12 @@ process { withName: BISCUIT_BSCONV { ext.prefix = { "${meta.id}_bsconv" } ext.args = { "-f ${params.bs_conv_filter}" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/alignments/bisulfite_conversion_filtered" }, + mode: params.publish_dir_mode, + pattern: "*.bam", + enabled: params.save_align_intermeds + ] } withName: BISCUIT_PILEUP { @@ -543,7 +549,7 @@ process { [ path: { "${params.outdir}/${params.aligner}/alignments/bisulfite_conversion_filtered" }, mode: params.publish_dir_mode, - pattern: "*.bam*", + pattern: "*.bai", enabled: params.save_align_intermeds ] ] diff --git a/nextflow_schema.json b/nextflow_schema.json index 723272eb..0bc26e86 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -55,7 +55,14 @@ "save_reference": { "type": "boolean", "description": "Save reference(s) to results directory", - "fa_icon": "far fa-save" + "fa_icon": "far fa-save", + "help_text": "This can be helpful if you are generating an index for a species which does not already have one on iGenomes, and want to save time in subsequent runs." + }, + "save_trimmed": { + "type": "boolean", + "description": "Save trimmed reads to results directory.", + "fa_icon": "fas fa-cut", + "help_text": "By default, trimmed FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete." }, "save_align_intermeds": { "type": "boolean", @@ -67,12 +74,6 @@ "description": "Bismark only - Save unmapped reads to FastQ files", "help_text": "Use the `--unmapped` flag to set the `--unmapped` flag with Bismark align and save the unmapped reads to FastQ files.", "fa_icon": "fas fa-recycle" - }, - "save_trimmed": { - "type": "boolean", - "description": "Save trimmed reads to results directory.", - "fa_icon": "fas fa-cut", - "help_text": "By default, trimmed FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete." } }, "fa_icon": "fas fa-save" @@ -155,18 +156,18 @@ "bwameth", "biscuit" ], - "help_text": "The nf-core/methylseq package is actually two pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel) instead of Bismark. To run this workflow, run the pipeline with the command line flag `--aligner bwameth`." + "help_text": "The nf-core/methylseq package is actually three pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel). To run this workflow, run the pipeline with the command line flag `--aligner bwameth`.\n\nThe third workflow uses [Biscuit](https://huishenlab.github.io/biscuit/). To run this workflow, run the pipeline with the command line flag `--aligner biscuit`." }, "comprehensive": { "type": "boolean", "description": "Output information for all cytosine contexts.", "fa_icon": "fas fa-arrows-alt", - "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well." + "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well.\n\nIf using the biscuit workflow, this flag causes biscuit vcf2bed to report information concerning all cytosine contexts" }, "merge_cg": { "type": "boolean", "description": "Bismark: output stranded cytosine report. Biscuit: don't merge data from neighboring C and G in CpG context", - "help_text": "By default, Bismark does not produce stranded calls. With this option the output considers all Cs on both forward and reverse strands and reports their position, strand, trinucleotide context and methylation state.", + "help_text": "By default, Bismark does not produce stranded calls. If this option is set to `false` the output considers all Cs on both forward and reverse strands and reports their position, strand, trinucleotide context and methylation state.\n\nBy default, biscuit produces stranded methylation calls (i.e. the methylation states of the two Cs on opposite strands of a CpG dinucleotide are considered separately). If this option is set to `true` (default), methylation information from both strands will be merged. ", "fa_icon": "fas fa-clipboard", "default": true }, @@ -399,7 +400,9 @@ "properties": { "bs_conv_filter": { "type": "number", - "default": 0.1 + "default": 0.1, + "description": "Discard reads with with fractional CpH retention greater than this value", + "help_text": "When the `biscuit` alignment option is selected, it is possible to remove reads that are likely to originate from molecules displaying poor bisulfite conversion. The default is 0.1, i.e. reads with more than 10% CpH methylation are discarded. Set to 1 to disable filtering." } } }, diff --git a/subworkflows/local/bismark.nf b/subworkflows/local/bismark.nf index 797da7a4..2edfe547 100644 --- a/subworkflows/local/bismark.nf +++ b/subworkflows/local/bismark.nf @@ -15,7 +15,7 @@ workflow BISMARK { reads // channel: [ val(meta), [ reads ] ] bismark_index // channel: /path/to/BismarkIndex/ skip_deduplication // boolean: whether to deduplicate alignments - cytosine_report // boolean: whether the run coverage2cytosine + merge_cg // boolean: whether the run coverage2cytosine main: versions = Channel.empty() @@ -65,7 +65,7 @@ workflow BISMARK { /* * Run coverage2cytosine */ - if (cytosine_report) { + if (merge_cg) { BISMARK_COVERAGE2CYTOSINE ( BISMARK_METHYLATIONEXTRACTOR.out.coverage, bismark_index diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index faf87194..35ae16a7 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -5,6 +5,7 @@ include { BISMARK_GENOMEPREPARATION } from '../../modules/nf-core/bismark/genomepreparation/main' include { BWAMETH_INDEX } from '../../modules/nf-core/bwameth/index/main' include { SAMTOOLS_FAIDX } from '../../modules/nf-core/samtools/faidx/main' +include { BISCUIT_INDEX } from '../../modules/nf-core/biscuit/index/main' workflow PREPARE_GENOME { @@ -15,6 +16,7 @@ workflow PREPARE_GENOME { bismark_index = Channel.empty() bwameth_index = Channel.empty() fasta_index = Channel.empty() + biscuit_index = Channel.empty() // FASTA, if supplied if (params.fasta) { @@ -61,12 +63,27 @@ workflow PREPARE_GENOME { versions = versions.mix(SAMTOOLS_FAIDX.out.versions) } } + // Aligner: biscuit + else if ( params.aligner == "biscuit" ){ + + /* + * Generate biscuit index if not supplied + */ + if (params.biscuit_index) { + biscuit_index = file(params.biscuit_index) + } else { + BISCUIT_INDEX(params.fasta) + biscuit_index = BISCUIT_INDEX.out.index + versions = versions.mix(BISCUIT_INDEX.out.versions) + } + } emit: fasta bismark_index bwameth_index fasta_index + biscuit_index versions } diff --git a/tests/bismark/main.nf.test b/tests/bismark/main.nf.test index 51567718..f1cbe50e 100644 --- a/tests/bismark/main.nf.test +++ b/tests/bismark/main.nf.test @@ -42,7 +42,7 @@ nextflow_pipeline { aligner = "bismark" // Generated by previous test bismark_index = ".nf-test/indexes/BismarkIndex/" - cytosine_report = true + merge_cg = true outdir = "$outputDir" } } @@ -81,7 +81,7 @@ nextflow_pipeline { save_reference = true // Generated by previous test bismark_index = ".nf-test/indexes/BismarkIndex/" - cytosine_report = true + merge_cg = true outdir = "$outputDir" } } diff --git a/workflows/methylseq.nf b/workflows/methylseq.nf index 970f7a50..5ab7fb6f 100644 --- a/workflows/methylseq.nf +++ b/workflows/methylseq.nf @@ -60,7 +60,7 @@ else if ( params.aligner == 'bwameth' ){ } // Aligner: biscuit else if ( params.aligner == "biscuit" ){ - include { BISCUIT as ALIGNER } from '../subworkflows/local/biscuit' + include { BISCUIT } from '../subworkflows/local/biscuit' } /* @@ -153,8 +153,6 @@ workflow METHYLSEQ { reads = ch_cat_fastq } - - /* * SUBWORKFLOW: Align reads, deduplicate and extract methylation with Bismark */ @@ -169,7 +167,7 @@ workflow METHYLSEQ { reads, PREPARE_GENOME.out.bismark_index, params.skip_deduplication || params.rrbs, - params.cytosine_report || params.nomeseq + params.merge_cg || params.nomeseq ) versions = versions.mix(BISMARK.out.versions.unique{ it.baseName }) ch_bam = BISMARK.out.bam @@ -191,6 +189,20 @@ workflow METHYLSEQ { ch_dedup = BWAMETH.out.dedup ch_aligner_mqc = BWAMETH.out.mqc } + // Aligner: biscuit + else if ( params.aligner == "biscuit" ){ + + BISCUIT( + reads, + PREPARE_GENOME.out.biscuit_index, + params.skip_deduplication || params.rrbs, + params.merge_cg || params.nomeseq + ) + versions = versions.mix(BISCUIT.out.versions.unique{ it.baseName }) + ch_bam = BISCUIT.out.bam + ch_dedup = BISCUIT.out.dedup + ch_aligner_mqc = BISCUIT.out.mqc + } /* * MODULE: Qualimap BamQC From d3939071ab56656653bec7d6a383d2f3e05ba085 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:02:07 -0500 Subject: [PATCH 17/28] update schema, modules, etc --- CHANGELOG.md | 1 + conf/modules.config | 39 ++++++--- modules.json | 4 +- modules/nf-core/multiqc/main.nf | 6 +- modules/nf-core/trimgalore/main.nf | 13 ++- modules/nf-core/trimgalore/meta.yml | 2 +- nextflow.config | 26 +++--- nextflow_schema.json | 121 +++++++++++++++++----------- workflows/methylseq.nf | 2 +- 9 files changed, 132 insertions(+), 82 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91815876..2e1b2307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Refactoring - Replace `--cytosine_report` parameter with the more broadly applicable `--merge_cg` parameter (default `TRUE`). Setting `--merge_cg false` is equivalent to setting `--cytosine_report`. Parameter name is a bit more descriptive and allows for unified behavior between different pipelines. +- Move several parameters around (e.g. `--meth_cutoff` is now applicable to both the Bismark and Biscuit workflows) ## [v2.3.0](https://github.com/nf-core/methylseq/releases/tag/2.3.0) - 2022-12-16 diff --git a/conf/modules.config b/conf/modules.config index bb9ecb16..1ab4cafe 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -34,6 +34,15 @@ process { ] } + withName: CAT_FASTQ { + publishDir = [ + path: { "${params.outdir}/merged_fastq" }, + mode: params.publish_dir_mode, + pattern: '*.gz', + enabled: params.save_merged + ] + } + withName: FASTQC { ext.args = '--quiet' publishDir = [ @@ -209,9 +218,11 @@ process { params.comprehensive ? ' --comprehensive --merge_non_CpG' : '', params.meth_cutoff ? " --cutoff ${params.meth_cutoff}" : '', params.nomeseq ? '--CX' : '', - meta.single_end ? '' : (params.no_overlap ? ' --no_overlap' : '--include_overlap'), - meta.single_end ? '' : (params.ignore_r2 > 0 ? "--ignore_r2 ${params.ignore_r2}" : ""), - meta.single_end ? '' : (params.ignore_3prime_r2 > 0 ? "--ignore_r2 ${params.ignore_3prime_r2}": "") + meta.single_end ? '' : (params.no_overlap ? ' --no_overlap' : '--include_overlap'), + meta.single_end ? '' : (params.ignore > 0 ? "--ignore ${params.ignore}" : ""), + meta.single_end ? '' : (params.ignore_3prime > 0 ? "--ignore_3prime ${params.ignore_3prime}" : ""), + meta.single_end ? '' : (params.ignore_r2 > 0 ? "--ignore_r2 ${params.ignore_r2}" : ""), + meta.single_end ? '' : (params.ignore_3prime_r2 > 0 ? "--ignore_r2 ${params.ignore_3prime_r2}" : "") ].join(' ').trim() } publishDir = [ [ @@ -319,7 +330,10 @@ process { withName: BISCUIT_ALIGN { ext.args = { [ - (params.pbat || !params.non_directional) ? '-b 1' : '', + // Use directional alignment (align read 1 to parent, read 2 to daughter). + // Note that `pbat` libaries are directional, but 'backwards' (read 1 aligns to daughter); + // this 'inversion' is handled in the `biscuit` subworkflow by reversing read 1 and read 2 if `pbat` is set. + ( params.pbat || params.single_cell || params.zymo || (!params.non_directional) ) ? '-b 1' : '', ].join(' ').trim() } ext.args2 = '' publishDir = [ @@ -334,7 +348,10 @@ process { withName: BISCUIT_BLASTER { ext.args = { [ - (params.pbat || !params.non_directional) ? '-b 1' : '', + // Use directional alignment (align read 1 to parent, read 2 to daughter). + // Note that `pbat` libaries are directional, but 'backwards' (read 1 aligns to daughter); + // this 'inversion' is handled in the `biscuit` subworkflow by reversing read 1 and read 2 if `pbat` is set. + ( params.pbat || params.single_cell || params.zymo || (!params.non_directional) ) ? '-b 1' : '', ].join(' ').trim() } ext.args2 = { [ meta.single_end ? "--ignoreUnmated" : "" @@ -365,8 +382,10 @@ process { errorStrategy = 'retry' maxRetries = 3 ext.args = { [ - (params.no_overlap) ? '' : '-d', - (params.nomeseq) ? '-N' : '' + params.no_overlap ? '' : '-d', + params.nomeseq ? '-N' : '', + params.ignore > 0 ? "-5 ${params.ignore}" : '', + params.ignore_3prime > 0 ? "-3 ${params.ignore_3prime}" : '', ].join(' ').trim() } publishDir = [ path: { "${params.outdir}/${params.aligner}/snp_data/" }, @@ -378,7 +397,7 @@ process { withName: BISCUIT_VCF2BED { ext.args = { [ - (params.meth_cutoff > 0) ? "-k ${params.meth_cutoff}" : '-k 1', + (params.meth_cutoff) ? "-k ${params.meth_cutoff}" : '-k 1', (params.comprehensive) ? '-t c' : '', (params.nomeseq) ? '-t hcg' : '' ].join(' ').trim() } @@ -392,7 +411,7 @@ process { withName: BISCUIT_VCF2BED_NOME { ext.args = { [ - (params.meth_cutoff > 0) ? "-k ${params.meth_cutoff}" : '-k 1', + (params.meth_cutoff) ? "-k ${params.meth_cutoff}" : '-k 1', (params.nomeseq) ? '-t gch' : '' ].join(' ').trim() } publishDir = [ @@ -585,7 +604,7 @@ process { params.comprehensive ? ' --CHG --CHH' : '', params.ignore_flags ? " --ignoreFlags" : '', params.methyl_kit ? " --methylKit" : '', - params.min_depth > 0 ? " --minDepth ${params.min_depth}" : '' + params.meth_cutoff ? " --minDepth ${params.meth_cutoff}" : '' ].join(" ").trim() publishDir = [ [ diff --git a/modules.json b/modules.json index 10bd8e09..89e72f83 100644 --- a/modules.json +++ b/modules.json @@ -117,7 +117,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba", "installed_by": ["modules"] }, "picard/markduplicates": { @@ -167,7 +167,7 @@ }, "trimgalore": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "72ffbd7128015a1d4b65b95ff8d37be8fee2f981", "installed_by": ["modules"] } } diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 68f66bea..4b604749 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,10 +1,10 @@ process MULTIQC { label 'process_single' - conda "bioconda::multiqc=1.13" + conda "bioconda::multiqc=1.14" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.14--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.14--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/trimgalore/main.nf b/modules/nf-core/trimgalore/main.nf index ab8bb14e..37e88f58 100644 --- a/modules/nf-core/trimgalore/main.nf +++ b/modules/nf-core/trimgalore/main.nf @@ -11,13 +11,12 @@ process TRIMGALORE { tuple val(meta), path(reads) output: - tuple val(meta), path("*{trimmed,val}*.fq.gz"), emit: reads - tuple val(meta), path("*report.txt") , emit: log - path "versions.yml" , emit: versions - - tuple val(meta), path("*unpaired*.fq.gz") , emit: unpaired, optional: true - tuple val(meta), path("*.html") , emit: html , optional: true - tuple val(meta), path("*.zip") , emit: zip , optional: true + tuple val(meta), path("*{3prime,5prime,trimmed,val}*.fq.gz"), emit: reads + tuple val(meta), path("*report.txt") , emit: log , optional: true + tuple val(meta), path("*unpaired*.fq.gz") , emit: unpaired, optional: true + tuple val(meta), path("*.html") , emit: html , optional: true + tuple val(meta), path("*.zip") , emit: zip , optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/trimgalore/meta.yml b/modules/nf-core/trimgalore/meta.yml index 439f566d..f84c4d77 100644 --- a/modules/nf-core/trimgalore/meta.yml +++ b/modules/nf-core/trimgalore/meta.yml @@ -36,7 +36,7 @@ output: description: | List of input adapter trimmed FastQ files of size 1 and 2 for single-end and paired-end data, respectively. - pattern: "*.{fq.gz}" + pattern: "*{3prime,5prime,trimmed,val}*.fq.gz" - unpaired: type: file description: | diff --git a/nextflow.config b/nextflow.config index 1189dfe7..18af2f8c 100644 --- a/nextflow.config +++ b/nextflow.config @@ -16,6 +16,7 @@ params { genome = null igenomes_base = 's3://ngi-igenomes/igenomes' igenomes_ignore = false + // MultiQC options multiqc_config = null multiqc_title = null @@ -23,17 +24,26 @@ params { max_multiqc_email_size = '25.MB' multiqc_methods_description = null - // Intermediate files + save_merged = false + save_trimmed = false save_reference = false save_align_intermeds = false unmapped = false - save_trimmed = false // Alignment options aligner = 'bismark' - comprehensive = false + non_directional = false + + // Methylation calling options merge_cg = true + meth_cutoff = null + comprehensive = false + no_overlap = true + ignore = 0 + ignore_3prime = 0 + ignore_r2 = 2 + ignore_3prime_r2 = 2 // Library presets pbat = false @@ -45,6 +55,7 @@ params { cegx = false epignome = false zymo = false + nomeseq = false // Trimming options clip_r1 = 0 @@ -54,25 +65,18 @@ params { nextseq_trim = 0 // Bismark options - non_directional = false + local_alignment = false relax_mismatches = false num_mismatches = 0.6 // 0.6 will allow a penalty of bp * -0.6 // For 100bp reads, this is -60. Mismatches cost -6, gap opening -5 and gap extension -2 // So -60 would allow 10 mismatches or ~ 8 x 1-2bp indels // Bismark default is 0.2 (L,0,-0.2), Bowtie2 default is 0.6 (L,0,-0.6) - meth_cutoff = null - no_overlap = true - ignore_r2 = 2 - ignore_3prime_r2 = 2 known_splices = null - local_alignment = false minins = null maxins = null - nomeseq = false // bwa-meth options - min_depth = 0 ignore_flags = false methyl_kit = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 0bc26e86..9c6c21a0 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -58,6 +58,12 @@ "fa_icon": "far fa-save", "help_text": "This can be helpful if you are generating an index for a species which does not already have one on iGenomes, and want to save time in subsequent runs." }, + "save_merged": { + "type": "boolean", + "fa_icon": "fas fa-file-medical", + "description": "Save merged fastq(s) to results directory", + "help_text": "By default, merged (raw, untrimmed) FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete." + }, "save_trimmed": { "type": "boolean", "description": "Save trimmed reads to results directory.", @@ -158,12 +164,25 @@ ], "help_text": "The nf-core/methylseq package is actually three pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel). To run this workflow, run the pipeline with the command line flag `--aligner bwameth`.\n\nThe third workflow uses [Biscuit](https://huishenlab.github.io/biscuit/). To run this workflow, run the pipeline with the command line flag `--aligner biscuit`." }, - "comprehensive": { + "non_directional": { "type": "boolean", - "description": "Output information for all cytosine contexts.", - "fa_icon": "fas fa-arrows-alt", - "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well.\n\nIf using the biscuit workflow, this flag causes biscuit vcf2bed to report information concerning all cytosine contexts" - }, + "description": "Run alignment against all four possible strands.", + "help_text": "By default, Bismark assumes that libraries are directional and does not align against complementary strands. If your library prep was not directional, use `--non_directional` to align against all four possible strands.\n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", + "fa_icon": "fas fa-exchange-alt" + } + }, + "required": [ + "aligner" + ], + "fa_icon": "fas fa-braille" + }, + "methylation_calling_options": { + "title": "Methylation calling options", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-balance-scale-left", + "properties": { "merge_cg": { "type": "boolean", "description": "Bismark: output stranded cytosine report. Biscuit: don't merge data from neighboring C and G in CpG context", @@ -171,6 +190,18 @@ "fa_icon": "fas fa-clipboard", "default": true }, + "meth_cutoff": { + "type": "integer", + "description": "Minimum read depth to report a methylation call", + "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", + "fa_icon": "fas fa-angle-double-down" + }, + "comprehensive": { + "type": "boolean", + "description": "Output information for all cytosine contexts.", + "fa_icon": "fas fa-arrows-alt", + "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well.\n\nIf using the biscuit workflow, this flag causes biscuit vcf2bed to report information concerning all cytosine contexts" + }, "no_overlap": { "type": "boolean", "default": true, @@ -178,23 +209,35 @@ "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. ", "fa_icon": "fas fa-allergies" }, - "non_directional": { - "type": "boolean", - "description": "Run alignment against all four possible strands.", - "help_text": "By default, Bismark assumes that libraries are directional and does not align against complementary strands. If your library prep was not directional, use `--non_directional` to align against all four possible strands.\n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", - "fa_icon": "fas fa-exchange-alt" + "ignore": { + "type": "integer", + "default": 0, + "fa_icon": "far fa-eye-slash", + "description": "Ignore methylation in the first n bases of 5' end of reads", + "help_text": "Note this parameter has a different behavior for Biscuit vs Bismark aligners!\n\nBismark: Ignore the first bp from the 5' end of **Read 1**of paired-end sequencing results only.\nBiscuit: Ignore the first bp from the 5' end of **all** reads." }, - "meth_cutoff": { + "ignore_3prime": { "type": "integer", - "description": "Specify a minimum read coverage to report a methylation call", - "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", - "fa_icon": "fas fa-angle-double-down" + "default": 0, + "fa_icon": "far fa-eye-slash", + "description": "Ignore methylation in the last n bases of 3' end of reads", + "help_text": "Note this parameter has a different behavior for Biscuit vs Bismark aligners!\n\nBismark: Ignore the last bp from the 3' end of **Read 1**of paired-end sequencing results only.\nBiscuit: Ignore the last bp from the 3' end of **all** reads." + }, + "ignore_r2": { + "type": "integer", + "default": 2, + "description": "Ignore methylation in first n bases of 5' end of R2", + "help_text": "Ignore the first bp from the 5' end of Read 2 of paired-end sequencing results only. Since the first couple of bases in Read 2 of BS-Seq experiments show a severe bias towards non-methylation as a result of end-repairing sonicated fragments with unmethylated cytosines (see M-bias plot), it is recommended that the first couple of bp of Read 2 are removed before starting downstream analysis. Please see the section on M-bias plots in the Bismark User Guide for more details.", + "fa_icon": "far fa-eye-slash" + }, + "ignore_3prime_r2": { + "type": "integer", + "default": 2, + "description": "Ignore methylation in last n bases of 3' end of R2", + "help_text": "Ignore the last bp from the 3' end of Read 1 (or single-end alignment files) when processing the methylation call string. This can remove unwanted biases from the end of reads.", + "fa_icon": "far fa-eye-slash" } - }, - "required": [ - "aligner" - ], - "fa_icon": "fas fa-braille" + } }, "special_library_types": { "title": "Special library types", @@ -311,6 +354,12 @@ "default": "", "fa_icon": "fas fa-circle", "properties": { + "local_alignment": { + "type": "boolean", + "description": "Allow soft-clipping of reads (potentially useful for single-cell experiments).", + "help_text": "Specify to run Bismark with the `--local` flag to allow soft-clipping of reads. This should only be used with care in certain single-cell applications or PBAT libraries, which may produce chimeric read pairs. (See [Wu et al.](https://doi.org/10.1093/bioinformatics/btz125)).", + "fa_icon": "fas fa-search" + }, "relax_mismatches": { "type": "boolean", "description": "Turn on to relax stringency for alignment (set allowed penalty with --num_mismatches).", @@ -324,32 +373,12 @@ "help_text": "Customise the penalty in the function used to filter reads based on mismatches. The parameter `--relax_mismatches` must also be specified.\n\nSee the parameter documentation for `--relax_mismatches` for an explanation.", "fa_icon": "fas fa-calculator" }, - "ignore_r2": { - "type": "integer", - "default": 2, - "description": "Ignore methylation in first n bases of 5' end of R2", - "help_text": "Ignore the first bp from the 5' end of Read 2 of paired-end sequencing results only. Since the first couple of bases in Read 2 of BS-Seq experiments show a severe bias towards non-methylation as a result of end-repairing sonicated fragments with unmethylated cytosines (see M-bias plot), it is recommended that the first couple of bp of Read 2 are removed before starting downstream analysis. Please see the section on M-bias plots in the Bismark User Guide for more details.", - "fa_icon": "far fa-eye-slash" - }, - "ignore_3prime_r2": { - "type": "integer", - "default": 2, - "description": "Ignore methylation in last n bases of 3' end of R2", - "help_text": "Ignore the last bp from the 3' end of Read 1 (or single-end alignment files) when processing the methylation call string. This can remove unwanted biases from the end of reads.", - "fa_icon": "far fa-eye-slash" - }, "known_splices": { "type": "string", "description": "Supply a .gtf file containing known splice sites (bismark_hisat only).", "help_text": "Specify to run Bismark with the `--known-splicesite-infile` flag to run splice-aware alignment using HISAT2. A `.gtf` file has to be provided from which a list of known splicesites is created by the pipeline\n\n> NB: This only works when using the `bismark_hisat` aligner with `--align`", "fa_icon": "fas fa-barcode" }, - "local_alignment": { - "type": "boolean", - "description": "Allow soft-clipping of reads (potentially useful for single-cell experiments).", - "help_text": "Specify to run Bismark with the `--local` flag to allow soft-clipping of reads. This should only be used with care in certain single-cell applications or PBAT libraries, which may produce chimeric read pairs. (See [Wu et al.](https://doi.org/10.1093/bioinformatics/btz125)).", - "fa_icon": "fas fa-search" - }, "minins": { "type": "integer", "fa_icon": "fas fa-compress-alt", @@ -370,12 +399,6 @@ "description": "", "default": "", "properties": { - "min_depth": { - "type": "integer", - "description": "Specify a minimum read coverage for MethylDackel to report a methylation call.", - "default": 0, - "fa_icon": "fas fa-angle-double-down" - }, "ignore_flags": { "type": "boolean", "description": "MethylDackel - ignore SAM flags", @@ -401,8 +424,9 @@ "bs_conv_filter": { "type": "number", "default": 0.1, - "description": "Discard reads with with fractional CpH retention greater than this value", - "help_text": "When the `biscuit` alignment option is selected, it is possible to remove reads that are likely to originate from molecules displaying poor bisulfite conversion. The default is 0.1, i.e. reads with more than 10% CpH methylation are discarded. Set to 1 to disable filtering." + "description": "Discard reads with excessive CpH retention", + "help_text": "When the `biscuit` alignment option is selected, it is possible to remove reads that are likely to originate from molecules displaying poor bisulfite conversion. The default is 0.1, i.e. reads with more than 10% CpH methylation are discarded. Set to 1 to disable filtering.", + "fa_icon": "fas fa-filter" } } }, @@ -652,6 +676,9 @@ { "$ref": "#/definitions/alignment_options" }, + { + "$ref": "#/definitions/methylation_calling_options" + }, { "$ref": "#/definitions/special_library_types" }, diff --git a/workflows/methylseq.nf b/workflows/methylseq.nf index 5ab7fb6f..deb6eaa5 100644 --- a/workflows/methylseq.nf +++ b/workflows/methylseq.nf @@ -243,7 +243,7 @@ workflow METHYLSEQ { ch_multiqc_files = ch_multiqc_files.mix(PRESEQ_LCEXTRAP.out.log.collect{ it[1] }.ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(ch_aligner_mqc.ifEmpty([])) if (!params.skip_trimming) { - ch_multiqc_files = ch_multiqc_files.mix(TRIMGALORE.out.log.collect{ it[1] }) + ch_multiqc_files = ch_multiqc_files.mix(TRIMGALORE.out.zip.collect{ it[1] }) } ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{ it[1] }.ifEmpty([])) From fe38f2ae25eea5697d43674ff7f11a92decb7e05 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:49:33 -0500 Subject: [PATCH 18/28] update modules --- modules.json | 28 +++++++++---------- modules/nf-core/biscuit/align/meta.yml | 2 +- .../nf-core/biscuit/biscuitblaster/meta.yml | 6 ++-- modules/nf-core/biscuit/bsconv/meta.yml | 2 +- modules/nf-core/biscuit/index/meta.yml | 2 +- modules/nf-core/biscuit/mergecg/meta.yml | 2 +- modules/nf-core/biscuit/pileup/meta.yml | 2 +- modules/nf-core/biscuit/qc/meta.yml | 2 +- modules/nf-core/biscuit/vcf2bed/meta.yml | 2 +- modules/nf-core/picard/markduplicates/main.nf | 6 ++-- modules/nf-core/preseq/lcextrap/meta.yml | 2 +- modules/nf-core/samtools/flagstat/meta.yml | 2 +- modules/nf-core/samtools/index/meta.yml | 2 +- modules/nf-core/samtools/sort/meta.yml | 2 +- modules/nf-core/samtools/stats/meta.yml | 14 +++++----- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/modules.json b/modules.json index 89e72f83..8bd4dcb2 100644 --- a/modules.json +++ b/modules.json @@ -7,42 +7,42 @@ "nf-core": { "biscuit/align": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/biscuitblaster": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/bsconv": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/index": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/mergecg": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/pileup": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/qc": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "biscuit/vcf2bed": { "branch": "master", - "git_sha": "014209cabf9120e1a89014e95ad687170ca9c37a", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "bismark/align": { @@ -122,12 +122,12 @@ }, "picard/markduplicates": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "2f88b26e9804b99e98f7cd08e74c3f88288a3358", "installed_by": ["modules"] }, "preseq/lcextrap": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "qualimap/bamqc": { @@ -147,22 +147,22 @@ }, "samtools/flagstat": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "samtools/index": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", - "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", + "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", "installed_by": ["modules"] }, "trimgalore": { diff --git a/modules/nf-core/biscuit/align/meta.yml b/modules/nf-core/biscuit/align/meta.yml index c396ee05..3f289e9b 100644 --- a/modules/nf-core/biscuit/align/meta.yml +++ b/modules/nf-core/biscuit/align/meta.yml @@ -14,7 +14,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/alignment tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/biscuitblaster/meta.yml b/modules/nf-core/biscuit/biscuitblaster/meta.yml index eb22dd0f..63643e74 100644 --- a/modules/nf-core/biscuit/biscuitblaster/meta.yml +++ b/modules/nf-core/biscuit/biscuitblaster/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/biscuitblaster/ tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] - samblaster: description: | @@ -24,7 +24,7 @@ tools: It can also optionally output discordant read pairs and/or split read mappings to separate SAM files, and/or unmapped/clipped reads to a separate FASTQ file. By default, samblaster reads SAM input from stdin and writes SAM to stdout. - homepage: None + documentation: https://github.com/GregoryFaust/samblaster tool_dev_url: https://github.com/GregoryFaust/samblaster doi: "10.1093/bioinformatics/btu314" @@ -35,7 +35,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] diff --git a/modules/nf-core/biscuit/bsconv/meta.yml b/modules/nf-core/biscuit/bsconv/meta.yml index fa05ee47..7873ab5c 100644 --- a/modules/nf-core/biscuit/bsconv/meta.yml +++ b/modules/nf-core/biscuit/bsconv/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-bsconv tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/index/meta.yml b/modules/nf-core/biscuit/index/meta.yml index 96134f65..027f2049 100644 --- a/modules/nf-core/biscuit/index/meta.yml +++ b/modules/nf-core/biscuit/index/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/alignment tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/mergecg/meta.yml b/modules/nf-core/biscuit/mergecg/meta.yml index 25f6b9e2..88e66831 100644 --- a/modules/nf-core/biscuit/mergecg/meta.yml +++ b/modules/nf-core/biscuit/mergecg/meta.yml @@ -14,7 +14,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/pileup/meta.yml b/modules/nf-core/biscuit/pileup/meta.yml index 87c3891a..e4fd7d36 100644 --- a/modules/nf-core/biscuit/pileup/meta.yml +++ b/modules/nf-core/biscuit/pileup/meta.yml @@ -15,7 +15,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/pileup.html tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/qc/meta.yml b/modules/nf-core/biscuit/qc/meta.yml index a3e65a90..c0200626 100644 --- a/modules/nf-core/biscuit/qc/meta.yml +++ b/modules/nf-core/biscuit/qc/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/biscuit/vcf2bed/meta.yml b/modules/nf-core/biscuit/vcf2bed/meta.yml index c34d5a4d..ffecea71 100644 --- a/modules/nf-core/biscuit/vcf2bed/meta.yml +++ b/modules/nf-core/biscuit/vcf2bed/meta.yml @@ -16,7 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html tool_dev_url: https://github.com/huishenlab/biscuit - doi: "" + licence: ["MIT"] input: diff --git a/modules/nf-core/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf index 14800392..be243a95 100644 --- a/modules/nf-core/picard/markduplicates/main.nf +++ b/modules/nf-core/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda "bioconda::picard=2.27.4" + conda "bioconda::picard=3.0.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.27.4--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.27.4--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' : + 'quay.io/biocontainers/picard:3.0.0--hdfd78af_1' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/preseq/lcextrap/meta.yml b/modules/nf-core/preseq/lcextrap/meta.yml index f1be05a2..1391961c 100755 --- a/modules/nf-core/preseq/lcextrap/meta.yml +++ b/modules/nf-core/preseq/lcextrap/meta.yml @@ -10,7 +10,7 @@ tools: homepage: http://smithlabresearch.org/software/preseq/ documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf tool_dev_url: https://github.com/smithlabcode/preseq - doi: "" + licence: ["GPL"] input: diff --git a/modules/nf-core/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml index 95269063..954225df 100644 --- a/modules/nf-core/samtools/flagstat/meta.yml +++ b/modules/nf-core/samtools/flagstat/meta.yml @@ -14,7 +14,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index e5cadbc2..8bd2fa6f 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 09289751..07328431 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -12,7 +12,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index cac50b1c..1d68a5d8 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -13,7 +13,7 @@ tools: short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. These files are generated as output by short read aligners like BWA. homepage: http://www.htslib.org/ - documentation: hhttp://www.htslib.org/doc/samtools.html + documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] input: @@ -23,13 +23,13 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - input: - type: file - description: BAM/CRAM file from alignment - pattern: "*.{bam,cram}" + type: file + description: BAM/CRAM file from alignment + pattern: "*.{bam,cram}" - input_index: - type: file - description: BAI/CRAI file from alignment - pattern: "*.{bai,crai}" + type: file + description: BAI/CRAI file from alignment + pattern: "*.{bai,crai}" - fasta: type: optional file description: Reference file the CRAM was created with From 4d758a67acb71eb9a66955821ccd5ce3b2e40f87 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:59:19 -0500 Subject: [PATCH 19/28] getting rid of enable_conda --- modules/local/samplesheet_check.nf | 2 +- nextflow.config | 4 +--- nextflow_schema.json | 30 ++++-------------------------- 3 files changed, 6 insertions(+), 30 deletions(-) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 6983b1fa..d522ad0e 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -2,7 +2,7 @@ process SAMPLESHEET_CHECK { tag "$samplesheet" label 'process_single' - conda (params.enable_conda ? "conda-forge::python=3.8.3" : null) + conda "conda-forge::python=3.8.3" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/python:3.8.3' : 'quay.io/biocontainers/python:3.8.3' }" diff --git a/nextflow.config b/nextflow.config index 18af2f8c..c6c5975d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -102,7 +102,6 @@ params { validate_params = true show_hidden_params = false schema_ignore_params = 'genomes' - enable_conda = false // Config options @@ -145,7 +144,6 @@ try { profiles { debug { process.beforeScript = 'echo $HOSTNAME' } conda { - params.enable_conda = true conda.enabled = true docker.enabled = false singularity.enabled = false @@ -262,7 +260,7 @@ manifest { description = """Methylation (Bisulfite-Sequencing) Best Practice analysis pipeline, part of the nf-core community.""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '2.3.0' + version = '2.3.0dev' doi = '10.5281/zenodo.1343417' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 9c6c21a0..7d98c425 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,10 +10,7 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": [ - "input", - "outdir" - ], + "required": ["input", "outdir"], "properties": { "input": { "type": "string", @@ -156,12 +153,7 @@ "default": "bismark", "description": "Alignment tool to use.", "fa_icon": "fas fa-dot-circle", - "enum": [ - "bismark", - "bismark_hisat", - "bwameth", - "biscuit" - ], + "enum": ["bismark", "bismark_hisat", "bwameth", "biscuit"], "help_text": "The nf-core/methylseq package is actually three pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel). To run this workflow, run the pipeline with the command line flag `--aligner bwameth`.\n\nThe third workflow uses [Biscuit](https://huishenlab.github.io/biscuit/). To run this workflow, run the pipeline with the command line flag `--aligner biscuit`." }, "non_directional": { @@ -171,9 +163,7 @@ "fa_icon": "fas fa-exchange-alt" } }, - "required": [ - "aligner" - ], + "required": ["aligner"], "fa_icon": "fas fa-braille" }, "methylation_calling_options": { @@ -480,14 +470,7 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": [ - "symlink", - "rellink", - "link", - "copy", - "copyNoFollow", - "move" - ] + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"] }, "validate_params": { "type": "boolean", @@ -563,11 +546,6 @@ "description": "Show all params when using `--help`", "hidden": true, "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters." - }, - "enable_conda": { - "type": "boolean", - "description": "Run this workflow with Conda. You can also use '-profile condo' instead of providing this parameter.", - "hidden": true } } }, From 9bcaa02ff8a6f18be0a6bdb2983818ee5d111488 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:01:07 -0500 Subject: [PATCH 20/28] linting passes now --- .github/workflows/linting_comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 39635186..0bbcd30f 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -18,7 +18,7 @@ jobs: - name: Get PR number id: pr_number - run: echo "name=pr_number::$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT + run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - name: Post PR comment uses: marocchino/sticky-pull-request-comment@v2 From 068a59097b7714aca96a120bf94d7d299d8e42ee Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:03:45 -0500 Subject: [PATCH 21/28] more conda leftovers --- lib/WorkflowMain.groovy | 6 +++--- nextflow.config | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/WorkflowMain.groovy b/lib/WorkflowMain.groovy index 5c8bbac6..f867e666 100755 --- a/lib/WorkflowMain.groovy +++ b/lib/WorkflowMain.groovy @@ -71,9 +71,9 @@ class WorkflowMain { NfcoreTemplate.checkConfigProvided(workflow, log) // Check that conda channels are set-up correctly - if (params.enable_conda) { - Utils.checkCondaChannels(log) - } + // if (params.enable_conda) { + // Utils.checkCondaChannels(log) + // } // Check AWS batch settings NfcoreTemplate.awsBatch(workflow, params) diff --git a/nextflow.config b/nextflow.config index c6c5975d..0adbf4b6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -152,7 +152,6 @@ profiles { charliecloud.enabled = false } mamba { - params.enable_conda = true conda.enabled = true conda.useMamba = true docker.enabled = false From 5c1108e824ba936b72e75f185031eba352c21046 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 16:50:09 -0500 Subject: [PATCH 22/28] working on unifying options --- CHANGELOG.md | 12 +++++++++--- conf/modules.config | 9 ++++++++- nextflow.config | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e1b2307..79ba9534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,17 @@ ### Pipeline Updates - Add `Biscuit` aligner as a separate, 3rd workflow + - Add `biscuit_index` parameter +- Add a `--save_merged` option to save merged (`cat`'d) fastq files for the same sample -## Refactoring +### Refactoring -- Replace `--cytosine_report` parameter with the more broadly applicable `--merge_cg` parameter (default `TRUE`). Setting `--merge_cg false` is equivalent to setting `--cytosine_report`. Parameter name is a bit more descriptive and allows for unified behavior between different pipelines. -- Move several parameters around (e.g. `--meth_cutoff` is now applicable to both the Bismark and Biscuit workflows) +- 🧹 Refactoring of parameters, especially those that generalize across aligners: + - `--non_directional` is now under 'Alignment options' rather than 'Bismark options', as both the Bismark and Biscuit aligners support directional and non-directional alignment. + - New `Methylation calling options` section + - `--no_merge_cg` replaces the former `--cytosine_report` option. Biscuit produces stranded methylation calls, while bismark does not (by default). + - `--meth_cutoff`, `--comprehensive` applies to all 3 aligners + - `--no_overlap` applies to biscuit and bismark but NOT bwa-meth ## [v2.3.0](https://github.com/nf-core/methylseq/releases/tag/2.3.0) - 2022-12-16 diff --git a/conf/modules.config b/conf/modules.config index 1ab4cafe..830e13b8 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -10,6 +10,12 @@ ---------------------------------------------------------------------------------------- */ +def make_methyldackel_exclude = { + def exclude_bases = [params.ignore, params.ignore_3prime, params.ignore_r2, params.ignore_3prime_r2].join(",") + def md_args = ["--nOT", "--nOB", "--nCTOT", "--nCTOB"] + return md_args.collect { "$it $exclude_bases" }.join(" ") +} + process { publishDir = [ @@ -604,7 +610,8 @@ process { params.comprehensive ? ' --CHG --CHH' : '', params.ignore_flags ? " --ignoreFlags" : '', params.methyl_kit ? " --methylKit" : '', - params.meth_cutoff ? " --minDepth ${params.meth_cutoff}" : '' + params.meth_cutoff ? " --minDepth ${params.meth_cutoff}" : '', + (params.ignore > 0) || (params.ignore_3prime > 0) || (params.ignore_r2 > 0) || (params.ignore_3prime_r2 > 0) ? make_methyldackel_exclude() : "", ].join(" ").trim() publishDir = [ [ diff --git a/nextflow.config b/nextflow.config index 0adbf4b6..e7d9f67d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -37,7 +37,7 @@ params { // Methylation calling options merge_cg = true - meth_cutoff = null + meth_cutoff = 1 comprehensive = false no_overlap = true ignore = 0 From 88e7cf0457db91f86f4f954cd54cce6abf1afcf6 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Tue, 7 Mar 2023 16:54:52 -0500 Subject: [PATCH 23/28] schema updates --- nextflow_schema.json | 48 ++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 7d98c425..b755d09b 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -10,7 +10,10 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir"], + "required": [ + "input", + "outdir" + ], "properties": { "input": { "type": "string", @@ -153,17 +156,24 @@ "default": "bismark", "description": "Alignment tool to use.", "fa_icon": "fas fa-dot-circle", - "enum": ["bismark", "bismark_hisat", "bwameth", "biscuit"], + "enum": [ + "bismark", + "bismark_hisat", + "bwameth", + "biscuit" + ], "help_text": "The nf-core/methylseq package is actually three pipelines in one. The default workflow uses [Bismark](http://www.bioinformatics.babraham.ac.uk/projects/bismark/) with [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) as alignment tool: unless specified otherwise, nf-core/methylseq will run this pipeline.\n\nSince bismark v0.21.0 it is also possible to use [HISAT2](https://ccb.jhu.edu/software/hisat2/index.shtml) as alignment tool. To run this workflow, invoke the pipeline with the command line flag `--aligner bismark_hisat`. HISAT2 also supports splice-aware alignment if analysis of RNA is desired (e.g. [SLAMseq](https://science.sciencemag.org/content/360/6390/800) experiments), a file containing a list of known splicesites can be provided with `--known_splices`.\n\nThe second workflow uses [BWA-Meth](https://github.com/brentp/bwa-meth) and [MethylDackel](https://github.com/dpryan79/methyldackel). To run this workflow, run the pipeline with the command line flag `--aligner bwameth`.\n\nThe third workflow uses [Biscuit](https://huishenlab.github.io/biscuit/). To run this workflow, run the pipeline with the command line flag `--aligner biscuit`." }, "non_directional": { "type": "boolean", "description": "Run alignment against all four possible strands.", - "help_text": "By default, Bismark assumes that libraries are directional and does not align against complementary strands. If your library prep was not directional, use `--non_directional` to align against all four possible strands.\n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", + "help_text": "All three aligners (Biscuit, Bismark, and bwa-meth) support 'directional' alignment, where reads are aligned against only the (converted) genome sequence ('original top' and 'original bottom' sequences). If your libraries are directional, this should result in faster and more accurate alignments.\nHowever, some library preparations produce library molecules which align against all four strands ('original top', 'original bottom', 'complement to original top', and 'complement to original bottom'). If your library is of this type, you should set this flag and use either the Bismark or Biscuit aligners (bwa-meth does not support non-directional alignment). \nSee [Biscuit](https://huishenlab.github.io/biscuit/docs/alignment#which-strand-to-map)\nor [Bismark](https://www.bioinformatics.babraham.ac.uk/projects/bismark/Bismark_User_Guide.pdf) docs for more details. \n\nNote that the `--single_cell` and `--zymo` parameters both set the `--non_directional` workflow flag automatically.", "fa_icon": "fas fa-exchange-alt" } }, - "required": ["aligner"], + "required": [ + "aligner" + ], "fa_icon": "fas fa-braille" }, "methylation_calling_options": { @@ -175,28 +185,29 @@ "properties": { "merge_cg": { "type": "boolean", - "description": "Bismark: output stranded cytosine report. Biscuit: don't merge data from neighboring C and G in CpG context", - "help_text": "By default, Bismark does not produce stranded calls. If this option is set to `false` the output considers all Cs on both forward and reverse strands and reports their position, strand, trinucleotide context and methylation state.\n\nBy default, biscuit produces stranded methylation calls (i.e. the methylation states of the two Cs on opposite strands of a CpG dinucleotide are considered separately). If this option is set to `true` (default), methylation information from both strands will be merged. ", + "description": "Set to false to report stranded methylation calls", + "help_text": "In many circumstances, it's desirable to merge the methylation data for the two paired cytosines in a CpG dinucleotide context. Such 'merged' data might also be referred to as 'unstranded methylation calls', as it does not differentiate between the two strands. \n\nIf this behavior is undesired, set this flag to `false` to retain information about strand-specific methylation. This has the following effects for each mapping tool:\n\n- Bismark: sets the `--cytosine_report` parameter for methylation extraction step\n- bwa-meth/MethylDackel: does not use the `--mergeContext` option in MethylDackel extract\n- biscuit: skips the `mergecg` step in the pipeline", "fa_icon": "fas fa-clipboard", "default": true }, "meth_cutoff": { "type": "integer", "description": "Minimum read depth to report a methylation call", - "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", - "fa_icon": "fas fa-angle-double-down" + "help_text": "Sets the minimum required depth to report cytosine methylation information (default, 1, reports methylation at all covered sites). This flag has the following actions for the different mapping workflows:\n\n- Bismark: sets the `--cutoff` flag\n- bwa-meth: sets the `--minDepth` flag in MethylDackel `extract`\n- Biscuit: sets the `-k` flag in `biscuit pileup`", + "fa_icon": "fas fa-angle-double-down", + "default": 1 }, "comprehensive": { "type": "boolean", "description": "Output information for all cytosine contexts.", "fa_icon": "fas fa-arrows-alt", - "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nIf specified, this flag instructs the Bismark methylation extractor to use the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\n\nIf using the bwa-meth workflow, the flag makes MethylDackel report CHG and CHH contexts as well.\n\nIf using the biscuit workflow, this flag causes biscuit vcf2bed to report information concerning all cytosine contexts" + "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nThis flag has the following effects for each of the workflows:\n\nBismark: sets the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\nbwa-meth: sets the `--CHG` and `--CHH` flags in MethylDackel `extract`\nBiscuit: sets `-t c` in biscuit `pileup`" }, "no_overlap": { "type": "boolean", "default": true, "description": "Ignore read 2 methylation when it overlaps read 1", - "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. ", + "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. \n\nThis option has the following effects for the different workflows:\n\nBismark: sets `--no_overlap` if set to `true`, otherwise sets `--include_overlap`\nBiscuit: sets the `-d` flag in biscuit `pileup` if set to `false`\n\n**Note that bwa-meth has no option to double-count cytosines in overlapping reads**", "fa_icon": "fas fa-allergies" }, "ignore": { @@ -204,27 +215,27 @@ "default": 0, "fa_icon": "far fa-eye-slash", "description": "Ignore methylation in the first n bases of 5' end of reads", - "help_text": "Note this parameter has a different behavior for Biscuit vs Bismark aligners!\n\nBismark: Ignore the first bp from the 5' end of **Read 1**of paired-end sequencing results only.\nBiscuit: Ignore the first bp from the 5' end of **all** reads." + "help_text": "Methylation calls are frequently biased at the beginning and end of a read. Set this parameter to exclude methlation calls from the first few bases of a read. \n\n** Please note that the behavior of this flag differs in each aligner! **\n\nBismark: Ignore the first bp from the 5' end of **Read 1** of paired-end sequencing results only.\nbwa-meth: Ignore the first bp from the 5' end of **Read 1**\n\nBiscuit: Ignore the first bp from the 5' end of **all** reads." }, "ignore_3prime": { "type": "integer", "default": 0, "fa_icon": "far fa-eye-slash", "description": "Ignore methylation in the last n bases of 3' end of reads", - "help_text": "Note this parameter has a different behavior for Biscuit vs Bismark aligners!\n\nBismark: Ignore the last bp from the 3' end of **Read 1**of paired-end sequencing results only.\nBiscuit: Ignore the last bp from the 3' end of **all** reads." + "help_text": "Methylation calls are frequently biased at the beginning and end of a read. Set this parameter to exclude methlation calls from the first few bases of a read. \n\n** Please note that the behavior of this flag differs in each aligner! **\n\nBismark: Ignore the last bp from the 3' end of **Read 1** of paired-end sequencing results only.\nbwa-meth: Ignore the last bp from the 3' end of **Read 1**\n\nBiscuit: Ignore the last bp from the 3' end of **all** reads." }, "ignore_r2": { "type": "integer", "default": 2, "description": "Ignore methylation in first n bases of 5' end of R2", - "help_text": "Ignore the first bp from the 5' end of Read 2 of paired-end sequencing results only. Since the first couple of bases in Read 2 of BS-Seq experiments show a severe bias towards non-methylation as a result of end-repairing sonicated fragments with unmethylated cytosines (see M-bias plot), it is recommended that the first couple of bp of Read 2 are removed before starting downstream analysis. Please see the section on M-bias plots in the Bismark User Guide for more details.", + "help_text": "Methylation calls are frequently biased at the beginning and end of a read. Set this parameter to exclude methlation calls from the first few bases of a read. \n\n** Please note that the behavior of this flag differs in each aligner! **\n\nBismark: Ignore the first bp from the 5' end of **Read 2** of paired-end sequencing results only.\nbwa-meth: Ignore the first bp from the 5' end of **Read 2**\n\nBiscuit: not supported (Biscuit does not currently discriminate between read 1 and read 2 for this option; use the `ignore` and `ignore_3prime` options to ignore methylation at the ends of both reads)", "fa_icon": "far fa-eye-slash" }, "ignore_3prime_r2": { "type": "integer", "default": 2, "description": "Ignore methylation in last n bases of 3' end of R2", - "help_text": "Ignore the last bp from the 3' end of Read 1 (or single-end alignment files) when processing the methylation call string. This can remove unwanted biases from the end of reads.", + "help_text": "Methylation calls are frequently biased at the beginning and end of a read. Set this parameter to exclude methlation calls from the first few bases of a read. \n\n** Please note that the behavior of this flag differs in each aligner! **\n\nBismark: Ignore the last bp from the 3' end of **Read 2** of paired-end sequencing results only.\nbwa-meth: Ignore the last bp from the 3' end of **Read 2**\n\nBiscuit: not supported (Biscuit does not currently discriminate between read 1 and read 2 for this option; use the `ignore` and `ignore_3prime` options to ignore methylation at the ends of both reads)", "fa_icon": "far fa-eye-slash" } } @@ -470,7 +481,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"] + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ] }, "validate_params": { "type": "boolean", From f52a294673c6518841574f1e32ed96f48e12e1f2 Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 8 Mar 2023 09:18:38 -0500 Subject: [PATCH 24/28] fancy config for methyldackel actually works now --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79ba9534..1da1a15c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,8 @@ - 🧹 Refactoring of parameters, especially those that generalize across aligners: - `--non_directional` is now under 'Alignment options' rather than 'Bismark options', as both the Bismark and Biscuit aligners support directional and non-directional alignment. - New `Methylation calling options` section - - `--no_merge_cg` replaces the former `--cytosine_report` option. Biscuit produces stranded methylation calls, while bismark does not (by default). - - `--meth_cutoff`, `--comprehensive` applies to all 3 aligners + - `--no_merge_cg` replaces the former `--cytosine_report` option. Biscuit and bwa-meth produce stranded methylation calls by default, while bismark does not. This flag abstracts away + - `--meth_cutoff`, `--comprehensive`, and the `--ignore` parameters apply to all 3 aligners - `--no_overlap` applies to biscuit and bismark but NOT bwa-meth ## [v2.3.0](https://github.com/nf-core/methylseq/releases/tag/2.3.0) - 2022-12-16 From b5e919a75aa43e63db2c56c3fbb84355f8345a1d Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 8 Mar 2023 09:30:47 -0500 Subject: [PATCH 25/28] more schema tweaks --- CHANGELOG.md | 3 ++- conf/modules.config | 24 +++++++++++------------- nextflow_schema.json | 18 ++++++++++-------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da1a15c..11419480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,11 @@ - 🧹 Refactoring of parameters, especially those that generalize across aligners: - `--non_directional` is now under 'Alignment options' rather than 'Bismark options', as both the Bismark and Biscuit aligners support directional and non-directional alignment. - - New `Methylation calling options` section + - New 'Methylation calling options' section - `--no_merge_cg` replaces the former `--cytosine_report` option. Biscuit and bwa-meth produce stranded methylation calls by default, while bismark does not. This flag abstracts away - `--meth_cutoff`, `--comprehensive`, and the `--ignore` parameters apply to all 3 aligners - `--no_overlap` applies to biscuit and bismark but NOT bwa-meth + - `--nomeseq` has been moved to 'Special Library Types' as both `bismark` and `biscuit` support NOMe-seq. ## [v2.3.0](https://github.com/nf-core/methylseq/releases/tag/2.3.0) - 2022-12-16 diff --git a/conf/modules.config b/conf/modules.config index 830e13b8..1d63c1fb 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -10,12 +10,6 @@ ---------------------------------------------------------------------------------------- */ -def make_methyldackel_exclude = { - def exclude_bases = [params.ignore, params.ignore_3prime, params.ignore_r2, params.ignore_3prime_r2].join(",") - def md_args = ["--nOT", "--nOB", "--nCTOT", "--nCTOB"] - return md_args.collect { "$it $exclude_bases" }.join(" ") -} - process { publishDir = [ @@ -606,13 +600,17 @@ process { } withName: METHYLDACKEL_EXTRACT { - ext.args = [ - params.comprehensive ? ' --CHG --CHH' : '', - params.ignore_flags ? " --ignoreFlags" : '', - params.methyl_kit ? " --methylKit" : '', - params.meth_cutoff ? " --minDepth ${params.meth_cutoff}" : '', - (params.ignore > 0) || (params.ignore_3prime > 0) || (params.ignore_r2 > 0) || (params.ignore_3prime_r2 > 0) ? make_methyldackel_exclude() : "", - ].join(" ").trim() + ext.args = { + def simple_args = [ + params.comprehensive ? ' --CHG --CHH' : '', + params.ignore_flags ? " --ignoreFlags" : '', + params.methyl_kit ? " --methylKit" : '', + params.meth_cutoff ? " --minDepth ${params.meth_cutoff}" : '', + ].join(" ") + def ignore_bases = [params.ignore, params.ignore_3prime, params.ignore_r2, params.ignore_3prime_r2].join(",") + def ignore_args = ["--nOT", "--nOB", "--nCTOT", "--nCTOB"].collect { "$it $ignore_bases" }.join(" ") + return [simple_args, ignore_args].join(" ").trim() + } publishDir = [ [ path: { "${params.outdir}/methyldackel" }, diff --git a/nextflow_schema.json b/nextflow_schema.json index b755d09b..b27bbca7 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -342,7 +342,8 @@ "nextseq_trim": { "type": "integer", "default": 0, - "description": "Trim bases below this quality value from the 3' end of the read, ignoring high-quality G bases" + "description": "Trim bases below this quality value from the 3' end of the read, ignoring high-quality G bases", + "fa_icon": "fas fa-cut" } }, "fa_icon": "fas fa-cut", @@ -355,12 +356,6 @@ "default": "", "fa_icon": "fas fa-circle", "properties": { - "local_alignment": { - "type": "boolean", - "description": "Allow soft-clipping of reads (potentially useful for single-cell experiments).", - "help_text": "Specify to run Bismark with the `--local` flag to allow soft-clipping of reads. This should only be used with care in certain single-cell applications or PBAT libraries, which may produce chimeric read pairs. (See [Wu et al.](https://doi.org/10.1093/bioinformatics/btz125)).", - "fa_icon": "fas fa-search" - }, "relax_mismatches": { "type": "boolean", "description": "Turn on to relax stringency for alignment (set allowed penalty with --num_mismatches).", @@ -380,6 +375,12 @@ "help_text": "Specify to run Bismark with the `--known-splicesite-infile` flag to run splice-aware alignment using HISAT2. A `.gtf` file has to be provided from which a list of known splicesites is created by the pipeline\n\n> NB: This only works when using the `bismark_hisat` aligner with `--align`", "fa_icon": "fas fa-barcode" }, + "local_alignment": { + "type": "boolean", + "description": "Allow soft-clipping of reads (potentially useful for single-cell experiments).", + "help_text": "Specify to run Bismark with the `--local` flag to allow soft-clipping of reads. This should only be used with care in certain single-cell applications or PBAT libraries, which may produce chimeric read pairs. (See [Wu et al.](https://doi.org/10.1093/bioinformatics/btz125)).", + "fa_icon": "fas fa-search" + }, "minins": { "type": "integer", "fa_icon": "fas fa-compress-alt", @@ -450,7 +451,8 @@ }, "skip_multiqc": { "type": "boolean", - "description": "Skip MultiQC" + "description": "Skip MultiQC", + "fa_icon": "fas fa-fast-forward" } }, "fa_icon": "fas fa-fast-forward" From 7c98649729b1b5bcdb96358c40adb7791bdd2f0c Mon Sep 17 00:00:00 2001 From: Nathan Spix <56930974+njspix@users.noreply.github.com> Date: Wed, 8 Mar 2023 09:40:17 -0500 Subject: [PATCH 26/28] changelog updates --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11419480..e463abd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - 🧹 Refactoring of parameters, especially those that generalize across aligners: - `--non_directional` is now under 'Alignment options' rather than 'Bismark options', as both the Bismark and Biscuit aligners support directional and non-directional alignment. - New 'Methylation calling options' section - - `--no_merge_cg` replaces the former `--cytosine_report` option. Biscuit and bwa-meth produce stranded methylation calls by default, while bismark does not. This flag abstracts away + - `--merge_cg` replaces the former `--cytosine_report` option. Biscuit and bwa-meth produce stranded methylation calls by default, while bismark does not. This flag abstracts away all the necessary flags for each tool, and defaults to producing merged (unstranded) methylationc calls. - `--meth_cutoff`, `--comprehensive`, and the `--ignore` parameters apply to all 3 aligners - `--no_overlap` applies to biscuit and bismark but NOT bwa-meth - `--nomeseq` has been moved to 'Special Library Types' as both `bismark` and `biscuit` support NOMe-seq. From dd859872fc52c557ce2b68a3f0fa7802bdf0982a Mon Sep 17 00:00:00 2001 From: njspix Date: Mon, 8 Jan 2024 17:47:37 -0500 Subject: [PATCH 27/28] module updates --- modules.json | 202 ++++--- modules/nf-core/biscuit/align/environment.yml | 8 + modules/nf-core/biscuit/align/main.nf | 4 +- modules/nf-core/biscuit/align/meta.yml | 8 +- .../biscuit/biscuitblaster/environment.yml | 9 + .../nf-core/biscuit/biscuitblaster/main.nf | 4 +- .../nf-core/biscuit/biscuitblaster/meta.yml | 11 +- .../nf-core/biscuit/bsconv/environment.yml | 7 + modules/nf-core/biscuit/bsconv/main.nf | 4 +- modules/nf-core/biscuit/bsconv/meta.yml | 7 +- modules/nf-core/biscuit/index/environment.yml | 7 + modules/nf-core/biscuit/index/main.nf | 4 +- modules/nf-core/biscuit/index/meta.yml | 7 +- .../nf-core/biscuit/mergecg/environment.yml | 8 + modules/nf-core/biscuit/mergecg/main.nf | 4 +- modules/nf-core/biscuit/mergecg/meta.yml | 8 +- .../nf-core/biscuit/pileup/environment.yml | 8 + modules/nf-core/biscuit/pileup/main.nf | 4 +- modules/nf-core/biscuit/pileup/meta.yml | 16 +- modules/nf-core/biscuit/qc/environment.yml | 7 + modules/nf-core/biscuit/qc/main.nf | 4 +- modules/nf-core/biscuit/qc/meta.yml | 7 +- .../nf-core/biscuit/vcf2bed/environment.yml | 8 + modules/nf-core/biscuit/vcf2bed/main.nf | 4 +- modules/nf-core/biscuit/vcf2bed/meta.yml | 6 +- modules/nf-core/bismark/align/environment.yml | 7 + modules/nf-core/bismark/align/main.nf | 2 +- modules/nf-core/bismark/align/meta.yml | 2 + .../nf-core/bismark/align/tests/main.nf.test | 250 +++++++++ .../bismark/align/tests/main.nf.test.snap | 120 ++++ .../align/tests/nextflow_bowtie2.config | 8 + .../align/tests/nextflow_hisat2.config | 8 + .../align/tests/nextflow_minimap2.config | 8 + modules/nf-core/bismark/align/tests/tags.yml | 2 + .../bismark/coverage2cytosine/environment.yml | 7 + .../nf-core/bismark/coverage2cytosine/main.nf | 2 +- .../bismark/coverage2cytosine/meta.yml | 5 +- .../coverage2cytosine/tests/main.nf.test | 58 ++ .../coverage2cytosine/tests/main.nf.test.snap | 57 ++ .../bismark/coverage2cytosine/tests/tags.yml | 2 + .../bismark/deduplicate/environment.yml | 7 + modules/nf-core/bismark/deduplicate/main.nf | 2 +- modules/nf-core/bismark/deduplicate/meta.yml | 2 + .../bismark/deduplicate/tests/main.nf.test | 36 ++ .../deduplicate/tests/main.nf.test.snap | 51 ++ .../bismark/deduplicate/tests/tags.yml | 2 + .../bismark/genomepreparation/environment.yml | 7 + .../nf-core/bismark/genomepreparation/main.nf | 2 +- .../bismark/genomepreparation/meta.yml | 2 + .../genomepreparation/tests/main.nf.test | 33 ++ .../genomepreparation/tests/main.nf.test.snap | 65 +++ .../bismark/genomepreparation/tests/tags.yml | 2 + .../methylationextractor/environment.yml | 7 + .../bismark/methylationextractor/main.nf | 2 +- .../bismark/methylationextractor/meta.yml | 4 +- .../methylationextractor/tests/main.nf.test | 48 ++ .../tests/main.nf.test.snap | 119 ++++ .../methylationextractor/tests/tags.yml | 2 + .../nf-core/bismark/report/environment.yml | 7 + modules/nf-core/bismark/report/main.nf | 2 +- modules/nf-core/bismark/report/meta.yml | 2 + .../nf-core/bismark/report/tests/main.nf.test | 90 +++ .../bismark/report/tests/main.nf.test.snap | 10 + modules/nf-core/bismark/report/tests/tags.yml | 2 + .../nf-core/bismark/summary/environment.yml | 7 + modules/nf-core/bismark/summary/main.nf | 2 +- modules/nf-core/bismark/summary/meta.yml | 6 +- .../bismark/summary/tests/main.nf.test | 91 ++++ .../bismark/summary/tests/main.nf.test.snap | 10 + .../nf-core/bismark/summary/tests/tags.yml | 2 + modules/nf-core/bwameth/align/environment.yml | 7 + modules/nf-core/bwameth/align/main.nf | 2 +- modules/nf-core/bwameth/align/meta.yml | 2 + modules/nf-core/bwameth/index/environment.yml | 7 + modules/nf-core/bwameth/index/main.nf | 2 +- modules/nf-core/bwameth/index/meta.yml | 2 + modules/nf-core/cat/fastq/environment.yml | 7 + modules/nf-core/cat/fastq/main.nf | 2 +- modules/nf-core/cat/fastq/meta.yml | 4 +- modules/nf-core/cat/fastq/tests/main.nf.test | 143 +++++ .../nf-core/cat/fastq/tests/main.nf.test.snap | 78 +++ modules/nf-core/cat/fastq/tests/tags.yml | 2 + modules/nf-core/fastqc/tests/main.nf.test | 271 ++++++--- .../nf-core/fastqc/tests/main.nf.test.snap | 12 +- .../methyldackel/extract/environment.yml | 7 + modules/nf-core/methyldackel/extract/main.nf | 2 +- modules/nf-core/methyldackel/extract/meta.yml | 2 + .../methyldackel/mbias/environment.yml | 7 + modules/nf-core/methyldackel/mbias/main.nf | 2 +- modules/nf-core/methyldackel/mbias/meta.yml | 2 + .../picard/markduplicates/environment.yml | 7 + modules/nf-core/picard/markduplicates/main.nf | 14 +- .../nf-core/picard/markduplicates/meta.yml | 15 + .../picard/markduplicates/tests/main.nf.test | 111 ++++ .../markduplicates/tests/main.nf.test.snap | 44 ++ .../markduplicates/tests/nextflow.config | 6 + .../picard/markduplicates/tests/tags.yml | 2 + .../nf-core/preseq/lcextrap/environment.yml | 7 + modules/nf-core/preseq/lcextrap/main.nf | 2 +- modules/nf-core/preseq/lcextrap/meta.yml | 7 +- .../preseq/lcextrap/tests/main.nf.test | 53 ++ .../preseq/lcextrap/tests/main.nf.test.snap | 58 ++ .../nf-core/preseq/lcextrap/tests/tags.yml | 2 + .../nf-core/qualimap/bamqc/environment.yml | 7 + modules/nf-core/qualimap/bamqc/main.nf | 2 +- modules/nf-core/qualimap/bamqc/meta.yml | 4 +- .../qualimap/bamqccram/environment.yml | 8 + modules/nf-core/qualimap/bamqccram/main.nf | 2 +- modules/nf-core/qualimap/bamqccram/meta.yml | 2 + .../nf-core/samtools/faidx/environment.yml | 7 + modules/nf-core/samtools/faidx/main.nf | 22 +- modules/nf-core/samtools/faidx/meta.yml | 18 +- .../nf-core/samtools/flagstat/environment.yml | 7 + modules/nf-core/samtools/flagstat/main.nf | 6 +- modules/nf-core/samtools/flagstat/meta.yml | 2 + .../samtools/flagstat/tests/main.nf.test | 36 ++ .../samtools/flagstat/tests/main.nf.test.snap | 16 + .../nf-core/samtools/flagstat/tests/tags.yml | 2 + .../nf-core/samtools/index/environment.yml | 7 + modules/nf-core/samtools/index/main.nf | 6 +- modules/nf-core/samtools/index/meta.yml | 4 + .../samtools/index/tests/csi.nextflow.config | 7 + .../nf-core/samtools/index/tests/main.nf.test | 87 +++ .../samtools/index/tests/main.nf.test.snap | 28 + modules/nf-core/samtools/index/tests/tags.yml | 2 + modules/nf-core/samtools/sort/environment.yml | 7 + modules/nf-core/samtools/sort/main.nf | 6 +- modules/nf-core/samtools/sort/meta.yml | 3 + .../nf-core/samtools/sort/tests/main.nf.test | 73 +++ .../samtools/sort/tests/main.nf.test.snap | 48 ++ .../samtools/sort/tests/nextflow.config | 7 + modules/nf-core/samtools/sort/tests/tags.yml | 3 + .../nf-core/samtools/stats/environment.yml | 7 + modules/nf-core/samtools/stats/main.nf | 8 +- modules/nf-core/samtools/stats/meta.yml | 14 +- .../nf-core/samtools/stats/tests/main.nf.test | 78 +++ .../samtools/stats/tests/main.nf.test.snap | 64 +++ modules/nf-core/samtools/stats/tests/tags.yml | 2 + modules/nf-core/trimgalore/environment.yml | 7 + modules/nf-core/trimgalore/main.nf | 2 +- modules/nf-core/trimgalore/meta.yml | 4 + modules/nf-core/trimgalore/tests/main.nf.test | 105 ++++ .../trimgalore/tests/main.nf.test.snap | 148 +++++ modules/nf-core/trimgalore/tests/tags.yml | 2 + modules/nf-core/untar/environment.yml | 1 + modules/nf-core/untar/tests/main.nf.test | 77 +++ modules/nf-core/untar/tests/main.nf.test.snap | 513 ++++++++++++++++++ modules/nf-core/untar/tests/tags.yml | 2 + 148 files changed, 3614 insertions(+), 268 deletions(-) create mode 100644 modules/nf-core/biscuit/align/environment.yml create mode 100644 modules/nf-core/biscuit/biscuitblaster/environment.yml create mode 100644 modules/nf-core/biscuit/bsconv/environment.yml create mode 100644 modules/nf-core/biscuit/index/environment.yml create mode 100644 modules/nf-core/biscuit/mergecg/environment.yml create mode 100644 modules/nf-core/biscuit/pileup/environment.yml create mode 100644 modules/nf-core/biscuit/qc/environment.yml create mode 100644 modules/nf-core/biscuit/vcf2bed/environment.yml create mode 100644 modules/nf-core/bismark/align/environment.yml create mode 100644 modules/nf-core/bismark/align/tests/main.nf.test create mode 100644 modules/nf-core/bismark/align/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/align/tests/nextflow_bowtie2.config create mode 100644 modules/nf-core/bismark/align/tests/nextflow_hisat2.config create mode 100644 modules/nf-core/bismark/align/tests/nextflow_minimap2.config create mode 100644 modules/nf-core/bismark/align/tests/tags.yml create mode 100644 modules/nf-core/bismark/coverage2cytosine/environment.yml create mode 100644 modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test create mode 100644 modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/coverage2cytosine/tests/tags.yml create mode 100644 modules/nf-core/bismark/deduplicate/environment.yml create mode 100644 modules/nf-core/bismark/deduplicate/tests/main.nf.test create mode 100644 modules/nf-core/bismark/deduplicate/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/deduplicate/tests/tags.yml create mode 100644 modules/nf-core/bismark/genomepreparation/environment.yml create mode 100644 modules/nf-core/bismark/genomepreparation/tests/main.nf.test create mode 100644 modules/nf-core/bismark/genomepreparation/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/genomepreparation/tests/tags.yml create mode 100644 modules/nf-core/bismark/methylationextractor/environment.yml create mode 100644 modules/nf-core/bismark/methylationextractor/tests/main.nf.test create mode 100644 modules/nf-core/bismark/methylationextractor/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/methylationextractor/tests/tags.yml create mode 100644 modules/nf-core/bismark/report/environment.yml create mode 100644 modules/nf-core/bismark/report/tests/main.nf.test create mode 100644 modules/nf-core/bismark/report/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/report/tests/tags.yml create mode 100644 modules/nf-core/bismark/summary/environment.yml create mode 100644 modules/nf-core/bismark/summary/tests/main.nf.test create mode 100644 modules/nf-core/bismark/summary/tests/main.nf.test.snap create mode 100644 modules/nf-core/bismark/summary/tests/tags.yml create mode 100644 modules/nf-core/bwameth/align/environment.yml create mode 100644 modules/nf-core/bwameth/index/environment.yml create mode 100644 modules/nf-core/cat/fastq/environment.yml create mode 100644 modules/nf-core/cat/fastq/tests/main.nf.test create mode 100644 modules/nf-core/cat/fastq/tests/main.nf.test.snap create mode 100644 modules/nf-core/cat/fastq/tests/tags.yml create mode 100644 modules/nf-core/methyldackel/extract/environment.yml create mode 100644 modules/nf-core/methyldackel/mbias/environment.yml create mode 100644 modules/nf-core/picard/markduplicates/environment.yml create mode 100644 modules/nf-core/picard/markduplicates/tests/main.nf.test create mode 100644 modules/nf-core/picard/markduplicates/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/markduplicates/tests/nextflow.config create mode 100644 modules/nf-core/picard/markduplicates/tests/tags.yml create mode 100644 modules/nf-core/preseq/lcextrap/environment.yml create mode 100644 modules/nf-core/preseq/lcextrap/tests/main.nf.test create mode 100644 modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap create mode 100644 modules/nf-core/preseq/lcextrap/tests/tags.yml create mode 100644 modules/nf-core/qualimap/bamqc/environment.yml create mode 100644 modules/nf-core/qualimap/bamqccram/environment.yml create mode 100644 modules/nf-core/samtools/faidx/environment.yml create mode 100644 modules/nf-core/samtools/flagstat/environment.yml create mode 100644 modules/nf-core/samtools/flagstat/tests/main.nf.test create mode 100644 modules/nf-core/samtools/flagstat/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/flagstat/tests/tags.yml create mode 100644 modules/nf-core/samtools/index/environment.yml create mode 100644 modules/nf-core/samtools/index/tests/csi.nextflow.config create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/index/tests/tags.yml create mode 100644 modules/nf-core/samtools/sort/environment.yml create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test create mode 100644 modules/nf-core/samtools/sort/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/sort/tests/nextflow.config create mode 100644 modules/nf-core/samtools/sort/tests/tags.yml create mode 100644 modules/nf-core/samtools/stats/environment.yml create mode 100644 modules/nf-core/samtools/stats/tests/main.nf.test create mode 100644 modules/nf-core/samtools/stats/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/stats/tests/tags.yml create mode 100644 modules/nf-core/trimgalore/environment.yml create mode 100644 modules/nf-core/trimgalore/tests/main.nf.test create mode 100644 modules/nf-core/trimgalore/tests/main.nf.test.snap create mode 100644 modules/nf-core/trimgalore/tests/tags.yml create mode 100644 modules/nf-core/untar/tests/main.nf.test create mode 100644 modules/nf-core/untar/tests/main.nf.test.snap create mode 100644 modules/nf-core/untar/tests/tags.yml diff --git a/modules.json b/modules.json index a2cc73cf..a4e35c20 100644 --- a/modules.json +++ b/modules.json @@ -7,176 +7,244 @@ "nf-core": { "biscuit/align": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/biscuitblaster": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/bsconv": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/index": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/mergecg": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/pileup": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/qc": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "biscuit/vcf2bed": { "branch": "master", - "git_sha": "0f8a77ff00e65eaeebc509b8156eaa983192474b", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/align": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/coverage2cytosine": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/deduplicate": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/genomepreparation": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/methylationextractor": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/report": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bismark/summary": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bwameth/align": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "bwameth/index": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "cat/fastq": { "branch": "master", - "git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "37dee863936732fe7e05dc598bf6e183a8e7ef73", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", - "git_sha": "65ad3e0b9a4099592e1102e92e10455dc661cf53", - "installed_by": ["modules"] + "git_sha": "617777a807a1770f73deb38c80004bac06807eef", + "installed_by": [ + "modules" + ] }, "methyldackel/extract": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "methyldackel/mbias": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "642a0d8afe373ac45244a7947fb8a6c0a5a312d4", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "picard/markduplicates": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "20b0918591d4ba20047d7e13e5094bcceba81447", + "installed_by": [ + "modules" + ] }, "preseq/lcextrap": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "990d7f86d43f90187236967980337141943e0a79", + "installed_by": [ + "modules" + ] }, "qualimap/bamqc": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "qualimap/bamqccram": { "branch": "master", - "git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "samtools/faidx": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "a64788f5ad388f1d2ac5bd5f1f3f8fc81476148c", + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", - "git_sha": "570ec5bcfe19c49e16c9ca35a7a116563af6cc1c", - "installed_by": ["modules"] + "git_sha": "a64788f5ad388f1d2ac5bd5f1f3f8fc81476148c", + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "a64788f5ad388f1d2ac5bd5f1f3f8fc81476148c", + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", - "git_sha": "a0f7be95788366c1923171e358da7d049eb440f9", - "installed_by": ["modules"] + "git_sha": "a64788f5ad388f1d2ac5bd5f1f3f8fc81476148c", + "installed_by": [ + "modules" + ] }, "samtools/stats": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "a64788f5ad388f1d2ac5bd5f1f3f8fc81476148c", + "installed_by": [ + "modules" + ] }, "trimgalore": { "branch": "master", - "git_sha": "911696ea0b62df80e900ef244d7867d177971f73", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] }, "untar": { "branch": "master", - "git_sha": "8fc1d24c710ebe1d5de0f2447ec9439fd3d9d66a", - "installed_by": ["modules"] + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": [ + "modules" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/biscuit/align/environment.yml b/modules/nf-core/biscuit/align/environment.yml new file mode 100644 index 00000000..90e26ee6 --- /dev/null +++ b/modules/nf-core/biscuit/align/environment.yml @@ -0,0 +1,8 @@ +name: biscuit_align +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/biscuit/align/main.nf b/modules/nf-core/biscuit/align/main.nf index a5fb9ed7..51547487 100644 --- a/modules/nf-core/biscuit/align/main.nf +++ b/modules/nf-core/biscuit/align/main.nf @@ -2,10 +2,10 @@ process BISCUIT_ALIGN { tag "$meta.id" label 'process_high' - conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': - 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + 'biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/biscuit/align/meta.yml b/modules/nf-core/biscuit/align/meta.yml index 3f289e9b..ba75da1c 100644 --- a/modules/nf-core/biscuit/align/meta.yml +++ b/modules/nf-core/biscuit/align/meta.yml @@ -14,9 +14,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/alignment tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -29,10 +27,9 @@ input: List of input fastq files of size 1 and 2 for single-end and paired-end data, respectively. - index: - type: dir + type: directory description: Biscuit genome index directory (generated with 'biscuit index') pattern: "BiscuitIndex" - output: - meta: type: map @@ -51,6 +48,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/biscuitblaster/environment.yml b/modules/nf-core/biscuit/biscuitblaster/environment.yml new file mode 100644 index 00000000..1cf1fbc0 --- /dev/null +++ b/modules/nf-core/biscuit/biscuitblaster/environment.yml @@ -0,0 +1,9 @@ +name: biscuit_blaster +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 + - bioconda::samblaster=0.1.26 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/biscuit/biscuitblaster/main.nf b/modules/nf-core/biscuit/biscuitblaster/main.nf index 96f428c0..bb79d050 100644 --- a/modules/nf-core/biscuit/biscuitblaster/main.nf +++ b/modules/nf-core/biscuit/biscuitblaster/main.nf @@ -2,10 +2,10 @@ process BISCUIT_BLASTER { tag "$meta.id" label 'process_high' - conda "bioconda::biscuit=1.1.0.20220707 bioconda::samblaster=0.1.26 bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': - 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + 'biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/biscuit/biscuitblaster/meta.yml b/modules/nf-core/biscuit/biscuitblaster/meta.yml index 63643e74..1aa16365 100644 --- a/modules/nf-core/biscuit/biscuitblaster/meta.yml +++ b/modules/nf-core/biscuit/biscuitblaster/meta.yml @@ -1,5 +1,4 @@ name: biscuit_blaster - description: A fast, compact one-liner to produce duplicate-marked, sorted, and indexed BAM files using Biscuit keywords: - biscuit @@ -9,14 +8,12 @@ keywords: - bisulfite sequencing - aligner - bam - tools: - biscuit: description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/biscuitblaster/ tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - samblaster: description: | @@ -24,7 +21,6 @@ tools: It can also optionally output discordant read pairs and/or split read mappings to separate SAM files, and/or unmapped/clipped reads to a separate FASTQ file. By default, samblaster reads SAM input from stdin and writes SAM to stdout. - documentation: https://github.com/GregoryFaust/samblaster tool_dev_url: https://github.com/GregoryFaust/samblaster doi: "10.1093/bioinformatics/btu314" @@ -38,7 +34,6 @@ tools: documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 licence: ["MIT"] - input: - meta: type: map @@ -51,10 +46,9 @@ input: List of input fastq files of size 1 and 2 for single-end and paired-end data, respectively. - index: - type: dir + type: directory description: Biscuit genome index directory (generated with 'biscuit index') pattern: "BiscuitIndex" - output: - meta: type: map @@ -73,6 +67,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/bsconv/environment.yml b/modules/nf-core/biscuit/bsconv/environment.yml new file mode 100644 index 00000000..937dbadf --- /dev/null +++ b/modules/nf-core/biscuit/bsconv/environment.yml @@ -0,0 +1,7 @@ +name: biscuit_bsconv +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 diff --git a/modules/nf-core/biscuit/bsconv/main.nf b/modules/nf-core/biscuit/bsconv/main.nf index 67744609..1d7f1240 100644 --- a/modules/nf-core/biscuit/bsconv/main.nf +++ b/modules/nf-core/biscuit/bsconv/main.nf @@ -3,10 +3,10 @@ process BISCUIT_BSCONV { label 'process_long' - conda "bioconda::biscuit=1.1.0.20220707" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': - 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" + 'biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/biscuit/bsconv/meta.yml b/modules/nf-core/biscuit/bsconv/meta.yml index 7873ab5c..e0919db3 100644 --- a/modules/nf-core/biscuit/bsconv/meta.yml +++ b/modules/nf-core/biscuit/bsconv/meta.yml @@ -9,16 +9,13 @@ keywords: - aligner - bam - filter - tools: - biscuit: description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-bsconv tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -35,7 +32,6 @@ input: type: dir description: Biscuit genome index directory (generated with 'biscuit index') pattern: "BiscuitIndex" - output: - meta: type: map @@ -50,6 +46,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/index/environment.yml b/modules/nf-core/biscuit/index/environment.yml new file mode 100644 index 00000000..66b9fde8 --- /dev/null +++ b/modules/nf-core/biscuit/index/environment.yml @@ -0,0 +1,7 @@ +name: biscuit_index +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 diff --git a/modules/nf-core/biscuit/index/main.nf b/modules/nf-core/biscuit/index/main.nf index 84b9cc38..5ed6a417 100644 --- a/modules/nf-core/biscuit/index/main.nf +++ b/modules/nf-core/biscuit/index/main.nf @@ -2,10 +2,10 @@ process BISCUIT_INDEX { tag "$fasta" label 'process_long' - conda "bioconda::biscuit=1.1.0.20220707" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': - 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" + 'biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: path fasta, stageAs: "BiscuitIndex/*" diff --git a/modules/nf-core/biscuit/index/meta.yml b/modules/nf-core/biscuit/index/meta.yml index 027f2049..d7a7d449 100644 --- a/modules/nf-core/biscuit/index/meta.yml +++ b/modules/nf-core/biscuit/index/meta.yml @@ -9,21 +9,17 @@ keywords: - index - reference - fasta - tools: - biscuit: description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/alignment tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - fasta: type: file description: Input genome fasta file - output: - index: type: dir @@ -33,6 +29,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/mergecg/environment.yml b/modules/nf-core/biscuit/mergecg/environment.yml new file mode 100644 index 00000000..eb9d77b4 --- /dev/null +++ b/modules/nf-core/biscuit/mergecg/environment.yml @@ -0,0 +1,8 @@ +name: biscuit_mergecg +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/biscuit/mergecg/main.nf b/modules/nf-core/biscuit/mergecg/main.nf index 6840902f..6d1768fc 100644 --- a/modules/nf-core/biscuit/mergecg/main.nf +++ b/modules/nf-core/biscuit/mergecg/main.nf @@ -2,10 +2,10 @@ process BISCUIT_MERGECG { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': - 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + 'biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: diff --git a/modules/nf-core/biscuit/mergecg/meta.yml b/modules/nf-core/biscuit/mergecg/meta.yml index 88e66831..99570c81 100644 --- a/modules/nf-core/biscuit/mergecg/meta.yml +++ b/modules/nf-core/biscuit/mergecg/meta.yml @@ -14,9 +14,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -28,10 +26,9 @@ input: description: | Biscuit BED file (output of biscuit vcf2bed) - index: - type: dir + type: directory description: Biscuit genome index directory (generated with 'biscuit index') pattern: "BiscuitIndex" - output: - meta: type: map @@ -46,6 +43,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/pileup/environment.yml b/modules/nf-core/biscuit/pileup/environment.yml new file mode 100644 index 00000000..60132b4d --- /dev/null +++ b/modules/nf-core/biscuit/pileup/environment.yml @@ -0,0 +1,8 @@ +name: biscuit_pileup +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/biscuit/pileup/main.nf b/modules/nf-core/biscuit/pileup/main.nf index c4ba9e6f..43b151c3 100644 --- a/modules/nf-core/biscuit/pileup/main.nf +++ b/modules/nf-core/biscuit/pileup/main.nf @@ -2,10 +2,10 @@ process BISCUIT_PILEUP { tag "$meta.id" label 'process_high' - conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': - 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + 'biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(normal_bams), path(normal_bais), path(tumor_bam), path(tumor_bai) diff --git a/modules/nf-core/biscuit/pileup/meta.yml b/modules/nf-core/biscuit/pileup/meta.yml index e4fd7d36..b32d564e 100644 --- a/modules/nf-core/biscuit/pileup/meta.yml +++ b/modules/nf-core/biscuit/pileup/meta.yml @@ -15,9 +15,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/pileup.html tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -25,32 +23,31 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - normal_bams: - type: file(s) + type: file description: | BAM files to be analyzed. If no tumor_bam file is provided, any number of "normal" BAMs may be provided ("normal" here is just a semantic issue, these BAMs could be from tumor or any other kind of tissue). If a tumor BAM file is provided, exactly one normal (germline) BAM must be provided. pattern: "*.{bam}" - normal_bais: - type: file(s) + type: file description: BAM index file or files corresponding to the provided normal_bams pattern: "*.{bai}" - tumor_bam: - type: file(s) + type: file description: | Optional. If a tumor BAM file is provided, pileup will run in "somatic" mode and will annotate variants with their somatic state (present in tumor only, present in normal only, present in both, etc). Note that if a tumor BAM file is provided, exactly one normal BAM must be provided. pattern: "*.{bam}" - tumor_bai: - type: file(s) + type: file description: Optional. BAM index file corresponding to provided tumor_bam pattern: "*.{bai}" - index: - type: dir + type: directory description: Biscuit genome index directory (generated with 'biscuit index') pattern: "BiscuitIndex" - output: - meta: type: map @@ -65,6 +62,7 @@ output: type: file description: vcf file with methylation information pattern: "*.{vcf.gz}" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/qc/environment.yml b/modules/nf-core/biscuit/qc/environment.yml new file mode 100644 index 00000000..9e9f3a26 --- /dev/null +++ b/modules/nf-core/biscuit/qc/environment.yml @@ -0,0 +1,7 @@ +name: biscuit_qc +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 diff --git a/modules/nf-core/biscuit/qc/main.nf b/modules/nf-core/biscuit/qc/main.nf index 29e4eaa7..701ff769 100644 --- a/modules/nf-core/biscuit/qc/main.nf +++ b/modules/nf-core/biscuit/qc/main.nf @@ -2,10 +2,10 @@ process BISCUIT_QC { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.1.0.20220707" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biscuit:1.1.0.20220707--he272189_1': - 'quay.io/biocontainers/biscuit:1.1.0.20220707--he272189_1' }" + 'biocontainers/biscuit:1.1.0.20220707--he272189_1' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/biscuit/qc/meta.yml b/modules/nf-core/biscuit/qc/meta.yml index c0200626..92199338 100644 --- a/modules/nf-core/biscuit/qc/meta.yml +++ b/modules/nf-core/biscuit/qc/meta.yml @@ -9,16 +9,13 @@ keywords: - index - BAM - quality control - tools: - biscuit: description: A utility for analyzing sodium bisulfite conversion-based DNA methylation/modification data homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/subcommand_help.html#biscuit-qc tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -28,7 +25,6 @@ input: - bam: type: file description: BAM file produced using Biscuit - output: - biscuit_qc_reports: type: file @@ -46,6 +42,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/biscuit/vcf2bed/environment.yml b/modules/nf-core/biscuit/vcf2bed/environment.yml new file mode 100644 index 00000000..ed6dca0c --- /dev/null +++ b/modules/nf-core/biscuit/vcf2bed/environment.yml @@ -0,0 +1,8 @@ +name: biscuit_vcf2bed +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::biscuit=1.1.0.20220707 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/biscuit/vcf2bed/main.nf b/modules/nf-core/biscuit/vcf2bed/main.nf index 426a9b42..ea8c85dc 100644 --- a/modules/nf-core/biscuit/vcf2bed/main.nf +++ b/modules/nf-core/biscuit/vcf2bed/main.nf @@ -2,10 +2,10 @@ process BISCUIT_VCF2BED { tag "$meta.id" label 'process_long' - conda "bioconda::biscuit=1.1.0.20220707 bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0': - 'quay.io/biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" + 'biocontainers/mulled-v2-d94f582b04a3edcede1215189c0d881506640fd9:6519548ea4f3d6a526c78ad0350c58f867f28574-0' }" input: tuple val(meta), path(vcf) diff --git a/modules/nf-core/biscuit/vcf2bed/meta.yml b/modules/nf-core/biscuit/vcf2bed/meta.yml index ffecea71..f03e62c3 100644 --- a/modules/nf-core/biscuit/vcf2bed/meta.yml +++ b/modules/nf-core/biscuit/vcf2bed/meta.yml @@ -16,9 +16,7 @@ tools: homepage: https://huishenlab.github.io/biscuit/ documentation: https://huishenlab.github.io/biscuit/docs/methylextraction.html tool_dev_url: https://github.com/huishenlab/biscuit - licence: ["MIT"] - input: - meta: type: map @@ -28,7 +26,6 @@ input: - vcf: type: file description: Biscuit vcf file (output of biscuit pileup) - output: - meta: type: map @@ -43,6 +40,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@njspix" +maintainers: + - "@njspix" diff --git a/modules/nf-core/bismark/align/environment.yml b/modules/nf-core/bismark/align/environment.yml new file mode 100644 index 00000000..d7cb8a29 --- /dev/null +++ b/modules/nf-core/bismark/align/environment.yml @@ -0,0 +1,7 @@ +name: bismark_align +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/align/main.nf b/modules/nf-core/bismark/align/main.nf index d36f6726..3487979e 100644 --- a/modules/nf-core/bismark/align/main.nf +++ b/modules/nf-core/bismark/align/main.nf @@ -2,7 +2,7 @@ process BISMARK_ALIGN { tag "$meta.id" label 'process_high' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/align/meta.yml b/modules/nf-core/bismark/align/meta.yml index 91c17b8a..03b9826e 100644 --- a/modules/nf-core/bismark/align/meta.yml +++ b/modules/nf-core/bismark/align/meta.yml @@ -58,3 +58,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/align/tests/main.nf.test b/modules/nf-core/bismark/align/tests/main.nf.test new file mode 100644 index 00000000..07139556 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/main.nf.test @@ -0,0 +1,250 @@ +nextflow_process { + + name "Test Process BISMARK_ALIGN" + script "../main.nf" + process "BISMARK_ALIGN" + tag "bismark" + tag "bismark/align" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/align (bowtie2 single end) without failures") { + config './nextflow_bowtie2.config' + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.bam).match("bam_bt2_se") }, + { assert snapshot(process.out.unmapped).match("unmapped_bt2_se") }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith("bt2_SE_report.txt") + assert path(get(1)).readLines().last().contains("Bismark completed in") + } + } + } + ) + } + } + + test("Should run bismark/align (bowtie2 paired end) without failures") { + config './nextflow_bowtie2.config' + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) + ] + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.bam).match("bam_bt2_pe") }, + { assert snapshot(process.out.unmapped).match("unmapped_bt2_pe") }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith("_bt2_PE_report.txt") + assert path(get(1)).readLines().last().contains("Bismark completed in") + } + } + } + ) + } + } + + test("Should run bismark/align (hisat2 single end) without failures") { + config './nextflow_hisat2.config' + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.bam).match("bam_hisat2_se") }, + { assert snapshot(process.out.unmapped).match("unmapped_hisat2_se") }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith("hisat2_SE_report.txt") + assert path(get(1)).readLines().last().contains("Bismark completed in") + } + } + } + ) + } + } + + test("Should run bismark/align (hisat2 paired end) without failures") { + config './nextflow_hisat2.config' + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) + ] + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.bam).match("bam_hisat2_pe") }, + { assert snapshot(process.out.unmapped).match("unmapped_hisat2_pe") }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith("hisat2_PE_report.txt") + assert path(get(1)).readLines().last().contains("Bismark completed in") + } + } + } + ) + } + } + + test("Should run bismark/align (minimap2 single end) without failures") { + config './nextflow_minimap2.config' + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true) + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.bam).match("bam_minimap2_se") }, + { assert snapshot(process.out.unmapped).match("unmapped_minimap2_se") }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith("mm2_SE_report.txt") + assert path(get(1)).readLines().last().contains("Bismark completed in") + } + } + } + ) + } + } +} diff --git a/modules/nf-core/bismark/align/tests/main.nf.test.snap b/modules/nf-core/bismark/align/tests/main.nf.test.snap new file mode 100644 index 00000000..f132e070 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/main.nf.test.snap @@ -0,0 +1,120 @@ +{ + "unmapped_hisat2_pe": { + "content": [ + [ + + ] + ], + "timestamp": "2023-10-18T10:43:05.063588715" + }, + "bam_bt2_se": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.methylated_1_bismark_bt2.bam:md5,315d5299edbd6fe6a3716996bc2129c4" + ] + ] + ], + "timestamp": "2023-10-18T10:42:06.821761726" + }, + "bam_minimap2_se": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.methylated_1_bismark_mm2.bam:md5,d8c54051df96f12e5ceb08cbd58c1ca4" + ] + ] + ], + "timestamp": "2023-10-18T10:43:24.234318958" + }, + "bam_bt2_pe": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.methylated_1_bismark_bt2_pe.bam:md5,e9b17bd5b5897b38562e1e8c18442787" + ] + ] + ], + "timestamp": "2023-10-18T10:42:26.299667292" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,908dc37f43469e417f419f1173047da5" + ] + ], + "timestamp": "2023-10-18T10:42:06.844406815" + }, + "unmapped_minimap2_se": { + "content": [ + [ + + ] + ], + "timestamp": "2023-10-18T10:43:24.254014927" + }, + "unmapped_hisat2_se": { + "content": [ + [ + + ] + ], + "timestamp": "2023-10-18T10:42:45.125915494" + }, + "bam_hisat2_pe": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.methylated_1_bismark_hisat2_pe.bam:md5,120c2da988865860df873f7e4a3dabc1" + ] + ] + ], + "timestamp": "2023-10-18T10:43:05.047908937" + }, + "unmapped_bt2_se": { + "content": [ + [ + + ] + ], + "timestamp": "2023-10-18T10:42:06.838672413" + }, + "bam_hisat2_se": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.methylated_1_bismark_hisat2.bam:md5,cc5f52b3269540cf121e32c0512ea8d6" + ] + ] + ], + "timestamp": "2023-10-18T10:42:45.112219005" + }, + "unmapped_bt2_pe": { + "content": [ + [ + + ] + ], + "timestamp": "2023-10-18T10:42:26.310951647" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/align/tests/nextflow_bowtie2.config b/modules/nf-core/bismark/align/tests/nextflow_bowtie2.config new file mode 100644 index 00000000..cf0357e2 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/nextflow_bowtie2.config @@ -0,0 +1,8 @@ +process { + withName: BISMARK_ALIGN { + ext.args = '--bowtie2' + } + withName: BISMARK_GENOMEPREPARATION { + ext.args = '--bowtie2' + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/align/tests/nextflow_hisat2.config b/modules/nf-core/bismark/align/tests/nextflow_hisat2.config new file mode 100644 index 00000000..5b962ae0 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/nextflow_hisat2.config @@ -0,0 +1,8 @@ +process { + withName: BISMARK_ALIGN { + ext.args = '--hisat2' + } + withName: BISMARK_GENOMEPREPARATION { + ext.args = '--hisat2' + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/align/tests/nextflow_minimap2.config b/modules/nf-core/bismark/align/tests/nextflow_minimap2.config new file mode 100644 index 00000000..dd46fe26 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/nextflow_minimap2.config @@ -0,0 +1,8 @@ +process { + withName: BISMARK_ALIGN { + ext.args = '--minimap2' + } + withName: BISMARK_GENOMEPREPARATION { + ext.args = '--minimap2' + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/align/tests/tags.yml b/modules/nf-core/bismark/align/tests/tags.yml new file mode 100644 index 00000000..dd99d819 --- /dev/null +++ b/modules/nf-core/bismark/align/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/align: + - modules/nf-core/bismark/align/** diff --git a/modules/nf-core/bismark/coverage2cytosine/environment.yml b/modules/nf-core/bismark/coverage2cytosine/environment.yml new file mode 100644 index 00000000..abda2847 --- /dev/null +++ b/modules/nf-core/bismark/coverage2cytosine/environment.yml @@ -0,0 +1,7 @@ +name: bismark_coverage2cytosine +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/coverage2cytosine/main.nf b/modules/nf-core/bismark/coverage2cytosine/main.nf index f5429700..0ad2d434 100644 --- a/modules/nf-core/bismark/coverage2cytosine/main.nf +++ b/modules/nf-core/bismark/coverage2cytosine/main.nf @@ -2,7 +2,7 @@ process BISMARK_COVERAGE2CYTOSINE { tag "$meta.id" label 'process_low' - conda "bioconda::bismark=0.23.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/coverage2cytosine/meta.yml b/modules/nf-core/bismark/coverage2cytosine/meta.yml index 511578c8..e9d6bde0 100644 --- a/modules/nf-core/bismark/coverage2cytosine/meta.yml +++ b/modules/nf-core/bismark/coverage2cytosine/meta.yml @@ -20,7 +20,6 @@ tools: documentation: https://github.com/FelixKrueger/Bismark/tree/master/Docs doi: 10.1093/bioinformatics/btr167 licence: ["GPL-3.0-or-later"] - input: - meta: type: map @@ -35,7 +34,6 @@ input: type: dir description: Bismark genome index directory pattern: "BismarkIndex" - output: - meta: type: map @@ -58,6 +56,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@ewels" +maintainers: + - "@ewels" diff --git a/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test b/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test new file mode 100644 index 00000000..e6618054 --- /dev/null +++ b/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test @@ -0,0 +1,58 @@ +nextflow_process { + + name "Test Process BISMARK_COVERAGE2CYTOSINE" + script "../main.nf" + process "BISMARK_COVERAGE2CYTOSINE" + tag "bismark" + tag "bismark/coverage2cytosine" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/coverage2cytosine without failures") { + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + run("BISMARK_METHYLATIONEXTRACTOR") { + script "../../methylationextractor/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_bam'], checkIfExists: true) + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = BISMARK_METHYLATIONEXTRACTOR.out.coverage + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test.snap b/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test.snap new file mode 100644 index 00000000..17474a02 --- /dev/null +++ b/modules/nf-core/bismark/coverage2cytosine/tests/main.nf.test.snap @@ -0,0 +1,57 @@ +{ + "Should run bismark/coverage2cytosine without failures": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CpG_report.txt.gz:md5,f0d16086d10e5ba32a4b71e4a349342a" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cytosine_context_summary.txt:md5,5ed486bfa844a5e476a7ab054a7a8d6b" + ] + ], + "3": [ + "versions.yml:md5,9ad535f8f13a38c9bc3f0975fbfee39c" + ], + "coverage": [ + + ], + "report": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CpG_report.txt.gz:md5,f0d16086d10e5ba32a4b71e4a349342a" + ] + ], + "summary": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cytosine_context_summary.txt:md5,5ed486bfa844a5e476a7ab054a7a8d6b" + ] + ], + "versions": [ + "versions.yml:md5,9ad535f8f13a38c9bc3f0975fbfee39c" + ] + } + ], + "timestamp": "2023-10-17T11:21:30.915147802" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/coverage2cytosine/tests/tags.yml b/modules/nf-core/bismark/coverage2cytosine/tests/tags.yml new file mode 100644 index 00000000..aec54b67 --- /dev/null +++ b/modules/nf-core/bismark/coverage2cytosine/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/coverage2cytosine: + - modules/nf-core/bismark/coverage2cytosine/** diff --git a/modules/nf-core/bismark/deduplicate/environment.yml b/modules/nf-core/bismark/deduplicate/environment.yml new file mode 100644 index 00000000..6160c2e6 --- /dev/null +++ b/modules/nf-core/bismark/deduplicate/environment.yml @@ -0,0 +1,7 @@ +name: bismark_deduplicate +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/deduplicate/main.nf b/modules/nf-core/bismark/deduplicate/main.nf index 7e238d77..e41b601b 100644 --- a/modules/nf-core/bismark/deduplicate/main.nf +++ b/modules/nf-core/bismark/deduplicate/main.nf @@ -2,7 +2,7 @@ process BISMARK_DEDUPLICATE { tag "$meta.id" label 'process_high' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/deduplicate/meta.yml b/modules/nf-core/bismark/deduplicate/meta.yml index a310a851..cb48f6b1 100644 --- a/modules/nf-core/bismark/deduplicate/meta.yml +++ b/modules/nf-core/bismark/deduplicate/meta.yml @@ -51,3 +51,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/deduplicate/tests/main.nf.test b/modules/nf-core/bismark/deduplicate/tests/main.nf.test new file mode 100644 index 00000000..478c69b6 --- /dev/null +++ b/modules/nf-core/bismark/deduplicate/tests/main.nf.test @@ -0,0 +1,36 @@ +nextflow_process { + + name "Test Process BISMARK_DEDUPLICATE" + script "../main.nf" + process "BISMARK_DEDUPLICATE" + tag "bismark" + tag "bismark/deduplicate" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/deduplicate without failures") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bismark/deduplicate/tests/main.nf.test.snap b/modules/nf-core/bismark/deduplicate/tests/main.nf.test.snap new file mode 100644 index 00000000..6a69ed34 --- /dev/null +++ b/modules/nf-core/bismark/deduplicate/tests/main.nf.test.snap @@ -0,0 +1,51 @@ +{ + "Should run bismark/deduplicate without failures": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.deduplicated.bam:md5,ac241d97729ecf98b294a7371346dcdb" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.deduplication_report.txt:md5,86aaf87bac9ccdc3cc83628f20b902dc" + ] + ], + "2": [ + "versions.yml:md5,1859cf7d4e598dec0678f073c9e2f539" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.deduplicated.bam:md5,ac241d97729ecf98b294a7371346dcdb" + ] + ], + "report": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.deduplication_report.txt:md5,86aaf87bac9ccdc3cc83628f20b902dc" + ] + ], + "versions": [ + "versions.yml:md5,1859cf7d4e598dec0678f073c9e2f539" + ] + } + ], + "timestamp": "2023-10-17T10:32:40.893624928" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/deduplicate/tests/tags.yml b/modules/nf-core/bismark/deduplicate/tests/tags.yml new file mode 100644 index 00000000..35ac3505 --- /dev/null +++ b/modules/nf-core/bismark/deduplicate/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/deduplicate: + - modules/nf-core/bismark/deduplicate/** diff --git a/modules/nf-core/bismark/genomepreparation/environment.yml b/modules/nf-core/bismark/genomepreparation/environment.yml new file mode 100644 index 00000000..e27febfc --- /dev/null +++ b/modules/nf-core/bismark/genomepreparation/environment.yml @@ -0,0 +1,7 @@ +name: bismark_genomepreparation +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/genomepreparation/main.nf b/modules/nf-core/bismark/genomepreparation/main.nf index 8f424443..7f5a2eee 100644 --- a/modules/nf-core/bismark/genomepreparation/main.nf +++ b/modules/nf-core/bismark/genomepreparation/main.nf @@ -2,7 +2,7 @@ process BISMARK_GENOMEPREPARATION { tag "$fasta" label 'process_high' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/genomepreparation/meta.yml b/modules/nf-core/bismark/genomepreparation/meta.yml index 23588e1d..06fe4f8c 100644 --- a/modules/nf-core/bismark/genomepreparation/meta.yml +++ b/modules/nf-core/bismark/genomepreparation/meta.yml @@ -36,3 +36,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/genomepreparation/tests/main.nf.test b/modules/nf-core/bismark/genomepreparation/tests/main.nf.test new file mode 100644 index 00000000..d21ebddf --- /dev/null +++ b/modules/nf-core/bismark/genomepreparation/tests/main.nf.test @@ -0,0 +1,33 @@ +nextflow_process { + + name "Test Process BISMARK_GENOMEPREPARATION" + script "../main.nf" + process "BISMARK_GENOMEPREPARATION" + tag "bismark" + tag "bismark/genomepreparation" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/genomepreparation without failures") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bismark/genomepreparation/tests/main.nf.test.snap b/modules/nf-core/bismark/genomepreparation/tests/main.nf.test.snap new file mode 100644 index 00000000..a343efad --- /dev/null +++ b/modules/nf-core/bismark/genomepreparation/tests/main.nf.test.snap @@ -0,0 +1,65 @@ +{ + "Should run bismark/genomepreparation without failures": { + "content": [ + { + "0": [ + [ + [ + [ + "BS_CT.1.bt2:md5,10a8854e5eeb95629f46d24b0d8da70c", + "BS_CT.2.bt2:md5,bc5d407e6fce3e1cdb4b23ab2a20f707", + "BS_CT.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "BS_CT.4.bt2:md5,6c4f549575e5882ff3a97ae10ae2e7be", + "BS_CT.rev.1.bt2:md5,d37d586b41b6a36efb25839961d242cb", + "BS_CT.rev.2.bt2:md5,48bf400de85cd7324fbf6bf38fe2dc95", + "genome_mfa.CT_conversion.fa:md5,903b9f357eea4a5f36e21e78e0fe1dfa" + ], + [ + "BS_GA.1.bt2:md5,a6fa4068ed10872568f32568c66cb600", + "BS_GA.2.bt2:md5,fc5b634e2f5137801e3801d62ad05f74", + "BS_GA.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "BS_GA.4.bt2:md5,b1e855685ed634daa7df8e180c9b2fc4", + "BS_GA.rev.1.bt2:md5,17f51e65f44477962226a83b369b2bc4", + "BS_GA.rev.2.bt2:md5,d36044c5dfe37af0411f60d446585bc6", + "genome_mfa.GA_conversion.fa:md5,e529375ec2039112161465b5169fcd59" + ] + ], + "genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "1": [ + "versions.yml:md5,92d3bda85e8d9517fce396c615141003" + ], + "index": [ + [ + [ + [ + "BS_CT.1.bt2:md5,10a8854e5eeb95629f46d24b0d8da70c", + "BS_CT.2.bt2:md5,bc5d407e6fce3e1cdb4b23ab2a20f707", + "BS_CT.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "BS_CT.4.bt2:md5,6c4f549575e5882ff3a97ae10ae2e7be", + "BS_CT.rev.1.bt2:md5,d37d586b41b6a36efb25839961d242cb", + "BS_CT.rev.2.bt2:md5,48bf400de85cd7324fbf6bf38fe2dc95", + "genome_mfa.CT_conversion.fa:md5,903b9f357eea4a5f36e21e78e0fe1dfa" + ], + [ + "BS_GA.1.bt2:md5,a6fa4068ed10872568f32568c66cb600", + "BS_GA.2.bt2:md5,fc5b634e2f5137801e3801d62ad05f74", + "BS_GA.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "BS_GA.4.bt2:md5,b1e855685ed634daa7df8e180c9b2fc4", + "BS_GA.rev.1.bt2:md5,17f51e65f44477962226a83b369b2bc4", + "BS_GA.rev.2.bt2:md5,d36044c5dfe37af0411f60d446585bc6", + "genome_mfa.GA_conversion.fa:md5,e529375ec2039112161465b5169fcd59" + ] + ], + "genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "versions": [ + "versions.yml:md5,92d3bda85e8d9517fce396c615141003" + ] + } + ], + "timestamp": "2023-10-17T16:14:41.509500586" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/genomepreparation/tests/tags.yml b/modules/nf-core/bismark/genomepreparation/tests/tags.yml new file mode 100644 index 00000000..279f91bb --- /dev/null +++ b/modules/nf-core/bismark/genomepreparation/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/genomepreparation: + - modules/nf-core/bismark/genomepreparation/** diff --git a/modules/nf-core/bismark/methylationextractor/environment.yml b/modules/nf-core/bismark/methylationextractor/environment.yml new file mode 100644 index 00000000..33ca1190 --- /dev/null +++ b/modules/nf-core/bismark/methylationextractor/environment.yml @@ -0,0 +1,7 @@ +name: bismark_methylationextractor +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/methylationextractor/main.nf b/modules/nf-core/bismark/methylationextractor/main.nf index 2a3e5d22..44395155 100644 --- a/modules/nf-core/bismark/methylationextractor/main.nf +++ b/modules/nf-core/bismark/methylationextractor/main.nf @@ -2,7 +2,7 @@ process BISMARK_METHYLATIONEXTRACTOR { tag "$meta.id" label 'process_high' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/methylationextractor/meta.yml b/modules/nf-core/bismark/methylationextractor/meta.yml index 81b14144..ea13ae3a 100644 --- a/modules/nf-core/bismark/methylationextractor/meta.yml +++ b/modules/nf-core/bismark/methylationextractor/meta.yml @@ -31,7 +31,7 @@ input: description: BAM file containing read alignments pattern: "*.{bam}" - index: - type: dir + type: directory description: Bismark genome index directory pattern: "BismarkIndex" output: @@ -66,3 +66,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/methylationextractor/tests/main.nf.test b/modules/nf-core/bismark/methylationextractor/tests/main.nf.test new file mode 100644 index 00000000..46d3ae8c --- /dev/null +++ b/modules/nf-core/bismark/methylationextractor/tests/main.nf.test @@ -0,0 +1,48 @@ +nextflow_process { + + name "Test Process BISMARK_METHYLATIONEXTRACTOR" + script "../main.nf" + process "BISMARK_METHYLATIONEXTRACTOR" + tag "bismark" + tag "bismark/methylationextractor" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/methylationextractor without failures") { + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_bam'], checkIfExists: true) + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match()} + ) + } + + } + +} diff --git a/modules/nf-core/bismark/methylationextractor/tests/main.nf.test.snap b/modules/nf-core/bismark/methylationextractor/tests/main.nf.test.snap new file mode 100644 index 00000000..c435a88d --- /dev/null +++ b/modules/nf-core/bismark/methylationextractor/tests/main.nf.test.snap @@ -0,0 +1,119 @@ +{ + "Should run bismark/methylationextractor without failures": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.bedGraph.gz:md5,6d8484ab5f0df684466a0a2491aab3c0" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "CHG_OB_test.paired_end.methylated.txt.gz:md5,6b72fe72d5a14743f5bdb0e89c2a8db1", + "CHG_OT_test.paired_end.methylated.txt.gz:md5,bfe87776316f342c72a8811d6ac50251", + "CHH_OB_test.paired_end.methylated.txt.gz:md5,63ccf90597f4339918c3432b35d584be", + "CHH_OT_test.paired_end.methylated.txt.gz:md5,a6164bdea00c97ecfb76f0e224d8fb7b", + "CpG_OB_test.paired_end.methylated.txt.gz:md5,e923376d9fa8a6d4e76489782904bd90", + "CpG_OT_test.paired_end.methylated.txt.gz:md5,4296ac6d0a7832909c4775b8fee88afc" + ] + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.bismark.cov.gz:md5,6805ae041310ded6ce819dfb206be761" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated_splitting_report.txt:md5,4ebaa7ff42aad09b4c7edd38150fef12" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.M-bias.txt:md5,0b100924d46b3c35115f1206f34c4a59" + ] + ], + "5": [ + "versions.yml:md5,b2efe40312b4b8fcd8276d788f89c1da" + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.bedGraph.gz:md5,6d8484ab5f0df684466a0a2491aab3c0" + ] + ], + "coverage": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.bismark.cov.gz:md5,6805ae041310ded6ce819dfb206be761" + ] + ], + "mbias": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.M-bias.txt:md5,0b100924d46b3c35115f1206f34c4a59" + ] + ], + "methylation_calls": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "CHG_OB_test.paired_end.methylated.txt.gz:md5,6b72fe72d5a14743f5bdb0e89c2a8db1", + "CHG_OT_test.paired_end.methylated.txt.gz:md5,bfe87776316f342c72a8811d6ac50251", + "CHH_OB_test.paired_end.methylated.txt.gz:md5,63ccf90597f4339918c3432b35d584be", + "CHH_OT_test.paired_end.methylated.txt.gz:md5,a6164bdea00c97ecfb76f0e224d8fb7b", + "CpG_OB_test.paired_end.methylated.txt.gz:md5,e923376d9fa8a6d4e76489782904bd90", + "CpG_OT_test.paired_end.methylated.txt.gz:md5,4296ac6d0a7832909c4775b8fee88afc" + ] + ] + ], + "report": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated_splitting_report.txt:md5,4ebaa7ff42aad09b4c7edd38150fef12" + ] + ], + "versions": [ + "versions.yml:md5,b2efe40312b4b8fcd8276d788f89c1da" + ] + } + ], + "timestamp": "2023-10-17T10:55:16.009653232" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/methylationextractor/tests/tags.yml b/modules/nf-core/bismark/methylationextractor/tests/tags.yml new file mode 100644 index 00000000..272e4df1 --- /dev/null +++ b/modules/nf-core/bismark/methylationextractor/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/methylationextractor: + - modules/nf-core/bismark/methylationextractor/** diff --git a/modules/nf-core/bismark/report/environment.yml b/modules/nf-core/bismark/report/environment.yml new file mode 100644 index 00000000..2725a605 --- /dev/null +++ b/modules/nf-core/bismark/report/environment.yml @@ -0,0 +1,7 @@ +name: bismark_report +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/report/main.nf b/modules/nf-core/bismark/report/main.nf index 804a141d..6570f098 100644 --- a/modules/nf-core/bismark/report/main.nf +++ b/modules/nf-core/bismark/report/main.nf @@ -2,7 +2,7 @@ process BISMARK_REPORT { tag "$meta.id" label 'process_low' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/report/meta.yml b/modules/nf-core/bismark/report/meta.yml index 1f6be782..2307a28e 100644 --- a/modules/nf-core/bismark/report/meta.yml +++ b/modules/nf-core/bismark/report/meta.yml @@ -59,3 +59,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/report/tests/main.nf.test b/modules/nf-core/bismark/report/tests/main.nf.test new file mode 100644 index 00000000..196126ff --- /dev/null +++ b/modules/nf-core/bismark/report/tests/main.nf.test @@ -0,0 +1,90 @@ +nextflow_process { + + name "Test Process BISMARK_REPORT" + script "../main.nf" + process "BISMARK_REPORT" + tag "bismark" + tag "bismark/report" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/report without failures") { + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + run("BISMARK_ALIGN") { + script "../../align/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) + ] + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + run("BISMARK_DEDUPLICATE") { + script "../../deduplicate/main.nf" + process { + """ + input[0] = BISMARK_ALIGN.out.bam + """ + } + } + + run("BISMARK_METHYLATIONEXTRACTOR") { + script "../../methylationextractor/main.nf" + process { + """ + input[0] = BISMARK_ALIGN.out.bam + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = BISMARK_ALIGN.out.report + .join(BISMARK_DEDUPLICATE.out.report) + .join(BISMARK_METHYLATIONEXTRACTOR.out.report) + .join(BISMARK_METHYLATIONEXTRACTOR.out.mbias) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.report) { + with(get(0)) { + assert get(1).endsWith('_PE_report.html') + assert path(get(1)).readLines().last().contains('') + } + } + } + ) + } + + } + +} diff --git a/modules/nf-core/bismark/report/tests/main.nf.test.snap b/modules/nf-core/bismark/report/tests/main.nf.test.snap new file mode 100644 index 00000000..dc05e655 --- /dev/null +++ b/modules/nf-core/bismark/report/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,c2e2c0bd500e9ce95ae7ab82f667270b" + ] + ], + "timestamp": "2023-10-17T16:13:42.879192383" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/report/tests/tags.yml b/modules/nf-core/bismark/report/tests/tags.yml new file mode 100644 index 00000000..c72a1f94 --- /dev/null +++ b/modules/nf-core/bismark/report/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/report: + - modules/nf-core/bismark/report/** diff --git a/modules/nf-core/bismark/summary/environment.yml b/modules/nf-core/bismark/summary/environment.yml new file mode 100644 index 00000000..8c0fe3d2 --- /dev/null +++ b/modules/nf-core/bismark/summary/environment.yml @@ -0,0 +1,7 @@ +name: bismark_summary +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bismark=0.24.0 diff --git a/modules/nf-core/bismark/summary/main.nf b/modules/nf-core/bismark/summary/main.nf index 399f960d..34cebffb 100644 --- a/modules/nf-core/bismark/summary/main.nf +++ b/modules/nf-core/bismark/summary/main.nf @@ -1,7 +1,7 @@ process BISMARK_SUMMARY { label 'process_low' - conda "bioconda::bismark=0.24.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bismark:0.24.0--hdfd78af_0' : 'biocontainers/bismark:0.24.0--hdfd78af_0' }" diff --git a/modules/nf-core/bismark/summary/meta.yml b/modules/nf-core/bismark/summary/meta.yml index 96814826..6acf44e6 100644 --- a/modules/nf-core/bismark/summary/meta.yml +++ b/modules/nf-core/bismark/summary/meta.yml @@ -23,8 +23,8 @@ tools: licence: ["GPL-3.0-or-later"] input: - bam: - type: value - description: Array of Bismark alignment BAM filenames + type: list + description: List of Bismark alignment BAM filenames pattern: "*.bam" - align_report: type: file @@ -53,3 +53,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bismark/summary/tests/main.nf.test b/modules/nf-core/bismark/summary/tests/main.nf.test new file mode 100644 index 00000000..e04f01f8 --- /dev/null +++ b/modules/nf-core/bismark/summary/tests/main.nf.test @@ -0,0 +1,91 @@ +nextflow_process { + + name "Test Process BISMARK_SUMMARY" + script "../main.nf" + process "BISMARK_SUMMARY" + tag "bismark" + tag "bismark/summary" + tag "modules" + tag "modules_nfcore" + + test("Should run bismark/summary without failures") { + + setup { + run("BISMARK_GENOMEPREPARATION") { + script "../../genomepreparation/main.nf" + process { + """ + input[0] = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + """ + } + } + + run("BISMARK_ALIGN") { + script "../../align/main.nf" + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_methylated_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_methylated_2_fastq_gz'], checkIfExists: true) + ] + ] + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + + run("BISMARK_DEDUPLICATE") { + script "../../deduplicate/main.nf" + process { + """ + input[0] = BISMARK_ALIGN.out.bam + """ + } + } + + run("BISMARK_METHYLATIONEXTRACTOR") { + script "../../methylationextractor/main.nf" + process { + """ + input[0] = BISMARK_ALIGN.out.bam + input[1] = BISMARK_GENOMEPREPARATION.out.index + """ + } + } + } + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = BISMARK_ALIGN.out.bam.collect { meta, bam -> bam } + input[1] = BISMARK_ALIGN.out.report.collect { meta, report -> report } + input[2] = BISMARK_DEDUPLICATE.out.report.collect { meta, report -> report } + input[3] = BISMARK_METHYLATIONEXTRACTOR.out.report.collect { meta, report -> report } + input[4] = BISMARK_METHYLATIONEXTRACTOR.out.mbias.collect { meta, txt -> txt } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") }, + { + with(process.out.summary) { + assert get(0).size() == 2 + assert get(0).every { it.contains('bismark_summary_report') } + assert path(get(0).get(1)).readLines().first().contains('CpGs') + assert path(get(0).get(0)).readLines().last().contains('') + } + } + ) + } + + } + +} diff --git a/modules/nf-core/bismark/summary/tests/main.nf.test.snap b/modules/nf-core/bismark/summary/tests/main.nf.test.snap new file mode 100644 index 00000000..acb445c1 --- /dev/null +++ b/modules/nf-core/bismark/summary/tests/main.nf.test.snap @@ -0,0 +1,10 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,22bb5a457e4eef7ab3556e464263ce04" + ] + ], + "timestamp": "2023-10-17T15:12:35.102032381" + } +} \ No newline at end of file diff --git a/modules/nf-core/bismark/summary/tests/tags.yml b/modules/nf-core/bismark/summary/tests/tags.yml new file mode 100644 index 00000000..3d7ee037 --- /dev/null +++ b/modules/nf-core/bismark/summary/tests/tags.yml @@ -0,0 +1,2 @@ +bismark/summary: + - modules/nf-core/bismark/summary/** diff --git a/modules/nf-core/bwameth/align/environment.yml b/modules/nf-core/bwameth/align/environment.yml new file mode 100644 index 00000000..c2711df3 --- /dev/null +++ b/modules/nf-core/bwameth/align/environment.yml @@ -0,0 +1,7 @@ +name: bwameth_align +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bwameth=0.2.2 diff --git a/modules/nf-core/bwameth/align/main.nf b/modules/nf-core/bwameth/align/main.nf index 47304035..72471cc8 100644 --- a/modules/nf-core/bwameth/align/main.nf +++ b/modules/nf-core/bwameth/align/main.nf @@ -2,7 +2,7 @@ process BWAMETH_ALIGN { tag "$meta.id" label 'process_high' - conda "bioconda::bwameth=0.2.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bwameth:0.2.2--py_1' : 'biocontainers/bwameth:0.2.2--py_1' }" diff --git a/modules/nf-core/bwameth/align/meta.yml b/modules/nf-core/bwameth/align/meta.yml index 7d22bc84..041c026d 100644 --- a/modules/nf-core/bwameth/align/meta.yml +++ b/modules/nf-core/bwameth/align/meta.yml @@ -51,3 +51,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/bwameth/index/environment.yml b/modules/nf-core/bwameth/index/environment.yml new file mode 100644 index 00000000..4fb62092 --- /dev/null +++ b/modules/nf-core/bwameth/index/environment.yml @@ -0,0 +1,7 @@ +name: bwameth_index +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::bwameth=0.2.2 diff --git a/modules/nf-core/bwameth/index/main.nf b/modules/nf-core/bwameth/index/main.nf index 1c789885..563f8570 100644 --- a/modules/nf-core/bwameth/index/main.nf +++ b/modules/nf-core/bwameth/index/main.nf @@ -2,7 +2,7 @@ process BWAMETH_INDEX { tag "$fasta" label 'process_high' - conda "bioconda::bwameth=0.2.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/bwameth:0.2.2--py_1' : 'biocontainers/bwameth:0.2.2--py_1' }" diff --git a/modules/nf-core/bwameth/index/meta.yml b/modules/nf-core/bwameth/index/meta.yml index 903ae95c..731e6805 100644 --- a/modules/nf-core/bwameth/index/meta.yml +++ b/modules/nf-core/bwameth/index/meta.yml @@ -32,3 +32,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml new file mode 100644 index 00000000..bff93add --- /dev/null +++ b/modules/nf-core/cat/fastq/environment.yml @@ -0,0 +1,7 @@ +name: cat_fastq +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - conda-forge::sed=4.7 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index 5021e6fc..3d963784 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -2,7 +2,7 @@ process CAT_FASTQ { tag "$meta.id" label 'process_single' - conda "conda-forge::sed=4.7" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : 'nf-core/ubuntu:20.04' }" diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index 8a39e309..db4ac3c7 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -34,7 +34,9 @@ output: type: file description: File containing software versions pattern: "versions.yml" - authors: - "@joseespinosa" - "@drpatelh" +maintainers: + - "@joseespinosa" + - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test new file mode 100644 index 00000000..f5f94182 --- /dev/null +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -0,0 +1,143 @@ +nextflow_process { + + name "Test Process CAT_FASTQ" + script "../main.nf" + process "CAT_FASTQ" + tag "modules" + tag "modules_nfcore" + tag "cat" + tag "cat/fastq" + + test("test_cat_fastq_single_end") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.reads).match() }, + { assert path(process.out.versions.get(0)).getText().contains("cat") } + ) + } + } + + test("test_cat_fastq_paired_end") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.reads).match() }, + { assert path(process.out.versions.get(0)).getText().contains("cat") } + ) + } + } + + test("test_cat_fastq_single_end_same_name") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.reads).match() }, + { assert path(process.out.versions.get(0)).getText().contains("cat") } + ) + } + } + + test("test_cat_fastq_paired_end_same_name") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.reads).match() }, + { assert path(process.out.versions.get(0)).getText().contains("cat") } + ) + } + } + + test("test_cat_fastq_single_end_single_file") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.reads).match() }, + { assert path(process.out.versions.get(0)).getText().contains("cat") } + ) + } + } +} diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap new file mode 100644 index 00000000..ec2342e5 --- /dev/null +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -0,0 +1,78 @@ +{ + "test_cat_fastq_single_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,f9cf5e375f7de81a406144a2c70cc64d" + ] + ] + ], + "timestamp": "2023-10-17T23:19:12.990284837" + }, + "test_cat_fastq_single_end_same_name": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,63f817db7a29a03eb538104495556f66" + ] + ] + ], + "timestamp": "2023-10-17T23:19:31.554568147" + }, + "test_cat_fastq_single_end_single_file": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,e325ef7deb4023447a1f074e285761af" + ] + ] + ], + "timestamp": "2023-10-17T23:19:49.629360033" + }, + "test_cat_fastq_paired_end_same_name": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,63f817db7a29a03eb538104495556f66", + "test_2.merged.fastq.gz:md5,fe9f266f43a6fc3dcab690a18419a56e" + ] + ] + ] + ], + "timestamp": "2023-10-17T23:19:40.711617539" + }, + "test_cat_fastq_paired_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,f9cf5e375f7de81a406144a2c70cc64d", + "test_2.merged.fastq.gz:md5,77c8e966e130d8c6b6ec9be52fcb2bda" + ] + ] + ] + ], + "timestamp": "2023-10-18T07:53:20.923560211" + } +} \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml new file mode 100644 index 00000000..6ac43614 --- /dev/null +++ b/modules/nf-core/cat/fastq/tests/tags.yml @@ -0,0 +1,2 @@ +cat/fastq: + - modules/nf-core/cat/fastq/** diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test index b9e8f926..ad9bc54f 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -3,23 +3,21 @@ nextflow_process { name "Test Process FASTQC" script "../main.nf" process "FASTQC" + tag "modules" tag "modules_nfcore" tag "fastqc" - test("Single-Read") { + test("sarscov2 single-end [fastq]") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = [ - [ id: 'test', single_end:true ], - [ - file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) - ] + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] ] """ } @@ -28,82 +26,195 @@ nextflow_process { then { assertAll ( { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. // looks like this:
Mon 2 Oct 2023
test.gz
// https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - { assert process.out.html.get(0).get(1) ==~ ".*/test_fastqc.html" }, - { assert path(process.out.html.get(0).get(1)).getText().contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match("versions") }, - { assert process.out.zip.get(0).get(1) ==~ ".*/test_fastqc.zip" } + + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("sarscov2 paired-end [fastq]") { + + when { + process { + """ + input[0] = [ + [id: 'test', single_end: false], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("sarscov2 interleaved [fastq]") { + + when { + process { + """ + input[0] = [ + [id: 'test', single_end: false], // meta map + file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("sarscov2 paired-end [bam]") { + + when { + process { + """ + input[0] = [ + [id: 'test', single_end: false], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } ) } } -// TODO -// // -// // Test with paired-end data -// // -// workflow test_fastqc_paired_end { -// input = [ -// [id: 'test', single_end: false], // meta map -// [ -// file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), -// file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) -// ] -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with interleaved data -// // -// workflow test_fastqc_interleaved { -// input = [ -// [id: 'test', single_end: false], // meta map -// file(params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with bam data -// // -// workflow test_fastqc_bam { -// input = [ -// [id: 'test', single_end: false], // meta map -// file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with multiple samples -// // -// workflow test_fastqc_multiple { -// input = [ -// [id: 'test', single_end: false], // meta map -// [ -// file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), -// file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true), -// file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true), -// file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) -// ] -// ] - -// FASTQC ( input ) -// } - -// // -// // Test with custom prefix -// // -// workflow test_fastqc_custom_prefix { -// input = [ -// [ id:'mysample', single_end:true ], // meta map -// file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) -// ] - -// FASTQC ( input ) -// } + + test("sarscov2 multiple [fastq]") { + + when { + process { + """ + input[0] = [ + [id: 'test', single_end: false], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, + { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, + { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("sarscov2 custom_prefix") { + + when { + process { + """ + input[0] = [ + [ id:'mysample', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + + { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + + { assert snapshot(process.out.versions).match("versions") } + ) + } + } + + test("sarscov2 single-end [fastq] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.html.collect { file(it[1]).getName() } + + process.out.zip.collect { file(it[1]).getName() } + + process.out.versions ).match() } + ) + } + } + } diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap index 636a32ce..5ef5afbd 100644 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -1,10 +1,20 @@ { + "sarscov2 single-end [fastq] - stub": { + "content": [ + [ + "test.html", + "test.zip", + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "timestamp": "2023-12-29T02:48:05.126117287" + }, "versions": { "content": [ [ "versions.yml:md5,e1cc25ca8af856014824abd842e93978" ] ], - "timestamp": "2023-10-09T23:40:54+0000" + "timestamp": "2023-12-29T02:46:49.507942667" } } \ No newline at end of file diff --git a/modules/nf-core/methyldackel/extract/environment.yml b/modules/nf-core/methyldackel/extract/environment.yml new file mode 100644 index 00000000..03f1b020 --- /dev/null +++ b/modules/nf-core/methyldackel/extract/environment.yml @@ -0,0 +1,7 @@ +name: methyldackel_extract +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::methyldackel=0.6.0 diff --git a/modules/nf-core/methyldackel/extract/main.nf b/modules/nf-core/methyldackel/extract/main.nf index 32951459..c824b6b1 100644 --- a/modules/nf-core/methyldackel/extract/main.nf +++ b/modules/nf-core/methyldackel/extract/main.nf @@ -2,7 +2,7 @@ process METHYLDACKEL_EXTRACT { tag "$meta.id" label 'process_medium' - conda "bioconda::methyldackel=0.6.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : 'biocontainers/methyldackel:0.6.0--h22771d5_0' }" diff --git a/modules/nf-core/methyldackel/extract/meta.yml b/modules/nf-core/methyldackel/extract/meta.yml index 9d777bb1..7ce950c7 100644 --- a/modules/nf-core/methyldackel/extract/meta.yml +++ b/modules/nf-core/methyldackel/extract/meta.yml @@ -60,3 +60,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/methyldackel/mbias/environment.yml b/modules/nf-core/methyldackel/mbias/environment.yml new file mode 100644 index 00000000..f7cebb6f --- /dev/null +++ b/modules/nf-core/methyldackel/mbias/environment.yml @@ -0,0 +1,7 @@ +name: methyldackel_mbias +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::methyldackel=0.6.0 diff --git a/modules/nf-core/methyldackel/mbias/main.nf b/modules/nf-core/methyldackel/mbias/main.nf index b30d3391..eed21299 100644 --- a/modules/nf-core/methyldackel/mbias/main.nf +++ b/modules/nf-core/methyldackel/mbias/main.nf @@ -2,7 +2,7 @@ process METHYLDACKEL_MBIAS { tag "$meta.id" label 'process_low' - conda "bioconda::methyldackel=0.6.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : 'biocontainers/methyldackel:0.6.0--h22771d5_0' }" diff --git a/modules/nf-core/methyldackel/mbias/meta.yml b/modules/nf-core/methyldackel/mbias/meta.yml index 75217232..e3b55f97 100644 --- a/modules/nf-core/methyldackel/mbias/meta.yml +++ b/modules/nf-core/methyldackel/mbias/meta.yml @@ -57,3 +57,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/picard/markduplicates/environment.yml b/modules/nf-core/picard/markduplicates/environment.yml new file mode 100644 index 00000000..58b795f5 --- /dev/null +++ b/modules/nf-core/picard/markduplicates/environment.yml @@ -0,0 +1,7 @@ +name: picard_markduplicates +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::picard=3.1.1 diff --git a/modules/nf-core/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf index 7ba8448f..80930cc4 100644 --- a/modules/nf-core/picard/markduplicates/main.nf +++ b/modules/nf-core/picard/markduplicates/main.nf @@ -2,15 +2,15 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda "bioconda::picard=3.0.0" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' : - 'biocontainers/picard:3.0.0--hdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/picard:3.1.1--hdfd78af_0' : + 'biocontainers/picard:3.1.1--hdfd78af_0' }" input: tuple val(meta), path(bam) - path fasta - path fai + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) output: tuple val(meta), path("*.bam") , emit: bam @@ -30,6 +30,9 @@ process PICARD_MARKDUPLICATES { } else { avail_mem = (task.memory.mega*0.8).intValue() } + + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ picard \\ -Xmx${avail_mem}M \\ @@ -48,6 +51,7 @@ process PICARD_MARKDUPLICATES { stub: def prefix = task.ext.prefix ?: "${meta.id}" + if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ touch ${prefix}.bam touch ${prefix}.bam.bai diff --git a/modules/nf-core/picard/markduplicates/meta.yml b/modules/nf-core/picard/markduplicates/meta.yml index 3f2357bb..1ab90c07 100644 --- a/modules/nf-core/picard/markduplicates/meta.yml +++ b/modules/nf-core/picard/markduplicates/meta.yml @@ -25,10 +25,20 @@ input: type: file description: BAM file pattern: "*.{bam,cram,sam}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fasta: type: file description: Reference genome fasta file pattern: "*.{fasta,fa}" + - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fai: type: file description: Reference genome fasta index @@ -58,3 +68,8 @@ output: authors: - "@drpatelh" - "@projectoriented" + - "@ramprasadn" +maintainers: + - "@drpatelh" + - "@projectoriented" + - "@ramprasadn" diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test b/modules/nf-core/picard/markduplicates/tests/main.nf.test new file mode 100644 index 00000000..b2bba094 --- /dev/null +++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test @@ -0,0 +1,111 @@ +nextflow_process { + + name "Test Process PICARD_MARKDUPLICATES" + script "../main.nf" + process "PICARD_MARKDUPLICATES" + config "./nextflow.config" + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/markduplicates" + + test("sarscov2 - bam, fasta, fai - sorted bam") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = [ + [ id:'genome' ], + file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions + ).match() } + ) + } + } + + test("sarscov2 - bam, fasta, fai - unsorted bam") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = [ + [ id:'genome' ], + file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - cram, fasta, fai") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = [ + [ id:'genome' ], + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + path(process.out.metrics.get(0).get(1)).readLines()[0..2], + process.out.versions + ).match() } + ) + } + } + +} diff --git a/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap new file mode 100644 index 00000000..cd788a4d --- /dev/null +++ b/modules/nf-core/picard/markduplicates/tests/main.nf.test.snap @@ -0,0 +1,44 @@ +{ + "sarscov2 - bam, fasta, fai - unsorted bam": { + "content": [ + "test.marked.bam", + [ + "## htsjdk.samtools.metrics.StringHeader", + "# MarkDuplicates --INPUT test.paired_end.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader" + ], + [ + "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" + ] + ], + "timestamp": "2023-11-28T10:50:37.735339781" + }, + "homo_sapiens - cram, fasta, fai": { + "content": [ + "test.marked.bam", + [ + "## htsjdk.samtools.metrics.StringHeader", + "# MarkDuplicates --INPUT test.paired_end.sorted.cram --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader" + ], + [ + "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" + ] + ], + "timestamp": "2023-11-28T10:50:48.897954543" + }, + "sarscov2 - bam, fasta, fai - sorted bam": { + "content": [ + "test.marked.bam", + [ + "## htsjdk.samtools.metrics.StringHeader", + "# MarkDuplicates --INPUT test.paired_end.sorted.bam --OUTPUT test.marked.bam --METRICS_FILE test.marked.MarkDuplicates.metrics.txt --ASSUME_SORT_ORDER queryname --REFERENCE_SEQUENCE genome.fasta --MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP 50000 --MAX_FILE_HANDLES_FOR_READ_ENDS_MAP 8000 --SORTING_COLLECTION_SIZE_RATIO 0.25 --TAG_DUPLICATE_SET_MEMBERS false --REMOVE_SEQUENCING_DUPLICATES false --TAGGING_POLICY DontTag --CLEAR_DT true --DUPLEX_UMI false --FLOW_MODE false --FLOW_QUALITY_SUM_STRATEGY false --USE_END_IN_UNPAIRED_READS false --USE_UNPAIRED_CLIPPED_END false --UNPAIRED_END_UNCERTAINTY 0 --FLOW_SKIP_FIRST_N_FLOWS 0 --FLOW_Q_IS_KNOWN_END false --FLOW_EFFECTIVE_QUALITY_THRESHOLD 15 --ADD_PG_TAG_TO_READS true --REMOVE_DUPLICATES false --ASSUME_SORTED false --DUPLICATE_SCORING_STRATEGY SUM_OF_BASE_QUALITIES --PROGRAM_RECORD_ID MarkDuplicates --PROGRAM_GROUP_NAME MarkDuplicates --READ_NAME_REGEX --OPTICAL_DUPLICATE_PIXEL_DISTANCE 100 --MAX_OPTICAL_DUPLICATE_SET_SIZE 300000 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader" + ], + [ + "versions.yml:md5,b699af51b1956f3810f8a7c066e0ab17" + ] + ], + "timestamp": "2023-11-28T10:50:26.591387512" + } +} \ No newline at end of file diff --git a/modules/nf-core/picard/markduplicates/tests/nextflow.config b/modules/nf-core/picard/markduplicates/tests/nextflow.config new file mode 100644 index 00000000..02818dd6 --- /dev/null +++ b/modules/nf-core/picard/markduplicates/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: PICARD_MARKDUPLICATES { + ext.prefix = { "${meta.id}.marked" } + ext.args = '--ASSUME_SORT_ORDER queryname' + } +} diff --git a/modules/nf-core/picard/markduplicates/tests/tags.yml b/modules/nf-core/picard/markduplicates/tests/tags.yml new file mode 100644 index 00000000..4f213d62 --- /dev/null +++ b/modules/nf-core/picard/markduplicates/tests/tags.yml @@ -0,0 +1,2 @@ +picard/markduplicates: + - modules/nf-core/picard/markduplicates/** diff --git a/modules/nf-core/preseq/lcextrap/environment.yml b/modules/nf-core/preseq/lcextrap/environment.yml new file mode 100644 index 00000000..57b8b9c6 --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/environment.yml @@ -0,0 +1,7 @@ +name: preseq_lcextrap +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::preseq=3.1.2 diff --git a/modules/nf-core/preseq/lcextrap/main.nf b/modules/nf-core/preseq/lcextrap/main.nf index 12546f0a..ebbf215f 100644 --- a/modules/nf-core/preseq/lcextrap/main.nf +++ b/modules/nf-core/preseq/lcextrap/main.nf @@ -3,7 +3,7 @@ process PRESEQ_LCEXTRAP { label 'process_single' label 'error_ignore' - conda "bioconda::preseq=3.1.2" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2': 'biocontainers/preseq:3.1.2--h445547b_2' }" diff --git a/modules/nf-core/preseq/lcextrap/meta.yml b/modules/nf-core/preseq/lcextrap/meta.yml index 1391961c..4b37a7be 100755 --- a/modules/nf-core/preseq/lcextrap/meta.yml +++ b/modules/nf-core/preseq/lcextrap/meta.yml @@ -10,9 +10,7 @@ tools: homepage: http://smithlabresearch.org/software/preseq/ documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf tool_dev_url: https://github.com/smithlabcode/preseq - licence: ["GPL"] - input: - meta: type: map @@ -23,7 +21,6 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" - output: - meta: type: map @@ -42,7 +39,9 @@ output: type: file description: Log file containing stderr produced by Preseq pattern: "*.{log}" - authors: - "@drpatelh" - "@Emiller88" +maintainers: + - "@drpatelh" + - "@Emiller88" diff --git a/modules/nf-core/preseq/lcextrap/tests/main.nf.test b/modules/nf-core/preseq/lcextrap/tests/main.nf.test new file mode 100644 index 00000000..4d66da9c --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/main.nf.test @@ -0,0 +1,53 @@ +nextflow_process { + + name "Test Process PRESEQ_LCEXTRAP" + script "../main.nf" + process "PRESEQ_LCEXTRAP" + tag "modules" + tag "modules_nfcore" + tag "preseq" + tag "preseq/lcextrap" + + test("sarscov2 - single_end") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['genome']['lc_extrap_mr'], checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.log[0][1]).name).match("single_end - log") }, + { assert snapshot(process.out.lc_extrap).match("single_end - lc_extrap") }, + { assert snapshot(process.out.versions).match("single_end - versions") } + ) + } + } + + test("sarscov2 - paired_end") { + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['genome']['lc_extrap_mr'], checkIfExists: true) ] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.log[0][1]).name).match("paired_end - log") }, + { assert snapshot(process.out.lc_extrap).match("paired_end - lc_extrap") }, + { assert snapshot(process.out.versions).match("paired_end - versions") } + ) + } + }} \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap b/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap new file mode 100644 index 00000000..c59dea7f --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/main.nf.test.snap @@ -0,0 +1,58 @@ +{ + "single_end - lc_extrap": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.lc_extrap.txt:md5,1fa5cdd601079329618f61660bee00de" + ] + ] + ], + "timestamp": "2023-11-23T17:20:40.735535" + }, + "paired_end - log": { + "content": [ + "test.command.log" + ], + "timestamp": "2023-11-23T17:20:51.981746" + }, + "single_end - versions": { + "content": [ + [ + "versions.yml:md5,9a62ff1c212c53573808ccd2137b8922" + ] + ], + "timestamp": "2023-11-23T17:20:40.74601" + }, + "paired_end - versions": { + "content": [ + [ + "versions.yml:md5,9a62ff1c212c53573808ccd2137b8922" + ] + ], + "timestamp": "2023-11-23T17:20:52.02843" + }, + "single_end - log": { + "content": [ + "test.command.log" + ], + "timestamp": "2023-11-23T17:20:40.72985" + }, + "paired_end - lc_extrap": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.lc_extrap.txt:md5,10e5ea860e87fb6f5dc10f4f20c62040" + ] + ] + ], + "timestamp": "2023-11-23T17:20:51.998533" + } +} \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/tests/tags.yml b/modules/nf-core/preseq/lcextrap/tests/tags.yml new file mode 100644 index 00000000..b9e25ea7 --- /dev/null +++ b/modules/nf-core/preseq/lcextrap/tests/tags.yml @@ -0,0 +1,2 @@ +preseq/lcextrap: + - modules/nf-core/preseq/lcextrap/** diff --git a/modules/nf-core/qualimap/bamqc/environment.yml b/modules/nf-core/qualimap/bamqc/environment.yml new file mode 100644 index 00000000..8e46b029 --- /dev/null +++ b/modules/nf-core/qualimap/bamqc/environment.yml @@ -0,0 +1,7 @@ +name: qualimap_bamqc +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::qualimap=2.2.2d diff --git a/modules/nf-core/qualimap/bamqc/main.nf b/modules/nf-core/qualimap/bamqc/main.nf index fef7307a..7cf98266 100644 --- a/modules/nf-core/qualimap/bamqc/main.nf +++ b/modules/nf-core/qualimap/bamqc/main.nf @@ -2,7 +2,7 @@ process QUALIMAP_BAMQC { tag "$meta.id" label 'process_medium' - conda "bioconda::qualimap=2.2.2d" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/qualimap:2.2.2d--1' : 'biocontainers/qualimap:2.2.2d--1' }" diff --git a/modules/nf-core/qualimap/bamqc/meta.yml b/modules/nf-core/qualimap/bamqc/meta.yml index 303532eb..7756d497 100644 --- a/modules/nf-core/qualimap/bamqc/meta.yml +++ b/modules/nf-core/qualimap/bamqc/meta.yml @@ -36,7 +36,7 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - results: - type: dir + type: directory description: Qualimap results dir pattern: "*/*" - versions: @@ -45,3 +45,5 @@ output: pattern: "versions.yml" authors: - "@phue" +maintainers: + - "@phue" diff --git a/modules/nf-core/qualimap/bamqccram/environment.yml b/modules/nf-core/qualimap/bamqccram/environment.yml new file mode 100644 index 00000000..b3d0dfd7 --- /dev/null +++ b/modules/nf-core/qualimap/bamqccram/environment.yml @@ -0,0 +1,8 @@ +name: qualimap_bamqccram +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::qualimap=2.2.2d + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/qualimap/bamqccram/main.nf b/modules/nf-core/qualimap/bamqccram/main.nf index 327d8557..cc1af97d 100644 --- a/modules/nf-core/qualimap/bamqccram/main.nf +++ b/modules/nf-core/qualimap/bamqccram/main.nf @@ -2,7 +2,7 @@ process QUALIMAP_BAMQCCRAM { tag "$meta.id" label 'process_medium' - conda "bioconda::qualimap=2.2.2d bioconda::samtools=1.16.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:00d3c18496ddf07ea580fd00d1dd203cf31ab630-0' : 'biocontainers/mulled-v2-d3934ca6bb4e61334891ffa2e9a4c87a530e3188:00d3c18496ddf07ea580fd00d1dd203cf31ab630-0' }" diff --git a/modules/nf-core/qualimap/bamqccram/meta.yml b/modules/nf-core/qualimap/bamqccram/meta.yml index ea6c4d92..ec388b30 100644 --- a/modules/nf-core/qualimap/bamqccram/meta.yml +++ b/modules/nf-core/qualimap/bamqccram/meta.yml @@ -49,3 +49,5 @@ output: pattern: "versions.yml" authors: - "@FriederikeHanssen" +maintainers: + - "@FriederikeHanssen" diff --git a/modules/nf-core/samtools/faidx/environment.yml b/modules/nf-core/samtools/faidx/environment.yml new file mode 100644 index 00000000..01ccbcc7 --- /dev/null +++ b/modules/nf-core/samtools/faidx/environment.yml @@ -0,0 +1,7 @@ +name: samtools_faidx +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.18 diff --git a/modules/nf-core/samtools/faidx/main.nf b/modules/nf-core/samtools/faidx/main.nf index 4dd0e5b0..d3461627 100644 --- a/modules/nf-core/samtools/faidx/main.nf +++ b/modules/nf-core/samtools/faidx/main.nf @@ -2,18 +2,20 @@ process SAMTOOLS_FAIDX { tag "$fasta" label 'process_single' - conda "bioconda::samtools=1.17" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : - 'biocontainers/samtools:1.17--h00cdaf9_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.18--h50ea8bc_1' : + 'biocontainers/samtools:1.18--h50ea8bc_1' }" input: tuple val(meta), path(fasta) + tuple val(meta2), path(fai) output: - tuple val(meta), path ("*.fai"), emit: fai - tuple val(meta), path ("*.gzi"), emit: gzi, optional: true - path "versions.yml" , emit: versions + tuple val(meta), path ("*.{fa,fasta}") , emit: fa , optional: true + tuple val(meta), path ("*.fai") , emit: fai, optional: true + tuple val(meta), path ("*.gzi") , emit: gzi, optional: true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,8 +25,8 @@ process SAMTOOLS_FAIDX { """ samtools \\ faidx \\ - $args \\ - $fasta + $fasta \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -33,8 +35,12 @@ process SAMTOOLS_FAIDX { """ stub: + def match = (task.ext.args =~ /-o(?:utput)?\s(.*)\s?/).findAll() + def fastacmd = match[0] ? "touch ${match[0][1]}" : '' """ + ${fastacmd} touch ${fasta}.fai + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/faidx/meta.yml b/modules/nf-core/samtools/faidx/meta.yml index fe2fe9a1..e189af28 100644 --- a/modules/nf-core/samtools/faidx/meta.yml +++ b/modules/nf-core/samtools/faidx/meta.yml @@ -3,6 +3,7 @@ description: Index FASTA file keywords: - index - fasta + - faidx tools: - samtools: description: | @@ -17,12 +18,21 @@ input: - meta: type: map description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] + Groovy Map containing reference information + e.g. [ id:'test' ] - fasta: type: file description: FASTA file pattern: "*.{fa,fasta}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test' ] + - fai: + type: file + description: FASTA index file + pattern: "*.{fai}" output: - meta: type: map @@ -45,3 +55,7 @@ authors: - "@drpatelh" - "@ewels" - "@phue" +maintainers: + - "@drpatelh" + - "@ewels" + - "@phue" diff --git a/modules/nf-core/samtools/flagstat/environment.yml b/modules/nf-core/samtools/flagstat/environment.yml new file mode 100644 index 00000000..5efae053 --- /dev/null +++ b/modules/nf-core/samtools/flagstat/environment.yml @@ -0,0 +1,7 @@ +name: samtools_flagstat +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.18 diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index b75707ec..f1893d7c 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.17" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : - 'biocontainers/samtools:1.17--h00cdaf9_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.18--h50ea8bc_1' : + 'biocontainers/samtools:1.18--h50ea8bc_1' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml index 954225df..97991358 100644 --- a/modules/nf-core/samtools/flagstat/meta.yml +++ b/modules/nf-core/samtools/flagstat/meta.yml @@ -47,3 +47,5 @@ output: pattern: "versions.yml" authors: - "@drpatelh" +maintainers: + - "@drpatelh" diff --git a/modules/nf-core/samtools/flagstat/tests/main.nf.test b/modules/nf-core/samtools/flagstat/tests/main.nf.test new file mode 100644 index 00000000..c8dd8dc9 --- /dev/null +++ b/modules/nf-core/samtools/flagstat/tests/main.nf.test @@ -0,0 +1,36 @@ +nextflow_process { + + name "Test Process SAMTOOLS_FLAGSTAT" + script "../main.nf" + process "SAMTOOLS_FLAGSTAT" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/flagstat" + + test("BAM") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.flagstat).match() }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } +} diff --git a/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap new file mode 100644 index 00000000..880019f2 --- /dev/null +++ b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap @@ -0,0 +1,16 @@ +{ + "BAM": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.flagstat:md5,4f7ffd1e6a5e85524d443209ac97d783" + ] + ] + ], + "timestamp": "2023-11-14T15:49:22.577133" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/flagstat/tests/tags.yml b/modules/nf-core/samtools/flagstat/tests/tags.yml new file mode 100644 index 00000000..2d2b7255 --- /dev/null +++ b/modules/nf-core/samtools/flagstat/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/flagstat: + - modules/nf-core/samtools/flagstat/** diff --git a/modules/nf-core/samtools/index/environment.yml b/modules/nf-core/samtools/index/environment.yml new file mode 100644 index 00000000..296ed99e --- /dev/null +++ b/modules/nf-core/samtools/index/environment.yml @@ -0,0 +1,7 @@ +name: samtools_index +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.18 diff --git a/modules/nf-core/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf index 0b20aa4b..8ad18fdc 100644 --- a/modules/nf-core/samtools/index/main.nf +++ b/modules/nf-core/samtools/index/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_INDEX { tag "$meta.id" label 'process_low' - conda "bioconda::samtools=1.17" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : - 'biocontainers/samtools:1.17--h00cdaf9_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.18--h50ea8bc_1' : + 'biocontainers/samtools:1.18--h50ea8bc_1' }" input: tuple val(meta), path(input) diff --git a/modules/nf-core/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml index 8bd2fa6f..01a4ee03 100644 --- a/modules/nf-core/samtools/index/meta.yml +++ b/modules/nf-core/samtools/index/meta.yml @@ -51,3 +51,7 @@ authors: - "@drpatelh" - "@ewels" - "@maxulysse" +maintainers: + - "@drpatelh" + - "@ewels" + - "@maxulysse" diff --git a/modules/nf-core/samtools/index/tests/csi.nextflow.config b/modules/nf-core/samtools/index/tests/csi.nextflow.config new file mode 100644 index 00000000..0ed260ef --- /dev/null +++ b/modules/nf-core/samtools/index/tests/csi.nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_INDEX { + ext.args = '-c' + } + +} diff --git a/modules/nf-core/samtools/index/tests/main.nf.test b/modules/nf-core/samtools/index/tests/main.nf.test new file mode 100644 index 00000000..c76a9169 --- /dev/null +++ b/modules/nf-core/samtools/index/tests/main.nf.test @@ -0,0 +1,87 @@ +nextflow_process { + + name "Test Process SAMTOOLS_INDEX" + script "../main.nf" + process "SAMTOOLS_INDEX" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/index" + + test("sarscov2 [BAI]") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.bai).match("bai") }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } + + test("homo_sapiens [CRAI]") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.crai).match("crai") }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } + + test("homo_sapiens [CSI]") { + + config "./csi.nextflow.config" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert path(process.out.csi.get(0).get(1)).exists() }, + { assert path(process.out.versions.get(0)).getText().contains("samtools") } + ) + } + } +} diff --git a/modules/nf-core/samtools/index/tests/main.nf.test.snap b/modules/nf-core/samtools/index/tests/main.nf.test.snap new file mode 100644 index 00000000..b3baee7f --- /dev/null +++ b/modules/nf-core/samtools/index/tests/main.nf.test.snap @@ -0,0 +1,28 @@ +{ + "crai": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.paired_end.recalibrated.sorted.cram.crai:md5,14bc3bd5c89cacc8f4541f9062429029" + ] + ] + ], + "timestamp": "2023-11-15T15:17:37.30801" + }, + "bai": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.paired_end.sorted.bam.bai:md5,704c10dd1326482448ca3073fdebc2f4" + ] + ] + ], + "timestamp": "2023-11-15T15:17:30.869234" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/index/tests/tags.yml b/modules/nf-core/samtools/index/tests/tags.yml new file mode 100644 index 00000000..e0f58a7a --- /dev/null +++ b/modules/nf-core/samtools/index/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/index: + - modules/nf-core/samtools/index/** diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml new file mode 100644 index 00000000..cd50868c --- /dev/null +++ b/modules/nf-core/samtools/sort/environment.yml @@ -0,0 +1,7 @@ +name: samtools_sort +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.18 diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 2b7753fd..4a666d42 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -2,10 +2,10 @@ process SAMTOOLS_SORT { tag "$meta.id" label 'process_medium' - conda "bioconda::samtools=1.17" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : - 'biocontainers/samtools:1.17--h00cdaf9_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.18--h50ea8bc_1' : + 'biocontainers/samtools:1.18--h50ea8bc_1' }" input: tuple val(meta), path(bam) diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 07328431..2200de72 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -46,3 +46,6 @@ output: authors: - "@drpatelh" - "@ewels" +maintainers: + - "@drpatelh" + - "@ewels" diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test new file mode 100644 index 00000000..abb80978 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/main.nf.test @@ -0,0 +1,73 @@ +nextflow_process { + + name "Test Process SAMTOOLS_SORT" + script "../main.nf" + process "SAMTOOLS_SORT" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/sort" + + test("test_samtools_sort") { + + config "./nextflow.config" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("test_samtools_sort_stub") { + + config "./nextflow.config" + options "-stub-run" + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [ + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap new file mode 100644 index 00000000..ff722259 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap @@ -0,0 +1,48 @@ +{ + "test_samtools_sort": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,ea6a0fef94eb534e901f107a05a33a06" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,33b6a403dc19a0d28e4219ccab0a1d80" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,ea6a0fef94eb534e901f107a05a33a06" + ] + ], + "csi": [ + + ], + "versions": [ + "versions.yml:md5,33b6a403dc19a0d28e4219ccab0a1d80" + ] + } + ], + "timestamp": "2023-12-04T11:11:22.005628301" + }, + "test_samtools_sort_stub": { + "content": [ + "test.sorted.bam", + [ + "versions.yml:md5,33b6a403dc19a0d28e4219ccab0a1d80" + ] + ], + "timestamp": "2023-12-04T17:47:22.314445935" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/tests/nextflow.config b/modules/nf-core/samtools/sort/tests/nextflow.config new file mode 100644 index 00000000..d0f35086 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/nextflow.config @@ -0,0 +1,7 @@ +process { + + withName: SAMTOOLS_SORT { + ext.prefix = { "${meta.id}.sorted" } + } + +} diff --git a/modules/nf-core/samtools/sort/tests/tags.yml b/modules/nf-core/samtools/sort/tests/tags.yml new file mode 100644 index 00000000..cd63ea20 --- /dev/null +++ b/modules/nf-core/samtools/sort/tests/tags.yml @@ -0,0 +1,3 @@ +samtools/sort: + - modules/nf-core/samtools/sort/** + - tests/modules/nf-core/samtools/sort/** diff --git a/modules/nf-core/samtools/stats/environment.yml b/modules/nf-core/samtools/stats/environment.yml new file mode 100644 index 00000000..b89ce647 --- /dev/null +++ b/modules/nf-core/samtools/stats/environment.yml @@ -0,0 +1,7 @@ +name: samtools_stats +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::samtools=1.18 diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index eb7f098b..7539140a 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -2,14 +2,14 @@ process SAMTOOLS_STATS { tag "$meta.id" label 'process_single' - conda "bioconda::samtools=1.17" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' : - 'biocontainers/samtools:1.17--h00cdaf9_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.18--h50ea8bc_1' : + 'biocontainers/samtools:1.18--h50ea8bc_1' }" input: tuple val(meta), path(input), path(input_index) - path fasta + tuple val(meta2), path(fasta) output: tuple val(meta), path("*.stats"), emit: stats diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index 1d68a5d8..735ff812 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -30,9 +30,14 @@ input: type: file description: BAI/CRAI file from alignment pattern: "*.{bai,crai}" + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] - fasta: - type: optional file - description: Reference file the CRAM was created with + type: file + description: Reference file the CRAM was created with (optional) pattern: "*.{fasta,fa}" output: - meta: @@ -51,3 +56,8 @@ output: authors: - "@drpatelh" - "@FriederikeHanssen" + - "@ramprasadn" +maintainers: + - "@drpatelh" + - "@FriederikeHanssen" + - "@ramprasadn" diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test b/modules/nf-core/samtools/stats/tests/main.nf.test new file mode 100644 index 00000000..20c3efe1 --- /dev/null +++ b/modules/nf-core/samtools/stats/tests/main.nf.test @@ -0,0 +1,78 @@ +nextflow_process { + + name "Test Process SAMTOOLS_STATS" + script "../main.nf" + process "SAMTOOLS_STATS" + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/stats" + + test("SAMTOOLS STATS Should run without failures") { + + when { + params { + + outdir = "$outputDir" + } + process { + """ + // define inputs of the process here. + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + + ] + input[1] = [[],[]] + """ + + } + } + + then { + assertAll( + {assert process.success}, + {assert snapshot(process.out).match()} + ) + } + + } + + test("SAMTOOLS CRAM Should run without failures") { + + when { + params { + + outdir = "$outputDir" + } + process { + """ + // define inputs of the process here + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + + ] + input[1] = [ + [ id:'genome' ], + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + """ + } + + + } + + then { + assertAll( + {assert process.success}, + {assert snapshot(process.out).match()} + ) + } + + } + + +} diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test.snap b/modules/nf-core/samtools/stats/tests/main.nf.test.snap new file mode 100644 index 00000000..025c83a5 --- /dev/null +++ b/modules/nf-core/samtools/stats/tests/main.nf.test.snap @@ -0,0 +1,64 @@ +{ + "SAMTOOLS STATS Should run without failures": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,045a48208b1c6f5b8af4347fe31f4def" + ] + ], + "1": [ + "versions.yml:md5,650a365c6635001436008350ae83337c" + ], + "stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,045a48208b1c6f5b8af4347fe31f4def" + ] + ], + "versions": [ + "versions.yml:md5,650a365c6635001436008350ae83337c" + ] + } + ], + "timestamp": "2023-12-04T11:07:28.26821485" + }, + "SAMTOOLS CRAM Should run without failures": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,dfbfa130d4a6925ddd1931dcd8354a43" + ] + ], + "1": [ + "versions.yml:md5,650a365c6635001436008350ae83337c" + ], + "stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,dfbfa130d4a6925ddd1931dcd8354a43" + ] + ], + "versions": [ + "versions.yml:md5,650a365c6635001436008350ae83337c" + ] + } + ], + "timestamp": "2023-12-04T11:07:50.356233402" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/stats/tests/tags.yml b/modules/nf-core/samtools/stats/tests/tags.yml new file mode 100644 index 00000000..7c28e30f --- /dev/null +++ b/modules/nf-core/samtools/stats/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/stats: + - modules/nf-core/samtools/stats/** diff --git a/modules/nf-core/trimgalore/environment.yml b/modules/nf-core/trimgalore/environment.yml new file mode 100644 index 00000000..6cd0f51b --- /dev/null +++ b/modules/nf-core/trimgalore/environment.yml @@ -0,0 +1,7 @@ +name: trimgalore +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::trim-galore=0.6.7 diff --git a/modules/nf-core/trimgalore/main.nf b/modules/nf-core/trimgalore/main.nf index dcb77ae7..24ead871 100644 --- a/modules/nf-core/trimgalore/main.nf +++ b/modules/nf-core/trimgalore/main.nf @@ -2,7 +2,7 @@ process TRIMGALORE { tag "$meta.id" label 'process_high' - conda "bioconda::trim-galore=0.6.7" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/trim-galore:0.6.7--hdfd78af_0' : 'biocontainers/trim-galore:0.6.7--hdfd78af_0' }" diff --git a/modules/nf-core/trimgalore/meta.yml b/modules/nf-core/trimgalore/meta.yml index f84c4d77..e649088c 100644 --- a/modules/nf-core/trimgalore/meta.yml +++ b/modules/nf-core/trimgalore/meta.yml @@ -62,3 +62,7 @@ authors: - "@drpatelh" - "@ewels" - "@FelixKrueger" +maintainers: + - "@drpatelh" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/nf-core/trimgalore/tests/main.nf.test b/modules/nf-core/trimgalore/tests/main.nf.test new file mode 100644 index 00000000..bc6812cc --- /dev/null +++ b/modules/nf-core/trimgalore/tests/main.nf.test @@ -0,0 +1,105 @@ +nextflow_process { + + name "Test Process TRIMGALORE" + script "../main.nf" + process "TRIMGALORE" + tag "modules" + tag "modules_nfcore" + tag "trimgalore" + + test("test_trimgalore_single_end") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + def read_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", + "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", + "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE + { assert path(process.out.reads.get(0).get(1)).linesGzip.contains(read_line) } + } + }, + { report1_lines.each { report1_line -> + { assert path(process.out.log.get(0).get(1)).getText().contains(report1_line) } + } + } + ) + } + } + + test("test_trimgalore_paired_end") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + """ + } + } + + then { + def read1_lines = ["@ERR5069949.2151832 NS500628:121:HK3MMAFX2:2:21208:10793:15304/1", + "TCATAAACCAAAGCACTCACAGTGTCAACAATTTCAGCAGGACAACGCCGACAAGTTCCGAGGAACATGTCTGGACCTATAGTTTTCATAAGTCTACACACTGAATTGAAATATTCTGGTTCTAGTGTGCCCTTAGTTAGCAATGTGCGT", + "AAAAAAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAEEEEE + { assert path(process.out.reads.get(0).get(1).get(0)).linesGzip.contains(read1_line) } + } + }, + { read2_lines.each { read2_line -> + { assert path(process.out.reads.get(0).get(1).get(1)).linesGzip.contains(read2_line) } + } + }, + { report1_lines.each { report1_line -> + { assert path(process.out.log.get(0).get(1).get(0)).getText().contains(report1_line) } + } + }, + { report2_lines.each { report2_line -> + { assert path(process.out.log.get(0).get(1).get(1)).getText().contains(report2_line) } + } + } + ) + } + } +} diff --git a/modules/nf-core/trimgalore/tests/main.nf.test.snap b/modules/nf-core/trimgalore/tests/main.nf.test.snap new file mode 100644 index 00000000..84feacca --- /dev/null +++ b/modules/nf-core/trimgalore/tests/main.nf.test.snap @@ -0,0 +1,148 @@ +{ + "test_trimgalore_single_end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test_trimmed.fq.gz:md5,e0a7516b8ea8d6467d6306acb2cd13c4" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastq.gz_trimming_report.txt:md5,a1ab3958205f1ddf48af623242b5b429" + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,47d966cbb31c80eb8f7fe860d55659b7" + ], + "html": [ + + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastq.gz_trimming_report.txt:md5,a1ab3958205f1ddf48af623242b5b429" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test_trimmed.fq.gz:md5,e0a7516b8ea8d6467d6306acb2cd13c4" + ] + ], + "unpaired": [ + + ], + "versions": [ + "versions.yml:md5,47d966cbb31c80eb8f7fe860d55659b7" + ], + "zip": [ + + ] + } + ], + "timestamp": "2023-10-17T15:24:57.782141441" + }, + "test_trimgalore_paired_end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1_val_1.fq.gz:md5,e0a7516b8ea8d6467d6306acb2cd13c4", + "test_2_val_2.fq.gz:md5,f3d61189e6d10202da7b8686f1dbb71b" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastq.gz_trimming_report.txt:md5,315d40465412f9909bbaabf52269274d", + "test_2.fastq.gz_trimming_report.txt:md5,34436303da1c78811103427a2fb57f7b" + ] + ] + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,47d966cbb31c80eb8f7fe860d55659b7" + ], + "html": [ + + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastq.gz_trimming_report.txt:md5,315d40465412f9909bbaabf52269274d", + "test_2.fastq.gz_trimming_report.txt:md5,34436303da1c78811103427a2fb57f7b" + ] + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1_val_1.fq.gz:md5,e0a7516b8ea8d6467d6306acb2cd13c4", + "test_2_val_2.fq.gz:md5,f3d61189e6d10202da7b8686f1dbb71b" + ] + ] + ], + "unpaired": [ + + ], + "versions": [ + "versions.yml:md5,47d966cbb31c80eb8f7fe860d55659b7" + ], + "zip": [ + + ] + } + ], + "timestamp": "2023-10-17T15:25:08.513589909" + } +} \ No newline at end of file diff --git a/modules/nf-core/trimgalore/tests/tags.yml b/modules/nf-core/trimgalore/tests/tags.yml new file mode 100644 index 00000000..e9937691 --- /dev/null +++ b/modules/nf-core/trimgalore/tests/tags.yml @@ -0,0 +1,2 @@ +trimgalore: + - modules/nf-core/trimgalore/** diff --git a/modules/nf-core/untar/environment.yml b/modules/nf-core/untar/environment.yml index 2d52ce64..d6917da3 100644 --- a/modules/nf-core/untar/environment.yml +++ b/modules/nf-core/untar/environment.yml @@ -1,3 +1,4 @@ +name: untar channels: - conda-forge - bioconda diff --git a/modules/nf-core/untar/tests/main.nf.test b/modules/nf-core/untar/tests/main.nf.test new file mode 100644 index 00000000..d40db13d --- /dev/null +++ b/modules/nf-core/untar/tests/main.nf.test @@ -0,0 +1,77 @@ +nextflow_process { + + name "Test Process UNTAR" + script "../main.nf" + process "UNTAR" + + tag "modules" + tag "modules_nfcore" + tag "untar" + + test("test_untar") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.untar).match("test_untar") }, + ) + } + + } + + test("test_untar_different_output_path") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ [], file(params.test_data['homo_sapiens']['illumina']['test_flowcell'], checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.untar).match("test_untar_different_output_path") }, + ) + } + + } + + test("test_untar_onlyfiles") { + + when { + params { + outdir = "$outputDir" + } + process { + """ + input[0] = [ [], file(params.test_data['generic']['tar']['tar_gz'], checkIfExists: true) ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out.untar).match("test_untar_onlyfiles") }, + ) + } + + } + +} diff --git a/modules/nf-core/untar/tests/main.nf.test.snap b/modules/nf-core/untar/tests/main.nf.test.snap new file mode 100644 index 00000000..146c8678 --- /dev/null +++ b/modules/nf-core/untar/tests/main.nf.test.snap @@ -0,0 +1,513 @@ +{ + "test_untar_different_output_path": { + "content": [ + [ + [ + [ + + ], + [ + [ + [ + [ + [ + [ + "s_1_1101.bcl:md5,ad01889e2ff43e2f194224e20bdb600c", + "s_1_1101.stats:md5,4bbbf103454b37fbc3138fadf1b4446b" + ], + [ + "s_1_1101.bcl:md5,565384bbe67a694dfd690bae6d1d30c2", + "s_1_1101.stats:md5,55e5abd8f129ff38ef169873547abdb8" + ], + [ + "s_1_1101.bcl:md5,650fa58a630a9148835ba79e323d4237", + "s_1_1101.stats:md5,77403669ca1b05340c390dff64425c1e" + ], + [ + "s_1_1101.bcl:md5,54471c9e97299cd141e202e204637702", + "s_1_1101.stats:md5,67b14c9a89b7f8556674a7524d5cfb2d" + ], + [ + "s_1_1101.bcl:md5,74e4f929fc7476c380fd9d741ddb6700", + "s_1_1101.stats:md5,5730a4c35463eaa12a06b6758710b98c" + ], + [ + "s_1_1101.bcl:md5,c785f472f4350c120c02c888c8189590", + "s_1_1101.stats:md5,fee4ec63895ea81007e06ee6a36ba5e0" + ], + [ + "s_1_1101.bcl:md5,b7ea50bb25f08d43c301741d77050a9b", + "s_1_1101.stats:md5,fa7c68f3122c74d14364e6f7b011af70" + ], + [ + "s_1_1101.bcl:md5,9d5087dc4bcae39d66486363d4f68ecf", + "s_1_1101.stats:md5,23cdceee4d82c4b8e7c60018b9276ace" + ], + [ + "s_1_1101.bcl:md5,581e0c5ee94e8f2de14b2b1d8e777530", + "s_1_1101.stats:md5,9a3536d573c97f66bb56b49463612607" + ], + [ + "s_1_1101.bcl:md5,296fc026bb34c67bbe2b44845fe0d1de", + "s_1_1101.stats:md5,a7f57a7770fb9c5ae2a0fb1ef403ec4f" + ], + [ + "s_1_1101.bcl:md5,2a3ca15531556c36d10d132a9e051de8", + "s_1_1101.stats:md5,2d0bcdb0a1b51d3d79e415db2ab2d3b1" + ], + [ + "s_1_1101.bcl:md5,1150d46a2ccd4ac58aee0585d3e4ffd7", + "s_1_1101.stats:md5,2e97550bd5b5864ffd0565bb7a3f6d40" + ], + [ + "s_1_1101.bcl:md5,0b85c4b3da0de95e7b862d849c5333ae", + "s_1_1101.stats:md5,6eab9746fbeb783b0cd70398f44e0c1a" + ], + [ + "s_1_1101.bcl:md5,e0e9c91f4698804d7a6d1058ef68b34f", + "s_1_1101.stats:md5,790022cdc7878a02b2ebd166e1ddf0a7" + ], + [ + "s_1_1101.bcl:md5,38cd0ad4de359e651c8ac0d5777ea625", + "s_1_1101.stats:md5,a1b1d5ea5371d326abb029774483c5e6" + ], + [ + "s_1_1101.bcl:md5,b0ddc05c4012ccba24e712a1cfec748f", + "s_1_1101.stats:md5,af3d232f839d720f76f40ba06caa2987" + ], + [ + "s_1_1101.bcl:md5,af32fcc5dc3b836cf7a5ba3db85a75dd", + "s_1_1101.stats:md5,f93f2c09bd4e486c74a5f6e2040f7296" + ], + [ + "s_1_1101.bcl:md5,54b7428e037ca87816107647d4a3d9db", + "s_1_1101.stats:md5,e5ac77a72cd7bed5e9bf03cccda0e48c" + ], + [ + "s_1_1101.bcl:md5,fc8b4eacd493bf3d0b20bc23998dc7ff", + "s_1_1101.stats:md5,190315e159e2f4bc4c057ded7470dc52" + ], + [ + "s_1_1101.bcl:md5,9484ecffda489927fce424ac6a44fa9d", + "s_1_1101.stats:md5,0825feeb457ecc9efcf6f8526ba32311" + ], + [ + "s_1_1101.bcl:md5,eec59e21036e31c95ce1e847bfb0a9c4", + "s_1_1101.stats:md5,9acc13f63c98e5a8445e7be70d49222b" + ], + [ + "s_1_1101.bcl:md5,a9fb24476f87cba4fba68e2b3c3f2c07", + "s_1_1101.stats:md5,dc0aa7db9790733291c3e6480ca2a0fc" + ], + [ + "s_1_1101.bcl:md5,ed950b3e82c500927c2e236c9df005c6", + "s_1_1101.stats:md5,dccb71ec47d1f9d33a192da6d5660a45" + ], + [ + "s_1_1101.bcl:md5,b3e992025e995ca56b5ea2820144ef47", + "s_1_1101.stats:md5,a6a829bf2cffb26ac5d9dc3012057699" + ], + [ + "s_1_1101.bcl:md5,89edc726a5a4e0b4ff8ca3899ed0232b", + "s_1_1101.stats:md5,5b9b4fd8110577a59b82d0c419519d29" + ], + [ + "s_1_1101.bcl:md5,4dc696149169f232c451225f563cb5cd", + "s_1_1101.stats:md5,d3514a71ea3adc60e2943c6b8f6e2598" + ], + [ + "s_1_1101.bcl:md5,35b992d0318afb7c825ceaa31b0755e6", + "s_1_1101.stats:md5,2826093acc175c16c3795de7c4ca8f07" + ], + [ + "s_1_1101.bcl:md5,7bc927f56a362e49c00b5d76ee048901", + "s_1_1101.stats:md5,e47d862b795fd6b88a31d7d482ab22f6" + ], + [ + "s_1_1101.bcl:md5,84742233ff2a651626fe9036f27f7cb2", + "s_1_1101.stats:md5,b78fad11d3c50bc76b722cdc03e3028b" + ], + [ + "s_1_1101.bcl:md5,3935341c86263a7938e8c49620ef39f8", + "s_1_1101.stats:md5,cc6585b2daac5354073d150874da9704" + ], + [ + "s_1_1101.bcl:md5,3627f4fd548bf6e64aaf08fba3a342be", + "s_1_1101.stats:md5,120ae4831ae004ff7d16728aef36e82f" + ], + [ + "s_1_1101.bcl:md5,07631014bc35124149fabd80ef19f933", + "s_1_1101.stats:md5,eadd63d91f47cc6db6b6f0a967a23927" + ], + [ + "s_1_1101.bcl:md5,a1149c80415dc2f34d768eeb397c43fb", + "s_1_1101.stats:md5,ca89a9def67611a9151c6ce685b7cce1" + ], + [ + "s_1_1101.bcl:md5,eb5f71d4741d2f40618756bc72eaf8b4", + "s_1_1101.stats:md5,90f48501e735e5915b843478e23d1ae2" + ], + [ + "s_1_1101.bcl:md5,9bf270fe3f6add1a591ebc24fff10078", + "s_1_1101.stats:md5,a4e429671d4098034293c638aa655e16" + ], + [ + "s_1_1101.bcl:md5,219bedcbd24bae54fe4cf05dae05282c", + "s_1_1101.stats:md5,dd97525b65b68207137d51fcf19132c7" + ], + [ + "s_1_1101.bcl:md5,5163bc00a68fd57ae50cae0b76350892", + "s_1_1101.stats:md5,b606a5368eff1f012f3ea5d11ccdf2e0" + ], + [ + "s_1_1101.bcl:md5,fc429195a5af59a59e0cc4c48e6c05ea", + "s_1_1101.stats:md5,d809aa19698053f90d639da4dcad8008" + ], + [ + "s_1_1101.bcl:md5,383340219a1dd77076a092a64a71a7e4", + "s_1_1101.stats:md5,b204a5cf256378679ffc906c15cc1bae" + ], + [ + "s_1_1101.bcl:md5,0c369540d3e24696cf1f9c55bab69315", + "s_1_1101.stats:md5,a2bc69a4031a22ce9621dcc623a0bf4b" + ], + [ + "s_1_1101.bcl:md5,3127abc8016ba8eb954f8f8015dff387", + "s_1_1101.stats:md5,5deafff31150b7bf757f814e49a53bc2" + ], + [ + "s_1_1101.bcl:md5,045f40c82de676bafec3d59f91376a7a", + "s_1_1101.stats:md5,890700edc20687c090ef52248c7884b1" + ], + [ + "s_1_1101.bcl:md5,78af269aa2b39a1d765703f0a4739a86", + "s_1_1101.stats:md5,303cf457aa1543a8208544f694cbc531" + ], + [ + "s_1_1101.bcl:md5,0ab8c781959b783b62888e9274364a46", + "s_1_1101.stats:md5,2605b0e8322f83aa4d0dae5da4ec7a7a" + ], + [ + "s_1_1101.bcl:md5,d0cf823ffe352e8b3f75d589544ab617", + "s_1_1101.stats:md5,efa3c0e01e3db71e12fd961cb2d03739" + ], + [ + "s_1_1101.bcl:md5,db4ca4ab7a01e03c246f9160c3758d82", + "s_1_1101.stats:md5,f61550d9e4a90df6b860e68f41f82f60" + ], + [ + "s_1_1101.bcl:md5,1af39a2c7e5ff20ece91cb8160b51d17", + "s_1_1101.stats:md5,d0e20879afcaf6dfcd88c73f1c5c78cf" + ], + [ + "s_1_1101.bcl:md5,4cf7123bb0fffcd79266df03aef01665", + "s_1_1101.stats:md5,29bff4075109a121b087116b58d7e927" + ], + [ + "s_1_1101.bcl:md5,aa9980428cb60cd6320f4b48f4dd0d74", + "s_1_1101.stats:md5,6b0e20bde93133117a8d1a6df3d6f37b" + ], + [ + "s_1_1101.bcl:md5,0f6e440374e15b9b491d52fb83a8adfe", + "s_1_1101.stats:md5,55cb5eb0ecdabd23dca39ab8c4607598" + ], + [ + "s_1_1101.bcl:md5,2c645d7bdaddaa403f6e304d36df9e4b", + "s_1_1101.stats:md5,53acf33d21f832779b400c2447386ce4" + ], + [ + "s_1_1101.bcl:md5,3bbf0863b423b770c879203644420206", + "s_1_1101.stats:md5,579bdc7293cac8c3d7407249cacf4c25" + ], + [ + "s_1_1101.bcl:md5,6658a08409e81d29cfeb2d096b491985", + "s_1_1101.stats:md5,bb559ffbea46d612f9933cefa84c4c03" + ], + [ + "s_1_1101.bcl:md5,1700d9a13d3d4f7643af2943ef838acb", + "s_1_1101.stats:md5,f01cb6050ebfb15da1e0399ebd791eb4" + ], + [ + "s_1_1101.bcl:md5,1ac7aa9ffae25eb103f755f33e4a39c6", + "s_1_1101.stats:md5,0b9d45d7929ccf336d5e5b95373ed3c2" + ], + [ + "s_1_1101.bcl:md5,812a97af2e983a53226e18c75190b06c", + "s_1_1101.stats:md5,d2410c7b0e506dab2972e77e2398de1e" + ], + [ + "s_1_1101.bcl:md5,c981e8e4dcc434956c2b86159da268bc", + "s_1_1101.stats:md5,e9c826e85361ce673f1f248786c9a611" + ], + [ + "s_1_1101.bcl:md5,88e09e99a0a4ef3357b203a41b22f77c", + "s_1_1101.stats:md5,ef06f2e5ad667bbd383f9ed6a05b7b42" + ], + [ + "s_1_1101.bcl:md5,461c8b146fc8a7938be38689978ecd09", + "s_1_1101.stats:md5,65115693935da66f9791b27136e22fb0" + ], + [ + "s_1_1101.bcl:md5,c7b827df5ce20e0f21916fe60860ca3f", + "s_1_1101.stats:md5,87be73613aeb507847f94d3cac5bb30a" + ], + [ + "s_1_1101.bcl:md5,7c4cc3dc9c8a1b0f15917b282dfb40ce", + "s_1_1101.stats:md5,bdd9181fa89debbfafe7b6ea3e064065" + ], + [ + "s_1_1101.bcl:md5,19f4debaf91e118aca8934517179ac33", + "s_1_1101.stats:md5,1143082719e136241d21b14a6b19b8a2" + ], + [ + "s_1_1101.bcl:md5,38aa256ad2d697d84b0b2c0e876a3eba", + "s_1_1101.stats:md5,64dd82f03df23f7f437eede2671ed4fe" + ], + [ + "s_1_1101.bcl:md5,b7929970378949571fed922c1b8cab32", + "s_1_1101.stats:md5,3d6d7985a41629fe196e4342d7fe36aa" + ], + [ + "s_1_1101.bcl:md5,fb2ed0bf6e89d79624ee78754e773491", + "s_1_1101.stats:md5,f34940810ff255aee79953496a12716d" + ], + [ + "s_1_1101.bcl:md5,4f8a8311f5f9c3a7629c1a973a7b280e", + "s_1_1101.stats:md5,4fd7cd28c09f4e152e7c2ad1ab541cd2" + ], + [ + "s_1_1101.bcl:md5,9eb46c903d0344e25af51f88cc311d60", + "s_1_1101.stats:md5,df3abd5f620d9e7f99496098d9fd3f7f" + ], + [ + "s_1_1101.bcl:md5,3ecbc17f3660e2014b58d7fe70ae62d5", + "s_1_1101.stats:md5,8e89a13c85a6d6ab3ccd251b66d1f165" + ], + [ + "s_1_1101.bcl:md5,5d59cc2499a77791233a64f73fe82894", + "s_1_1101.stats:md5,32ec99cd400f4b80cb26e2fa8e07ece0" + ], + [ + "s_1_1101.bcl:md5,1c052da47b9ae8554388f0fa3aade482", + "s_1_1101.stats:md5,d23f438772673688aa7bc92421dc6dce" + ], + [ + "s_1_1101.bcl:md5,1a52bd4f23130c0c96bc967ccd448a2b", + "s_1_1101.stats:md5,9b597e3388d59ef1f61aba30ac90ea79" + ], + [ + "s_1_1101.bcl:md5,8a1e84b79cf3f80794c20e3a0cc84688", + "s_1_1101.stats:md5,9561f7b6ef4b1849afc72b2bb49792bd" + ], + [ + "s_1_1101.bcl:md5,75c00111051f3fa95d04286823cb9109", + "s_1_1101.stats:md5,1fe786cdf8181767deafbd60b3c76610" + ], + [ + "s_1_1101.bcl:md5,529255d8deee0873ed5565e6d1a2ebda", + "s_1_1101.stats:md5,3fa7f467e97a75880f32d17b7429d316" + ], + [ + "s_1_1101.bcl:md5,ea4d960e3d9355d2149da71b88a21df4", + "s_1_1101.stats:md5,2540fe65586e8e800c1ddd8cddd1e8cd" + ], + [ + "s_1_1101.bcl:md5,0dfe1fd92a2dce2f23119aa483429744", + "s_1_1101.stats:md5,78257b2169fb9f0cf40966e06e847e86" + ], + [ + "s_1_1101.bcl:md5,f692ddc9aa3ab849271d07c666d0b3b9", + "s_1_1101.stats:md5,aa2ec6a3e3a9c116e34fe74a21e6459e" + ], + [ + "s_1_1101.bcl:md5,29cc4c239eae7c871c9a1adf92ebdb98", + "s_1_1101.stats:md5,263184813090acd740a5bf25304aed3a" + ], + [ + "s_1_1101.bcl:md5,e005af6a84925e326afbfe264241f047", + "s_1_1101.stats:md5,b6fb20868eebaffcc19daa694a449795" + ], + [ + "s_1_1101.bcl:md5,02f1a699b1ba9967accccf99a7af3d24", + "s_1_1101.stats:md5,4f007efacecaf26dc0e0231aede28754" + ], + [ + "s_1_1101.bcl:md5,df308c72a2dcc655cd95e98f5457187a", + "s_1_1101.stats:md5,130c4b07f4c14030bab012824cbe34da" + ], + [ + "s_1_1101.bcl:md5,f3ce10d8d2406b72355023bfa8c96822", + "s_1_1101.stats:md5,2638f4db393ed5b699ec2ce59ff0ec19" + ], + [ + "s_1_1101.bcl:md5,cc2f6d675ad1593ff96f734b172d249e", + "s_1_1101.stats:md5,f5b13f1e1ababc9e1a7a73b0b993cbf1" + ], + [ + "s_1_1101.bcl:md5,7938a0b21448305a951b023b1845b3a7", + "s_1_1101.stats:md5,fcd57511adabfc3ba1ac045165330006" + ], + [ + "s_1_1101.bcl:md5,44879bc6a38df1fee8def61868115041", + "s_1_1101.stats:md5,517e20e4b58a8023a37f9af62e0e2036" + ], + [ + "s_1_1101.bcl:md5,8749611e62406a7d2f34c610a55e56af", + "s_1_1101.stats:md5,8ccf24b3676ef84f2e513be8f2a9f3d1" + ], + [ + "s_1_1101.bcl:md5,a9846a037611cda3721958088f714c0e", + "s_1_1101.stats:md5,6438fa5a1892f328cab1605a95d80a3b" + ], + [ + "s_1_1101.bcl:md5,d6c4a2a726496476eb826532f974ed5f", + "s_1_1101.stats:md5,8c2c65b5e8b00dbf61ada65252aeb266" + ], + [ + "s_1_1101.bcl:md5,be3dde6cae7dd85855a6bf295ebfacfe", + "s_1_1101.stats:md5,93bc13f3b0749b2b8d8bcb0b1199f4f0" + ], + [ + "s_1_1101.bcl:md5,7c64514735a6cf1565b60647edd17d20", + "s_1_1101.stats:md5,4a0aa6c49b24f876415e5878cef7f805" + ], + [ + "s_1_1101.bcl:md5,3983b4043bc9df4b505202a5134ccf03", + "s_1_1101.stats:md5,1c9d9a8558adc1279ca27c96bc1b9758" + ], + [ + "s_1_1101.bcl:md5,a0b8d77f116ec95975f9253dcb768136", + "s_1_1101.stats:md5,c3992b786756e7ec42f65ef4b13b50d4" + ], + [ + "s_1_1101.bcl:md5,43c95ba35d06bb7c57fbd16f3d1cfd6c", + "s_1_1101.stats:md5,3cb69d04698c39f97f962e5bf1eea7f0" + ], + [ + "s_1_1101.bcl:md5,3dbeea0cad7052f19f53ff6f19dd4d90", + "s_1_1101.stats:md5,58bbc8254f0f5f4a244531e8e9c12a04" + ], + [ + "s_1_1101.bcl:md5,da56d088996376c898d855b6cd0a7dfc", + "s_1_1101.stats:md5,9f2d78af6908ce1576b89cdc059844ff" + ], + [ + "s_1_1101.bcl:md5,7b641a5565f095e9a6ffcad9e4305033", + "s_1_1101.stats:md5,3ada06c59b4fb41b83ab6abd0979e9fc" + ], + [ + "s_1_1101.bcl:md5,a3843d397a01d51657825bb652c191e5", + "s_1_1101.stats:md5,19341e52a4bfc7d9d48e9d2acc68c519" + ], + [ + "s_1_1101.bcl:md5,048e3ebfc8efeb8012def6b741c9060d", + "s_1_1101.stats:md5,88bd38deca1e87d700effab1fd099565" + ], + [ + "s_1_1101.bcl:md5,b340db0e07e829dd5da22371916a1a9e", + "s_1_1101.stats:md5,e44cfaddcc4ffb968e5b1a2f41ac48a5" + ], + [ + "s_1_1101.bcl:md5,e6011ec6eabbc2b8792deb283c621ce0", + "s_1_1101.stats:md5,090875dcd1a431af24bc631333f089c4" + ], + [ + "s_1_1101.bcl:md5,a08f216e3352345031ed100ec4245082", + "s_1_1101.stats:md5,97b949ef4b96219e1369f673cf5f8a6c" + ], + [ + "s_1_1101.bcl:md5,b43337c76fb037dfcf5f8f7bcb3618e5", + "s_1_1101.stats:md5,ddef585805e79951f69d23ab7354f69b" + ], + [ + "s_1_1101.bcl:md5,8c61fd004104397b360855e058bbf1bf", + "s_1_1101.stats:md5,0f8d253816d594dcfea3ccf48c826401" + ], + [ + "s_1_1101.bcl:md5,594d06310d328b188aa0b3edfff22cb2", + "s_1_1101.stats:md5,3160bf271b39aeb7590e4fd2984710ba" + ], + [ + "s_1_1101.bcl:md5,4c9eada67c9d55437211d83e111961d5", + "s_1_1101.stats:md5,2901b46ab16ec4863d30e4c84ec29c97" + ], + [ + "s_1_1101.bcl:md5,e03971ae5282f0accc0c1b7374d9ef1b", + "s_1_1101.stats:md5,60d2a19ce59bf70a21a28555484cead8" + ], + [ + "s_1_1101.bcl:md5,e1c6f7a06e63d149895d3e48e63df155", + "s_1_1101.stats:md5,44beb10af847ea3dddaf06dda7031126" + ], + [ + "s_1_1101.bcl:md5,960a99bf29a8f9d936e9b8582d46c9c6", + "s_1_1101.stats:md5,544cd1a7aaaa841914b40ece43399334" + ], + [ + "s_1_1101.bcl:md5,5706679f349fd4a6b6313bc2c41c7a42", + "s_1_1101.stats:md5,627eea844b26dae033848c2f9f69177b" + ], + [ + "s_1_1101.bcl:md5,21da5abc4b0402bbac14b5ab998b0b4f", + "s_1_1101.stats:md5,515bd140b095ad90473ca7a9a69877ab" + ], + "s_1_1101.control:md5,08a72e2198ae95150718e8adf011d105", + "s_1_1101.filter:md5,3a72bc73b323c8cb0ac5bfeb62d98989" + ] + ], + [ + "s_1_1101.locs:md5,0827ea802e5257cc5b20e757a33d4c98" + ], + "RTAConfiguration.xml:md5,c7d6e257bc374f142dc64b9d2281d4c9", + "config.xml:md5,9a4cc7ec01fefa2f1ce9bcb45bbad6e9" + ] + ], + [ + "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953", + "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434", + "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286", + "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99", + "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c", + "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c" + ], + "RunInfo.xml:md5,03038959f4dd181c86bc97ae71fe270a" + ] + ] + ] + ], + "timestamp": "2023-10-18T11:56:39.562418" + }, + "test_untar_onlyfiles": { + "content": [ + [ + [ + [ + + ], + [ + "hello.txt:md5,e59ff97941044f85df5297e1c302d260" + ] + ] + ] + ], + "timestamp": "2023-10-18T11:56:46.878844" + }, + "test_untar": { + "content": [ + [ + [ + [ + + ], + [ + "hash.k2d:md5,8b8598468f54a7087c203ad0190555d9", + "opts.k2d:md5,a033d00cf6759407010b21700938f543", + "taxo.k2d:md5,094d5891cdccf2f1468088855c214b2c" + ] + ] + ] + ], + "timestamp": "2023-10-18T11:56:08.16574" + } +} \ No newline at end of file diff --git a/modules/nf-core/untar/tests/tags.yml b/modules/nf-core/untar/tests/tags.yml new file mode 100644 index 00000000..feb6f15c --- /dev/null +++ b/modules/nf-core/untar/tests/tags.yml @@ -0,0 +1,2 @@ +untar: + - modules/nf-core/untar/** From 6c92ffaf01cb49b089ae5a47b87aeda0f8d15794 Mon Sep 17 00:00:00 2001 From: njspix Date: Mon, 8 Jan 2024 17:50:46 -0500 Subject: [PATCH 28/28] schema updates --- nextflow_schema.json | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 986943ea..06c8bde8 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -214,13 +214,6 @@ "fa_icon": "fas fa-arrows-alt", "help_text": "By default, the pipeline only produces data for cytosine methylation states in CpG context. Specifying `--comprehensive` makes the pipeline give results for all cytosine contexts. Note that for large genomes (e.g. Human), these can be massive files. This is only recommended for small genomes (especially those that don't exhibit strong CpG context methylation specificity).\n\nThis flag has the following effects for each of the workflows:\n\nBismark: sets the `--comprehensive` and `--merge_non_CpG` flags. This produces coverage files with information from about all strands and cytosine contexts merged into two files - one for CpG context and one for non-CpG context.\nbwa-meth: sets the `--CHG` and `--CHH` flags in MethylDackel `extract`\nBiscuit: sets `-t c` in biscuit `pileup`" }, - "no_overlap": { - "type": "boolean", - "default": true, - "description": "Ignore read 2 methylation when it overlaps read 1", - "help_text": "For paired-end reads it is theoretically possible that read_1 and read_2 overlap. To avoid scoring overlapping methylation calls twice, this is set to `true` by default. (Only methylation calls of read 1 are used since read 1 has historically higher quality basecalls than read 2). Whilst this option removes a bias towards more methylation calls in the center of sequenced fragments it may de facto remove a sizable proportion of the data. To count methylation data from both reads in overlapping regions, set this to `false`. \n\nThis option has the following effects for the different workflows:\n\nBismark: sets `--no_overlap` if set to `true`, otherwise sets `--include_overlap`\nBiscuit: sets the `-d` flag in biscuit `pileup` if set to `false`\n\n**Note that bwa-meth has no option to double-count cytosines in overlapping reads**", - "fa_icon": "fas fa-allergies" - }, "ignore": { "type": "integer", "default": 0, @@ -380,12 +373,6 @@ "help_text": "Customise the penalty in the function used to filter reads based on mismatches. The parameter `--relax_mismatches` must also be specified.\n\nSee the parameter documentation for `--relax_mismatches` for an explanation.", "fa_icon": "fas fa-calculator" }, - "meth_cutoff": { - "type": "integer", - "description": "Specify a minimum read coverage to report a methylation call", - "help_text": "Use to discard any methylation calls with less than a given read coverage depth (in fold coverage) during Bismark's `bismark_methylation_extractor` step.", - "fa_icon": "fas fa-angle-double-down" - }, "no_overlap": { "type": "boolean", "default": true, @@ -400,13 +387,6 @@ "help_text": "Ignore the first bp from the 5' end of Read 1 (or single-end alignment files) when processing the methylation call string. This can remove e.g. a restriction enzyme site at the start of each read or any other source of bias (such as PBAT-Seq data).", "fa_icon": "far fa-eye-slash" }, - "ignore_r2": { - "type": "integer", - "default": 2, - "description": "Ignore methylation in first n bases of 5' end of R2", - "help_text": "Ignore the first bp from the 5' end of Read 2 of paired-end sequencing results only. Since the first couple of bases in Read 2 of BS-Seq experiments show a severe bias towards non-methylation as a result of end-repairing sonicated fragments with unmethylated cytosines (see M-bias plot), it is recommended that the first couple of bp of Read 2 are removed before starting downstream analysis. Please see the section on M-bias plots in the Bismark User Guide for more details.", - "fa_icon": "far fa-eye-slash" - }, "ignore_3prime_r1": { "type": "integer", "default": 0, @@ -414,13 +394,6 @@ "help_text": "Ignore the first bp from the 5' end of Read 2 of paired-end sequencing results only. Since the first couple of bases in Read 2 of BS-Seq experiments show a severe bias towards non-methylation as a result of end-repairing sonicated fragments with unmethylated cytosines (see M-bias plot), it is recommended that the first couple of bp of Read 2 are removed before starting downstream analysis. Please see the section on M-bias plots in the Bismark User Guide for more details.", "fa_icon": "far fa-eye-slash" }, - "ignore_3prime_r2": { - "type": "integer", - "default": 2, - "description": "Ignore methylation in last n bases of 3' end of R2", - "help_text": "Ignore the last bp from the 3' end of Read 1 (or single-end alignment files) when processing the methylation call string. This can remove unwanted biases from the end of reads.", - "fa_icon": "far fa-eye-slash" - }, "known_splices": { "type": "string", "format": "file-path",