diff --git a/CHANGELOG.md b/CHANGELOG.md index ea9b4606..de7b178f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unpublished Version / DEV] + +### Enhancements & fixes + ## [[2.0.0](https://github.com/nf-core/chipseq/releases/tag/2.0.0)] - 2022-10-03 ### Enhancements & fixes diff --git a/modules.json b/modules.json index 81c94b44..5bd172bc 100644 --- a/modules.json +++ b/modules.json @@ -2,136 +2,138 @@ "name": "nf-core/chipseq", "homePage": "https://github.com/nf-core/chipseq", "repos": { - "nf-core/modules": { - "git_url": "https://github.com/nf-core/modules.git", + "https://github.com/nf-core/modules.git": { "modules": { - "bowtie2/align": { - "branch": "master", - "git_sha": "848ee9a215d02d80be033bfa60881700f2bd914c" - }, - "bowtie2/build": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bwa/index": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "bwa/mem": { - "branch": "master", - "git_sha": "4f5274c3de0c9521f5033893ff61057a74c45ba9" - }, - "chromap/chromap": { - "branch": "master", - "git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773" - }, - "chromap/index": { - "branch": "master", - "git_sha": "dbb46c9b635080b132bab4b8d5b9a14f0d1c22e7" - }, - "custom/dumpsoftwareversions": { - "branch": "master", - "git_sha": "e5b44499efcf6f7fb24874886bac60591c5d94dd" - }, - "custom/getchromsizes": { - "branch": "master", - "git_sha": "213403187932dbbdd936a04474cc8cd8abae7a08" - }, - "deeptools/computematrix": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "deeptools/plotfingerprint": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "deeptools/plotheatmap": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "deeptools/plotprofile": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "fastqc": { - "branch": "master", - "git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe" - }, - "gffread": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "gunzip": { - "branch": "master", - "git_sha": "fa37e0662690c4ec4260dae282fbce08777503e6" - }, - "homer/annotatepeaks": { - "branch": "master", - "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d" - }, - "khmer/uniquekmers": { - "branch": "master", - "git_sha": "82fdff4fb4ce6cafcc028a7503da835427f35352" - }, - "macs2/callpeak": { - "branch": "master", - "git_sha": "f0800157544a82ae222931764483331a81812012" - }, - "phantompeakqualtools": { - "branch": "master", - "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d" - }, - "picard/collectmultiplemetrics": { - "branch": "master", - "git_sha": "682f789f93070bd047868300dd018faf3d434e7c" - }, - "picard/markduplicates": { - "branch": "master", - "git_sha": "682f789f93070bd047868300dd018faf3d434e7c" - }, - "picard/mergesamfiles": { - "branch": "master", - "git_sha": "682f789f93070bd047868300dd018faf3d434e7c" - }, - "preseq/lcextrap": { - "branch": "master", - "git_sha": "7111e571cc5b6069de4673cd6165af680f17b4d7" - }, - "samtools/flagstat": { - "branch": "master", - "git_sha": "ecece498f10b47b7c9d06f53a310cea5811b4c5f" - }, - "samtools/idxstats": { - "branch": "master", - "git_sha": "ecece498f10b47b7c9d06f53a310cea5811b4c5f" - }, - "samtools/index": { - "branch": "master", - "git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773" - }, - "samtools/sort": { - "branch": "master", - "git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773" - }, - "samtools/stats": { - "branch": "master", - "git_sha": "f48a24770e24358e58de66e9b805a70d77cd154b" - }, - "subread/featurecounts": { - "branch": "master", - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "trimgalore": { - "branch": "master", - "git_sha": "85ec13ff1fc2196c5a507ea497de468101baabed" - }, - "ucsc/bedgraphtobigwig": { - "branch": "master", - "git_sha": "233fa70811a03a4cecb2ece483b5c8396e2cee1d" - }, - "untar": { - "branch": "master", - "git_sha": "51be617b1ca9bff973655eb899d591ed6ab253b5" + "nf-core": { + "bowtie2/align": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "bowtie2/build": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "bwa/index": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "bwa/mem": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "chromap/chromap": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "chromap/index": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "custom/dumpsoftwareversions": { + "branch": "master", + "git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0" + }, + "custom/getchromsizes": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905", + "patch": "modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff" + }, + "deeptools/computematrix": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "deeptools/plotfingerprint": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "deeptools/plotheatmap": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "deeptools/plotprofile": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "fastqc": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "gffread": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "gunzip": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "homer/annotatepeaks": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "khmer/uniquekmers": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "macs2/callpeak": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "phantompeakqualtools": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "picard/collectmultiplemetrics": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "picard/markduplicates": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "picard/mergesamfiles": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "preseq/lcextrap": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "samtools/flagstat": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "samtools/idxstats": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "samtools/index": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "samtools/sort": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "samtools/stats": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "subread/featurecounts": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "trimgalore": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "ucsc/bedgraphtobigwig": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + }, + "untar": { + "branch": "master", + "git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905" + } } } } diff --git a/modules/nf-core/modules/bowtie2/align/main.nf b/modules/nf-core/bowtie2/align/main.nf similarity index 100% rename from modules/nf-core/modules/bowtie2/align/main.nf rename to modules/nf-core/bowtie2/align/main.nf diff --git a/modules/nf-core/modules/bowtie2/align/meta.yml b/modules/nf-core/bowtie2/align/meta.yml similarity index 100% rename from modules/nf-core/modules/bowtie2/align/meta.yml rename to modules/nf-core/bowtie2/align/meta.yml diff --git a/modules/nf-core/modules/bowtie2/build/main.nf b/modules/nf-core/bowtie2/build/main.nf similarity index 100% rename from modules/nf-core/modules/bowtie2/build/main.nf rename to modules/nf-core/bowtie2/build/main.nf diff --git a/modules/nf-core/modules/bowtie2/build/meta.yml b/modules/nf-core/bowtie2/build/meta.yml similarity index 100% rename from modules/nf-core/modules/bowtie2/build/meta.yml rename to modules/nf-core/bowtie2/build/meta.yml diff --git a/modules/nf-core/modules/bwa/index/main.nf b/modules/nf-core/bwa/index/main.nf similarity index 96% rename from modules/nf-core/modules/bwa/index/main.nf rename to modules/nf-core/bwa/index/main.nf index 3affbf16..aa75ae5d 100644 --- a/modules/nf-core/modules/bwa/index/main.nf +++ b/modules/nf-core/bwa/index/main.nf @@ -1,6 +1,6 @@ process BWA_INDEX { tag "$fasta" - label 'process_high' + label 'process_single' conda (params.enable_conda ? "bioconda::bwa=0.7.17" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/nf-core/modules/bwa/index/meta.yml b/modules/nf-core/bwa/index/meta.yml similarity index 100% rename from modules/nf-core/modules/bwa/index/meta.yml rename to modules/nf-core/bwa/index/meta.yml diff --git a/modules/nf-core/modules/bwa/mem/main.nf b/modules/nf-core/bwa/mem/main.nf similarity index 100% rename from modules/nf-core/modules/bwa/mem/main.nf rename to modules/nf-core/bwa/mem/main.nf diff --git a/modules/nf-core/modules/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml similarity index 100% rename from modules/nf-core/modules/bwa/mem/meta.yml rename to modules/nf-core/bwa/mem/meta.yml diff --git a/modules/nf-core/modules/chromap/chromap/main.nf b/modules/nf-core/chromap/chromap/main.nf similarity index 100% rename from modules/nf-core/modules/chromap/chromap/main.nf rename to modules/nf-core/chromap/chromap/main.nf diff --git a/modules/nf-core/modules/chromap/chromap/meta.yml b/modules/nf-core/chromap/chromap/meta.yml similarity index 100% rename from modules/nf-core/modules/chromap/chromap/meta.yml rename to modules/nf-core/chromap/chromap/meta.yml diff --git a/modules/nf-core/modules/chromap/index/main.nf b/modules/nf-core/chromap/index/main.nf similarity index 100% rename from modules/nf-core/modules/chromap/index/main.nf rename to modules/nf-core/chromap/index/main.nf diff --git a/modules/nf-core/modules/chromap/index/meta.yml b/modules/nf-core/chromap/index/meta.yml similarity index 100% rename from modules/nf-core/modules/chromap/index/meta.yml rename to modules/nf-core/chromap/index/meta.yml diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf similarity index 78% rename from modules/nf-core/modules/custom/dumpsoftwareversions/main.nf rename to modules/nf-core/custom/dumpsoftwareversions/main.nf index 203e485a..cebb6e05 100644 --- a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -1,11 +1,11 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { - label 'process_low' + 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.13a' : null) + conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.13a--pyhdfd78af_1' : - 'quay.io/biocontainers/multiqc:1.13a--pyhdfd78af_1' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' : + 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }" input: path versions diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml similarity index 100% rename from modules/nf-core/modules/custom/dumpsoftwareversions/meta.yml rename to modules/nf-core/custom/dumpsoftwareversions/meta.yml diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py new file mode 100755 index 00000000..da033408 --- /dev/null +++ b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python + + +"""Provide functions to merge multiple versions.yml files.""" + + +import yaml +import platform +from textwrap import dedent + + +def _make_versions_html(versions): + """Generate a tabular HTML output of all versions for MultiQC.""" + html = [ + dedent( + """\\ + + + + + + + + + + """ + ) + ] + for process, tmp_versions in sorted(versions.items()): + html.append("") + for i, (tool, version) in enumerate(sorted(tmp_versions.items())): + html.append( + dedent( + f"""\\ + + + + + + """ + ) + ) + html.append("") + html.append("
Process Name Software Version
{process if (i == 0) else ''}{tool}{version}
") + return "\\n".join(html) + + +def main(): + """Load all version files and generate merged output.""" + versions_this_module = {} + versions_this_module["${task.process}"] = { + "python": platform.python_version(), + "yaml": yaml.__version__, + } + + with open("$versions") as f: + versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module + + # aggregate versions by the module name (derived from fully-qualified process name) + versions_by_module = {} + for process, process_versions in versions_by_process.items(): + module = process.split(":")[-1] + try: + if versions_by_module[module] != process_versions: + raise AssertionError( + "We assume that software versions are the same between all modules. " + "If you see this error-message it means you discovered an edge-case " + "and should open an issue in nf-core/tools. " + ) + except KeyError: + versions_by_module[module] = process_versions + + versions_by_module["Workflow"] = { + "Nextflow": "$workflow.nextflow.version", + "$workflow.manifest.name": "$workflow.manifest.version", + } + + versions_mqc = { + "id": "software_versions", + "section_name": "${workflow.manifest.name} Software Versions", + "section_href": "https://github.com/${workflow.manifest.name}", + "plot_type": "html", + "description": "are collected at run time from the software output.", + "data": _make_versions_html(versions_by_module), + } + + with open("software_versions.yml", "w") as f: + yaml.dump(versions_by_module, f, default_flow_style=False) + with open("software_versions_mqc.yml", "w") as f: + yaml.dump(versions_mqc, f, default_flow_style=False) + + with open("versions.yml", "w") as f: + yaml.dump(versions_this_module, f, default_flow_style=False) + + +if __name__ == "__main__": + main() diff --git a/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff b/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff new file mode 100644 index 00000000..18fda554 --- /dev/null +++ b/modules/nf-core/custom/getchromsizes/custom-getchromsizes.diff @@ -0,0 +1,23 @@ +Changes in module 'nf-core/custom/getchromsizes' +--- modules/nf-core/custom/getchromsizes/main.nf ++++ modules/nf-core/custom/getchromsizes/main.nf +@@ -8,13 +8,12 @@ + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: +- tuple val(meta), path(fasta) ++ path(fasta) + + output: +- tuple val(meta), path ("*.sizes"), emit: sizes +- tuple val(meta), path ("*.fai") , emit: fai +- tuple val(meta), path ("*.gzi") , emit: gzi, optional: true +- path "versions.yml" , emit: versions ++ path '*.sizes' , emit: sizes ++ path '*.fai' , emit: fai ++ path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + +************************************************************ diff --git a/modules/nf-core/modules/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf similarity index 66% rename from modules/nf-core/modules/custom/getchromsizes/main.nf rename to modules/nf-core/custom/getchromsizes/main.nf index 0eabf3a4..562c693e 100644 --- a/modules/nf-core/modules/custom/getchromsizes/main.nf +++ b/modules/nf-core/custom/getchromsizes/main.nf @@ -1,6 +1,6 @@ process CUSTOM_GETCHROMSIZES { tag "$fasta" - label 'process_low' + label 'process_single' conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -8,7 +8,7 @@ process CUSTOM_GETCHROMSIZES { 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: - path fasta + path(fasta) output: path '*.sizes' , emit: sizes @@ -26,7 +26,18 @@ process CUSTOM_GETCHROMSIZES { cat <<-END_VERSIONS > versions.yml "${task.process}": - custom: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + """ + touch ${fasta}.fai + touch ${fasta}.sizes + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ } diff --git a/modules/nf-core/modules/custom/getchromsizes/meta.yml b/modules/nf-core/custom/getchromsizes/meta.yml similarity index 62% rename from modules/nf-core/modules/custom/getchromsizes/meta.yml rename to modules/nf-core/custom/getchromsizes/meta.yml index ee6c2571..219ca1d8 100644 --- a/modules/nf-core/modules/custom/getchromsizes/meta.yml +++ b/modules/nf-core/custom/getchromsizes/meta.yml @@ -14,12 +14,22 @@ tools: licence: ["MIT"] input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - fasta: type: file description: FASTA file - pattern: "*.{fasta}" + pattern: "*.{fa,fasta,fna,fas}" output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - sizes: type: file description: File containing chromosome lengths @@ -28,11 +38,16 @@ output: type: file description: FASTA index file pattern: "*.{fai}" + - gzi: + type: file + description: Optional gzip index file for compressed inputs + pattern: "*.gzi" - versions: type: file - description: File containing software version + description: File containing software versions pattern: "versions.yml" authors: - "@tamara-hodgetts" - "@chris-cheshire" + - "@muffato" diff --git a/modules/nf-core/modules/deeptools/computematrix/main.nf b/modules/nf-core/deeptools/computematrix/main.nf similarity index 100% rename from modules/nf-core/modules/deeptools/computematrix/main.nf rename to modules/nf-core/deeptools/computematrix/main.nf diff --git a/modules/nf-core/modules/deeptools/computematrix/meta.yml b/modules/nf-core/deeptools/computematrix/meta.yml similarity index 100% rename from modules/nf-core/modules/deeptools/computematrix/meta.yml rename to modules/nf-core/deeptools/computematrix/meta.yml diff --git a/modules/nf-core/modules/deeptools/plotfingerprint/main.nf b/modules/nf-core/deeptools/plotfingerprint/main.nf similarity index 100% rename from modules/nf-core/modules/deeptools/plotfingerprint/main.nf rename to modules/nf-core/deeptools/plotfingerprint/main.nf diff --git a/modules/nf-core/modules/deeptools/plotfingerprint/meta.yml b/modules/nf-core/deeptools/plotfingerprint/meta.yml similarity index 100% rename from modules/nf-core/modules/deeptools/plotfingerprint/meta.yml rename to modules/nf-core/deeptools/plotfingerprint/meta.yml diff --git a/modules/nf-core/modules/deeptools/plotheatmap/main.nf b/modules/nf-core/deeptools/plotheatmap/main.nf similarity index 100% rename from modules/nf-core/modules/deeptools/plotheatmap/main.nf rename to modules/nf-core/deeptools/plotheatmap/main.nf diff --git a/modules/nf-core/modules/deeptools/plotheatmap/meta.yml b/modules/nf-core/deeptools/plotheatmap/meta.yml similarity index 100% rename from modules/nf-core/modules/deeptools/plotheatmap/meta.yml rename to modules/nf-core/deeptools/plotheatmap/meta.yml diff --git a/modules/nf-core/modules/deeptools/plotprofile/main.nf b/modules/nf-core/deeptools/plotprofile/main.nf similarity index 100% rename from modules/nf-core/modules/deeptools/plotprofile/main.nf rename to modules/nf-core/deeptools/plotprofile/main.nf diff --git a/modules/nf-core/modules/deeptools/plotprofile/meta.yml b/modules/nf-core/deeptools/plotprofile/meta.yml similarity index 100% rename from modules/nf-core/modules/deeptools/plotprofile/meta.yml rename to modules/nf-core/deeptools/plotprofile/meta.yml diff --git a/modules/nf-core/modules/fastqc/main.nf b/modules/nf-core/fastqc/main.nf similarity index 100% rename from modules/nf-core/modules/fastqc/main.nf rename to modules/nf-core/fastqc/main.nf diff --git a/modules/nf-core/modules/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml similarity index 100% rename from modules/nf-core/modules/fastqc/meta.yml rename to modules/nf-core/fastqc/meta.yml diff --git a/modules/nf-core/modules/gffread/main.nf b/modules/nf-core/gffread/main.nf similarity index 100% rename from modules/nf-core/modules/gffread/main.nf rename to modules/nf-core/gffread/main.nf diff --git a/modules/nf-core/modules/gffread/meta.yml b/modules/nf-core/gffread/meta.yml similarity index 100% rename from modules/nf-core/modules/gffread/meta.yml rename to modules/nf-core/gffread/meta.yml diff --git a/modules/nf-core/modules/gunzip/main.nf b/modules/nf-core/gunzip/main.nf similarity index 97% rename from modules/nf-core/modules/gunzip/main.nf rename to modules/nf-core/gunzip/main.nf index 70367049..fa6ba26a 100644 --- a/modules/nf-core/modules/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -1,6 +1,6 @@ process GUNZIP { tag "$archive" - label 'process_low' + label 'process_single' conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/nf-core/modules/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml similarity index 100% rename from modules/nf-core/modules/gunzip/meta.yml rename to modules/nf-core/gunzip/meta.yml diff --git a/modules/nf-core/modules/homer/annotatepeaks/main.nf b/modules/nf-core/homer/annotatepeaks/main.nf similarity index 100% rename from modules/nf-core/modules/homer/annotatepeaks/main.nf rename to modules/nf-core/homer/annotatepeaks/main.nf diff --git a/modules/nf-core/modules/homer/annotatepeaks/meta.yml b/modules/nf-core/homer/annotatepeaks/meta.yml similarity index 100% rename from modules/nf-core/modules/homer/annotatepeaks/meta.yml rename to modules/nf-core/homer/annotatepeaks/meta.yml diff --git a/modules/nf-core/modules/khmer/uniquekmers/main.nf b/modules/nf-core/khmer/uniquekmers/main.nf similarity index 100% rename from modules/nf-core/modules/khmer/uniquekmers/main.nf rename to modules/nf-core/khmer/uniquekmers/main.nf diff --git a/modules/nf-core/modules/khmer/uniquekmers/meta.yml b/modules/nf-core/khmer/uniquekmers/meta.yml similarity index 100% rename from modules/nf-core/modules/khmer/uniquekmers/meta.yml rename to modules/nf-core/khmer/uniquekmers/meta.yml diff --git a/modules/nf-core/modules/macs2/callpeak/main.nf b/modules/nf-core/macs2/callpeak/main.nf similarity index 100% rename from modules/nf-core/modules/macs2/callpeak/main.nf rename to modules/nf-core/macs2/callpeak/main.nf diff --git a/modules/nf-core/modules/macs2/callpeak/meta.yml b/modules/nf-core/macs2/callpeak/meta.yml similarity index 100% rename from modules/nf-core/modules/macs2/callpeak/meta.yml rename to modules/nf-core/macs2/callpeak/meta.yml diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py deleted file mode 100644 index 787bdb7b..00000000 --- a/modules/nf-core/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python - -import platform -from textwrap import dedent - -import yaml - - -def _make_versions_html(versions): - html = [ - dedent( - """\\ - - - - - - - - - - """ - ) - ] - for process, tmp_versions in sorted(versions.items()): - html.append("") - for i, (tool, version) in enumerate(sorted(tmp_versions.items())): - html.append( - dedent( - f"""\\ - - - - - - """ - ) - ) - html.append("") - html.append("
Process Name Software Version
{process if (i == 0) else ''}{tool}{version}
") - return "\\n".join(html) - - -versions_this_module = {} -versions_this_module["${task.process}"] = { - "python": platform.python_version(), - "yaml": yaml.__version__, -} - -with open("$versions") as f: - versions_by_process = yaml.load(f, Loader=yaml.BaseLoader) | versions_this_module - -# aggregate versions by the module name (derived from fully-qualified process name) -versions_by_module = {} -for process, process_versions in versions_by_process.items(): - module = process.split(":")[-1] - try: - if versions_by_module[module] != process_versions: - raise AssertionError( - "We assume that software versions are the same between all modules. " - "If you see this error-message it means you discovered an edge-case " - "and should open an issue in nf-core/tools. " - ) - except KeyError: - versions_by_module[module] = process_versions - -versions_by_module["Workflow"] = { - "Nextflow": "$workflow.nextflow.version", - "$workflow.manifest.name": "$workflow.manifest.version", -} - -versions_mqc = { - "id": "software_versions", - "section_name": "${workflow.manifest.name} Software Versions", - "section_href": "https://github.com/${workflow.manifest.name}", - "plot_type": "html", - "description": "are collected at run time from the software output.", - "data": _make_versions_html(versions_by_module), -} - -with open("software_versions.yml", "w") as f: - yaml.dump(versions_by_module, f, default_flow_style=False) -with open("software_versions_mqc.yml", "w") as f: - yaml.dump(versions_mqc, f, default_flow_style=False) - -with open("versions.yml", "w") as f: - yaml.dump(versions_this_module, f, default_flow_style=False) diff --git a/modules/nf-core/modules/phantompeakqualtools/main.nf b/modules/nf-core/phantompeakqualtools/main.nf similarity index 100% rename from modules/nf-core/modules/phantompeakqualtools/main.nf rename to modules/nf-core/phantompeakqualtools/main.nf diff --git a/modules/nf-core/modules/phantompeakqualtools/meta.yml b/modules/nf-core/phantompeakqualtools/meta.yml similarity index 100% rename from modules/nf-core/modules/phantompeakqualtools/meta.yml rename to modules/nf-core/phantompeakqualtools/meta.yml diff --git a/modules/nf-core/modules/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf similarity index 100% rename from modules/nf-core/modules/picard/collectmultiplemetrics/main.nf rename to modules/nf-core/picard/collectmultiplemetrics/main.nf diff --git a/modules/nf-core/modules/picard/collectmultiplemetrics/meta.yml b/modules/nf-core/picard/collectmultiplemetrics/meta.yml similarity index 100% rename from modules/nf-core/modules/picard/collectmultiplemetrics/meta.yml rename to modules/nf-core/picard/collectmultiplemetrics/meta.yml diff --git a/modules/nf-core/modules/picard/markduplicates/main.nf b/modules/nf-core/picard/markduplicates/main.nf similarity index 100% rename from modules/nf-core/modules/picard/markduplicates/main.nf rename to modules/nf-core/picard/markduplicates/main.nf diff --git a/modules/nf-core/modules/picard/markduplicates/meta.yml b/modules/nf-core/picard/markduplicates/meta.yml similarity index 100% rename from modules/nf-core/modules/picard/markduplicates/meta.yml rename to modules/nf-core/picard/markduplicates/meta.yml diff --git a/modules/nf-core/modules/picard/mergesamfiles/main.nf b/modules/nf-core/picard/mergesamfiles/main.nf similarity index 100% rename from modules/nf-core/modules/picard/mergesamfiles/main.nf rename to modules/nf-core/picard/mergesamfiles/main.nf diff --git a/modules/nf-core/modules/picard/mergesamfiles/meta.yml b/modules/nf-core/picard/mergesamfiles/meta.yml similarity index 100% rename from modules/nf-core/modules/picard/mergesamfiles/meta.yml rename to modules/nf-core/picard/mergesamfiles/meta.yml diff --git a/modules/nf-core/modules/preseq/lcextrap/main.nf b/modules/nf-core/preseq/lcextrap/main.nf similarity index 97% rename from modules/nf-core/modules/preseq/lcextrap/main.nf rename to modules/nf-core/preseq/lcextrap/main.nf index 97261557..a98a922c 100644 --- a/modules/nf-core/modules/preseq/lcextrap/main.nf +++ b/modules/nf-core/preseq/lcextrap/main.nf @@ -1,6 +1,6 @@ process PRESEQ_LCEXTRAP { tag "$meta.id" - label 'process_medium' + label 'process_single' label 'error_ignore' conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null) diff --git a/modules/nf-core/modules/preseq/lcextrap/meta.yml b/modules/nf-core/preseq/lcextrap/meta.yml old mode 100644 new mode 100755 similarity index 100% rename from modules/nf-core/modules/preseq/lcextrap/meta.yml rename to modules/nf-core/preseq/lcextrap/meta.yml diff --git a/modules/nf-core/modules/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf similarity index 94% rename from modules/nf-core/modules/samtools/flagstat/main.nf rename to modules/nf-core/samtools/flagstat/main.nf index 03ec2dcf..c3152aca 100644 --- a/modules/nf-core/modules/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -1,6 +1,6 @@ process SAMTOOLS_FLAGSTAT { tag "$meta.id" - label 'process_low' + label 'process_single' conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -23,7 +23,7 @@ process SAMTOOLS_FLAGSTAT { """ samtools \\ flagstat \\ - --threads ${task.cpus-1} \\ + --threads ${task.cpus} \\ $bam \\ > ${prefix}.flagstat diff --git a/modules/nf-core/modules/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml similarity index 100% rename from modules/nf-core/modules/samtools/flagstat/meta.yml rename to modules/nf-core/samtools/flagstat/meta.yml diff --git a/modules/nf-core/modules/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf similarity index 96% rename from modules/nf-core/modules/samtools/idxstats/main.nf rename to modules/nf-core/samtools/idxstats/main.nf index 4b245419..87618e5f 100644 --- a/modules/nf-core/modules/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -24,6 +24,7 @@ process SAMTOOLS_IDXSTATS { """ samtools \\ idxstats \\ + --threads ${task.cpus-1} \\ $bam \\ > ${prefix}.idxstats diff --git a/modules/nf-core/modules/samtools/idxstats/meta.yml b/modules/nf-core/samtools/idxstats/meta.yml similarity index 100% rename from modules/nf-core/modules/samtools/idxstats/meta.yml rename to modules/nf-core/samtools/idxstats/meta.yml diff --git a/modules/nf-core/modules/samtools/index/main.nf b/modules/nf-core/samtools/index/main.nf similarity index 100% rename from modules/nf-core/modules/samtools/index/main.nf rename to modules/nf-core/samtools/index/main.nf diff --git a/modules/nf-core/modules/samtools/index/meta.yml b/modules/nf-core/samtools/index/meta.yml similarity index 100% rename from modules/nf-core/modules/samtools/index/meta.yml rename to modules/nf-core/samtools/index/meta.yml diff --git a/modules/nf-core/modules/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf similarity index 95% rename from modules/nf-core/modules/samtools/sort/main.nf rename to modules/nf-core/samtools/sort/main.nf index b4fc1cbe..ab7f1cca 100644 --- a/modules/nf-core/modules/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -12,6 +12,7 @@ process SAMTOOLS_SORT { output: tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.csi"), emit: csi, optional: true path "versions.yml" , emit: versions when: diff --git a/modules/nf-core/modules/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml similarity index 92% rename from modules/nf-core/modules/samtools/sort/meta.yml rename to modules/nf-core/samtools/sort/meta.yml index a820c55a..09289751 100644 --- a/modules/nf-core/modules/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -39,6 +39,10 @@ output: type: file description: File containing software versions pattern: "versions.yml" + - csi: + type: file + description: BAM index file (optional) + pattern: "*.csi" authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/modules/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf similarity index 95% rename from modules/nf-core/modules/samtools/stats/main.nf rename to modules/nf-core/samtools/stats/main.nf index 89b92d79..9b0c3867 100644 --- a/modules/nf-core/modules/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -1,6 +1,6 @@ process SAMTOOLS_STATS { tag "$meta.id" - label 'process_low' + label 'process_single' conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -25,7 +25,7 @@ process SAMTOOLS_STATS { """ samtools \\ stats \\ - --threads ${task.cpus-1} \\ + --threads ${task.cpus} \\ ${reference} \\ ${input} \\ > ${prefix}.stats diff --git a/modules/nf-core/modules/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml similarity index 100% rename from modules/nf-core/modules/samtools/stats/meta.yml rename to modules/nf-core/samtools/stats/meta.yml diff --git a/modules/nf-core/modules/subread/featurecounts/main.nf b/modules/nf-core/subread/featurecounts/main.nf similarity index 100% rename from modules/nf-core/modules/subread/featurecounts/main.nf rename to modules/nf-core/subread/featurecounts/main.nf diff --git a/modules/nf-core/modules/subread/featurecounts/meta.yml b/modules/nf-core/subread/featurecounts/meta.yml similarity index 100% rename from modules/nf-core/modules/subread/featurecounts/meta.yml rename to modules/nf-core/subread/featurecounts/meta.yml diff --git a/modules/nf-core/modules/trimgalore/main.nf b/modules/nf-core/trimgalore/main.nf similarity index 99% rename from modules/nf-core/modules/trimgalore/main.nf rename to modules/nf-core/trimgalore/main.nf index 3a3fca90..a69e3de6 100644 --- a/modules/nf-core/modules/trimgalore/main.nf +++ b/modules/nf-core/trimgalore/main.nf @@ -32,7 +32,7 @@ process TRIMGALORE { cores = (task.cpus as int) - 4 if (meta.single_end) cores = (task.cpus as int) - 3 if (cores < 1) cores = 1 - if (cores > 4) cores = 4 + if (cores > 8) cores = 8 } // Clipping presets have to be evaluated in the context of SE/PE diff --git a/modules/nf-core/modules/trimgalore/meta.yml b/modules/nf-core/trimgalore/meta.yml similarity index 100% rename from modules/nf-core/modules/trimgalore/meta.yml rename to modules/nf-core/trimgalore/meta.yml diff --git a/modules/nf-core/modules/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf similarity index 97% rename from modules/nf-core/modules/ucsc/bedgraphtobigwig/main.nf rename to modules/nf-core/ucsc/bedgraphtobigwig/main.nf index b18b190a..a2979e04 100644 --- a/modules/nf-core/modules/ucsc/bedgraphtobigwig/main.nf +++ b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf @@ -1,6 +1,6 @@ process UCSC_BEDGRAPHTOBIGWIG { tag "$meta.id" - label 'process_medium' + label 'process_single' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda (params.enable_conda ? "bioconda::ucsc-bedgraphtobigwig=377" : null) diff --git a/modules/nf-core/modules/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml old mode 100644 new mode 100755 similarity index 100% rename from modules/nf-core/modules/ucsc/bedgraphtobigwig/meta.yml rename to modules/nf-core/ucsc/bedgraphtobigwig/meta.yml diff --git a/modules/nf-core/modules/untar/main.nf b/modules/nf-core/untar/main.nf similarity index 67% rename from modules/nf-core/modules/untar/main.nf rename to modules/nf-core/untar/main.nf index 29ab10a5..71eea7b2 100644 --- a/modules/nf-core/modules/untar/main.nf +++ b/modules/nf-core/untar/main.nf @@ -1,6 +1,6 @@ process UNTAR { tag "$archive" - label 'process_low' + label 'process_single' conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -25,12 +25,23 @@ process UNTAR { """ mkdir output - tar \\ - -C output --strip-components 1 \\ - -xzvf \\ - $args \\ - $archive \\ - $args2 + ## Ensures --strip-components only applied when top level of tar contents is a directory + ## If just files or multiple directories, place all in output + if [[ \$(tar -tzf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ + -C output --strip-components 1 \\ + -xzvf \\ + $args \\ + $archive \\ + $args2 + else + tar \\ + -C output \\ + -xzvf \\ + $args \\ + $archive \\ + $args2 + fi mv output ${untar} diff --git a/modules/nf-core/modules/untar/meta.yml b/modules/nf-core/untar/meta.yml similarity index 85% rename from modules/nf-core/modules/untar/meta.yml rename to modules/nf-core/untar/meta.yml index d426919b..ea7a3f38 100644 --- a/modules/nf-core/modules/untar/meta.yml +++ b/modules/nf-core/untar/meta.yml @@ -26,9 +26,9 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - untar: - type: file - description: - pattern: "*.*" + type: directory + description: Directory containing contents of archive + pattern: "*/" - versions: type: file description: File containing software versions @@ -36,3 +36,5 @@ output: authors: - "@joseespinosa" - "@drpatelh" + - "@matthdsm" + - "@jfy133" diff --git a/nextflow.config b/nextflow.config index e7c2b71d..da798582 100644 --- a/nextflow.config +++ b/nextflow.config @@ -232,7 +232,7 @@ manifest { description = 'ChIP-seq peak-calling and differential analysis pipeline.' mainScript = 'main.nf' nextflowVersion = '!>=21.10.3' - version = '2.0.0' + version = '2.1.0dev' } // Load modules.config for DSL2 module specific options diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index 9b6422c6..6c18b41b 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -7,19 +7,19 @@ include { GUNZIP as GUNZIP_GTF GUNZIP as GUNZIP_GFF GUNZIP as GUNZIP_GENE_BED - GUNZIP as GUNZIP_BLACKLIST } from '../../modules/nf-core/modules/gunzip/main' + GUNZIP as GUNZIP_BLACKLIST } from '../../modules/nf-core/gunzip/main' include { UNTAR as UNTAR_BWA_INDEX UNTAR as UNTAR_BOWTIE2_INDEX UNTAR as UNTAR_CHROMAP_INDEX - UNTAR as UNTAR_STAR_INDEX } from '../../modules/nf-core/modules/untar/main' + UNTAR as UNTAR_STAR_INDEX } from '../../modules/nf-core/untar/main' -include { GFFREAD } from '../../modules/nf-core/modules/gffread/main' -include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/modules/custom/getchromsizes/main' -include { BWA_INDEX } from '../../modules/nf-core/modules/bwa/index/main' -include { BOWTIE2_BUILD } from '../../modules/nf-core/modules/bowtie2/build/main' -include { CHROMAP_INDEX } from '../../modules/nf-core/modules/chromap/index/main' +include { GFFREAD } from '../../modules/nf-core/gffread/main' +include { CUSTOM_GETCHROMSIZES } from '../../modules/nf-core/custom/getchromsizes/main' +include { BWA_INDEX } from '../../modules/nf-core/bwa/index/main' +include { BOWTIE2_BUILD } from '../../modules/nf-core/bowtie2/build/main' +include { CHROMAP_INDEX } from '../../modules/nf-core/chromap/index/main' include { GTF2BED } from '../../modules/local/gtf2bed' include { GENOME_BLACKLIST_REGIONS } from '../../modules/local/genome_blacklist_regions' diff --git a/subworkflows/nf-core/align_bowtie2.nf b/subworkflows/nf-core/align_bowtie2.nf index 35219131..4661c720 100644 --- a/subworkflows/nf-core/align_bowtie2.nf +++ b/subworkflows/nf-core/align_bowtie2.nf @@ -2,7 +2,7 @@ * Map reads, sort, index BAM file and run samtools stats, flagstat and idxstats */ -include { BOWTIE2_ALIGN } from '../../modules/nf-core/modules/bowtie2/align/main' +include { BOWTIE2_ALIGN } from '../../modules/nf-core/bowtie2/align/main' include { BAM_SORT_SAMTOOLS } from './bam_sort_samtools' workflow ALIGN_BOWTIE2 { diff --git a/subworkflows/nf-core/align_bwa_mem.nf b/subworkflows/nf-core/align_bwa_mem.nf index 0c5dff08..eac98188 100644 --- a/subworkflows/nf-core/align_bwa_mem.nf +++ b/subworkflows/nf-core/align_bwa_mem.nf @@ -2,7 +2,7 @@ * Map reads, sort, index BAM file and run samtools stats, flagstat and idxstats */ -include { BWA_MEM } from '../../modules/nf-core/modules/bwa/mem/main' +include { BWA_MEM } from '../../modules/nf-core/bwa/mem/main' include { BAM_SORT_SAMTOOLS } from './bam_sort_samtools' workflow ALIGN_BWA_MEM { diff --git a/subworkflows/nf-core/align_chromap.nf b/subworkflows/nf-core/align_chromap.nf index 7eb73977..29b77442 100644 --- a/subworkflows/nf-core/align_chromap.nf +++ b/subworkflows/nf-core/align_chromap.nf @@ -2,7 +2,7 @@ * Map reads, sort, index BAM file and run samtools stats, flagstat and idxstats */ -include { CHROMAP_CHROMAP } from '../../modules/nf-core/modules/chromap/chromap/main' +include { CHROMAP_CHROMAP } from '../../modules/nf-core/chromap/chromap/main' include { BAM_SORT_SAMTOOLS } from './bam_sort_samtools' workflow ALIGN_CHROMAP { diff --git a/subworkflows/nf-core/bam_sort_samtools.nf b/subworkflows/nf-core/bam_sort_samtools.nf index 418e14cc..deb06c4d 100644 --- a/subworkflows/nf-core/bam_sort_samtools.nf +++ b/subworkflows/nf-core/bam_sort_samtools.nf @@ -2,8 +2,8 @@ * Sort, index BAM file and run samtools stats, flagstat and idxstats */ -include { SAMTOOLS_SORT } from '../../modules/nf-core/modules/samtools/sort/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/modules/samtools/index/main' +include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' include { BAM_STATS_SAMTOOLS } from './bam_stats_samtools' workflow BAM_SORT_SAMTOOLS { diff --git a/subworkflows/nf-core/bam_stats_samtools.nf b/subworkflows/nf-core/bam_stats_samtools.nf index 89a7338f..207c5ece 100644 --- a/subworkflows/nf-core/bam_stats_samtools.nf +++ b/subworkflows/nf-core/bam_stats_samtools.nf @@ -2,9 +2,9 @@ * Run SAMtools stats, flagstat and idxstats */ -include { SAMTOOLS_STATS } from '../../modules/nf-core/modules/samtools/stats/main' -include { SAMTOOLS_IDXSTATS } from '../../modules/nf-core/modules/samtools/idxstats/main' -include { SAMTOOLS_FLAGSTAT } from '../../modules/nf-core/modules/samtools/flagstat/main' +include { SAMTOOLS_STATS } from '../../modules/nf-core/samtools/stats/main' +include { SAMTOOLS_IDXSTATS } from '../../modules/nf-core/samtools/idxstats/main' +include { SAMTOOLS_FLAGSTAT } from '../../modules/nf-core/samtools/flagstat/main' workflow BAM_STATS_SAMTOOLS { take: diff --git a/subworkflows/nf-core/fastqc_trimgalore.nf b/subworkflows/nf-core/fastqc_trimgalore.nf index 966541ca..8a18098a 100644 --- a/subworkflows/nf-core/fastqc_trimgalore.nf +++ b/subworkflows/nf-core/fastqc_trimgalore.nf @@ -2,8 +2,8 @@ // Read QC and trimming // -include { FASTQC } from '../../modules/nf-core/modules/fastqc/main' -include { TRIMGALORE } from '../../modules/nf-core/modules/trimgalore/main' +include { FASTQC } from '../../modules/nf-core/fastqc/main' +include { TRIMGALORE } from '../../modules/nf-core/trimgalore/main' workflow FASTQC_TRIMGALORE { take: diff --git a/subworkflows/nf-core/mark_duplicates_picard.nf b/subworkflows/nf-core/mark_duplicates_picard.nf index 33e88bf5..72a0eb8e 100644 --- a/subworkflows/nf-core/mark_duplicates_picard.nf +++ b/subworkflows/nf-core/mark_duplicates_picard.nf @@ -2,8 +2,8 @@ * Picard MarkDuplicates, sort, index BAM file and run samtools stats, flagstat and idxstats */ -include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/modules/picard/markduplicates/main' -include { SAMTOOLS_INDEX } from '../../modules/nf-core/modules/samtools/index/main' +include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/picard/markduplicates/main' +include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' include { BAM_STATS_SAMTOOLS } from './bam_stats_samtools' workflow MARK_DUPLICATES_PICARD { diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index ffe99518..7be0f832 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -92,22 +92,22 @@ include { FILTER_BAM_BAMTOOLS } from '../subworkflows/local/filter_bam_bamtools' // MODULE: Installed directly from nf-core/modules // -include { PICARD_MERGESAMFILES } from '../modules/nf-core/modules/picard/mergesamfiles/main' -include { PICARD_COLLECTMULTIPLEMETRICS } from '../modules/nf-core/modules/picard/collectmultiplemetrics/main' -include { PRESEQ_LCEXTRAP } from '../modules/nf-core/modules/preseq/lcextrap/main' -include { PHANTOMPEAKQUALTOOLS } from '../modules/nf-core/modules/phantompeakqualtools/main' -include { UCSC_BEDGRAPHTOBIGWIG } from '../modules/nf-core/modules/ucsc/bedgraphtobigwig/main' -include { DEEPTOOLS_COMPUTEMATRIX } from '../modules/nf-core/modules/deeptools/computematrix/main' -include { DEEPTOOLS_PLOTPROFILE } from '../modules/nf-core/modules/deeptools/plotprofile/main' -include { DEEPTOOLS_PLOTHEATMAP } from '../modules/nf-core/modules/deeptools/plotheatmap/main' -include { DEEPTOOLS_PLOTFINGERPRINT } from '../modules/nf-core/modules/deeptools/plotfingerprint/main' -include { KHMER_UNIQUEKMERS } from '../modules/nf-core/modules/khmer/uniquekmers/main' -include { MACS2_CALLPEAK } from '../modules/nf-core/modules/macs2/callpeak/main' -include { SUBREAD_FEATURECOUNTS } from '../modules/nf-core/modules/subread/featurecounts/main' -include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/modules/custom/dumpsoftwareversions/main' - -include { HOMER_ANNOTATEPEAKS as HOMER_ANNOTATEPEAKS_MACS2 } from '../modules/nf-core/modules/homer/annotatepeaks/main' -include { HOMER_ANNOTATEPEAKS as HOMER_ANNOTATEPEAKS_CONSENSUS } from '../modules/nf-core/modules/homer/annotatepeaks/main' +include { PICARD_MERGESAMFILES } from '../modules/nf-core/picard/mergesamfiles/main' +include { PICARD_COLLECTMULTIPLEMETRICS } from '../modules/nf-core/picard/collectmultiplemetrics/main' +include { PRESEQ_LCEXTRAP } from '../modules/nf-core/preseq/lcextrap/main' +include { PHANTOMPEAKQUALTOOLS } from '../modules/nf-core/phantompeakqualtools/main' +include { UCSC_BEDGRAPHTOBIGWIG } from '../modules/nf-core/ucsc/bedgraphtobigwig/main' +include { DEEPTOOLS_COMPUTEMATRIX } from '../modules/nf-core/deeptools/computematrix/main' +include { DEEPTOOLS_PLOTPROFILE } from '../modules/nf-core/deeptools/plotprofile/main' +include { DEEPTOOLS_PLOTHEATMAP } from '../modules/nf-core/deeptools/plotheatmap/main' +include { DEEPTOOLS_PLOTFINGERPRINT } from '../modules/nf-core/deeptools/plotfingerprint/main' +include { KHMER_UNIQUEKMERS } from '../modules/nf-core/khmer/uniquekmers/main' +include { MACS2_CALLPEAK } from '../modules/nf-core/macs2/callpeak/main' +include { SUBREAD_FEATURECOUNTS } from '../modules/nf-core/subread/featurecounts/main' +include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main' + +include { HOMER_ANNOTATEPEAKS as HOMER_ANNOTATEPEAKS_MACS2 } from '../modules/nf-core/homer/annotatepeaks/main' +include { HOMER_ANNOTATEPEAKS as HOMER_ANNOTATEPEAKS_CONSENSUS } from '../modules/nf-core/homer/annotatepeaks/main' // // SUBWORKFLOW: Consisting entirely of nf-core/modules @@ -226,7 +226,7 @@ workflow CHIPSEQ { ch_genome_bam_chromap .paired_end .collect() - .map { + .map { it -> def count = it.size() if (count > 0) { @@ -274,12 +274,12 @@ workflow CHIPSEQ { def meta_clone = meta.clone() meta_clone.remove('read_group') meta_clone.id = meta_clone.id.split('_')[0..-2].join('_') - [ meta_clone, bam ] + [ meta_clone, bam ] } .groupTuple(by: [0]) - .map { + .map { it -> - [ it[0], it[1].flatten() ] + [ it[0], it[1].flatten() ] } .set { ch_sort_bam } @@ -405,15 +405,15 @@ workflow CHIPSEQ { .bam .join(FILTER_BAM_BAMTOOLS.out.bai, by: [0]) .set { ch_genome_bam_bai } - + ch_genome_bam_bai .combine(ch_genome_bam_bai) - .map { + .map { meta1, bam1, bai1, meta2, bam2, bai2 -> meta1.control == meta2.id ? [ meta1, [ bam1, bam2 ], [ bai1, bai2 ] ] : null } .set { ch_ip_control_bam_bai } - + // // MODULE: deepTools plotFingerprint joint QC for IP and control // @@ -445,9 +445,9 @@ workflow CHIPSEQ { // Create channels: [ meta, ip_bam, control_bam ] ch_ip_control_bam_bai - .map { - meta, bams, bais -> - [ meta , bams[0], bams[1] ] + .map { + meta, bams, bais -> + [ meta , bams[0], bams[1] ] } .set { ch_ip_control_bam } @@ -472,9 +472,9 @@ workflow CHIPSEQ { // Create channels: [ meta, ip_bam, peaks ] ch_ip_control_bam .join(ch_macs2_peaks, by: [0]) - .map { - it -> - [ it[0], it[1], it[3] ] + .map { + it -> + [ it[0], it[1], it[3] ] } .set { ch_ip_bam_peaks } @@ -489,9 +489,9 @@ workflow CHIPSEQ { // Create channels: [ meta, peaks, frip ] ch_ip_bam_peaks .join(FRIP_SCORE.out.txt, by: [0]) - .map { - it -> - [ it[0], it[2], it[3] ] + .map { + it -> + [ it[0], it[2], it[3] ] } .set { ch_ip_peaks_frip } @@ -550,9 +550,9 @@ workflow CHIPSEQ { // Create channels: [ meta , [ peaks ] ] // Where meta = [ id:antibody, multiple_groups:true/false, replicates_exist:true/false ] ch_macs2_peaks - .map { - meta, peak -> - [ meta.antibody, meta.id.split('_')[0..-2].join('_'), peak ] + .map { + meta, peak -> + [ meta.antibody, meta.id.split('_')[0..-2].join('_'), peak ] } .groupTuple() .map { @@ -561,7 +561,7 @@ workflow CHIPSEQ { antibody, groups.groupBy().collectEntries { [(it.key) : it.value.size()] }, peaks - ] + ] } .map { antibody, groups, peaks -> @@ -569,7 +569,7 @@ workflow CHIPSEQ { meta_new.id = antibody meta_new.multiple_groups = groups.size() > 1 meta_new.replicates_exist = groups.max { groups.value }.value > 1 - [ meta_new, peaks ] + [ meta_new, peaks ] } .set { ch_antibody_peaks } @@ -605,7 +605,7 @@ workflow CHIPSEQ { // Create channels: [ antibody, [ ip_bams ] ] ch_ip_control_bam - .map { + .map { meta, ip_bam, control_bam -> [ meta.antibody, ip_bam ] } @@ -616,9 +616,9 @@ workflow CHIPSEQ { MACS2_CONSENSUS .out .saf - .map { - meta, saf -> - [ meta.id, meta, saf ] + .map { + meta, saf -> + [ meta.id, meta, saf ] } .join(ch_antibody_bams) .map { @@ -705,10 +705,10 @@ workflow CHIPSEQ { ch_picardcollectmultiplemetrics_multiqc.collect{it[1]}.ifEmpty([]), ch_preseq_multiqc.collect{it[1]}.ifEmpty([]), - + ch_deeptoolsplotprofile_multiqc.collect{it[1]}.ifEmpty([]), ch_deeptoolsplotfingerprint_multiqc.collect{it[1]}.ifEmpty([]), - + PHANTOMPEAKQUALTOOLS.out.spp.collect{it[1]}.ifEmpty([]), MULTIQC_CUSTOM_PHANTOMPEAKQUALTOOLS.out.nsc.collect{it[1]}.ifEmpty([]), MULTIQC_CUSTOM_PHANTOMPEAKQUALTOOLS.out.rsc.collect{it[1]}.ifEmpty([]),