diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f1122ea3..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -name: Bug report -about: Report something that is broken or incorrect -title: "[BUG]" ---- - - - -## Check Documentation - -I have checked the following places for your error: - -- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) -- [ ] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) - -## Description of the bug - - - -## Steps to reproduce - -Steps to reproduce the behaviour: - -1. Command line: -2. See error: - -## Expected behaviour - - - -## Log files - -Have you provided the following extra information/files: - -- [ ] The command used to run the module -- [ ] The `.nextflow.log` file - -## System - -- Hardware: -- Executor: -- OS: -- Version - -## Nextflow Installation - -- Version: - -## Container engine - -- Engine: -- version: -- Image tag: - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..74907cfe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,52 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: checkboxes + attributes: + label: Have you checked the docs? + description: I have checked the following places for my error + options: + - label: "[nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)" + required: true + - label: "[nf-core modules documentation](https://nf-co.re/docs/contributing/modules)" + required: true + + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal. + render: console + placeholder: | + $ nextflow run ... + + Some output where something broke + + - type: textarea + id: files + attributes: + label: Relevant files + description: | + Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed. + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files. + + - type: textarea + id: system + attributes: + label: System information + description: | + * Nextflow version _(eg. 21.10.3)_ + * Hardware _(eg. HPC, Desktop, Cloud)_ + * Executor _(eg. slurm, local, awsbatch)_ + * Container engine and version: _(e.g. Docker 1.0.0, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ + * Image tag: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 72d6c058..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for nf-core/modules -title: "[FEATURE]" ---- - - - -## Is your feature request related to a problem? Please describe - - - - - -## Describe the solution you'd like - - - -## Describe alternatives you've considered - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..316fba90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest an idea for nf-core/modules +labels: feature +title: "[FEATURE]" +body: + - type: textarea + id: description + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the bug is. + placeholder: | + + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: A clear and concise description of the solution you want to happen. + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add any other context about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/new_module.md b/.github/ISSUE_TEMPLATE/new_module.md deleted file mode 100644 index 5c7e61cc..00000000 --- a/.github/ISSUE_TEMPLATE/new_module.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: New module -about: Suggest a new module for nf-core/modules -title: "new module: TOOL/SUBTOOL" -label: new module ---- - - - -I think it would be good to have a module for [TOOL](https://bioconda.github.io/recipes/TOOL/README.html) - -- [ ] This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command -- [ ] There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module -- [ ] There is no [open issue](https://github.com/nf-core/modules/issues) for this module -- [ ] If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module diff --git a/.github/ISSUE_TEMPLATE/new_module.yml b/.github/ISSUE_TEMPLATE/new_module.yml new file mode 100644 index 00000000..2d3e9d47 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_module.yml @@ -0,0 +1,36 @@ +name: New module +description: Suggest a new module for nf-core/modules +title: "new module: TOOL/SUBTOOL" +labels: new module +body: + - type: checkboxes + attributes: + label: Is there an existing module for this? + description: This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command + options: + - label: I have searched for the existing module + required: true + + - type: checkboxes + attributes: + label: Is there an open PR for this? + description: There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module + options: + - label: I have searched for existing PRs + required: true + + - type: checkboxes + attributes: + label: Is there an open issue for this? + description: There is no [open issue](https://github.com/nf-core/modules/issues) for this module + options: + - label: I have searched for existing issues + required: true + + - type: checkboxes + attributes: + label: Are you going to work on this? + description: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + options: + - label: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + required: false diff --git a/modules/allelecounter/meta.yml b/modules/allelecounter/meta.yml index 7d921e12..0734512e 100644 --- a/modules/allelecounter/meta.yml +++ b/modules/allelecounter/meta.yml @@ -32,8 +32,8 @@ input: description: loci file pattern: "*.{tsv}" - fasta: - type: file - description: Input genome fasta file. Required when passing CRAM files. + type: file + description: Input genome fasta file. Required when passing CRAM files. output: - meta: diff --git a/modules/amplify/predict/main.nf b/modules/amplify/predict/main.nf new file mode 100644 index 00000000..d035516f --- /dev/null +++ b/modules/amplify/predict/main.nf @@ -0,0 +1,41 @@ +def VERSION = '1.0.3' // Version information not provided by tool + +process AMPLIFY_PREDICT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::amplify=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/amplify:1.0.3--py36hdfd78af_0': + 'quay.io/biocontainers/amplify:1.0.3--py36hdfd78af_0' }" + + input: + tuple val(meta), path(faa) + path(model_dir) + + output: + tuple val(meta), path('*.tsv'), emit: tsv + 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 custom_model_dir = model_dir ? "-md ${model_dir}" : "" + """ + AMPlify \\ + $args \\ + ${custom_model_dir} \\ + -s '${faa}' + + #rename output, because tool includes date and time in name + mv *.tsv ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + AMPlify: $VERSION + END_VERSIONS + """ +} diff --git a/modules/amplify/predict/meta.yml b/modules/amplify/predict/meta.yml new file mode 100644 index 00000000..c9ffe8a4 --- /dev/null +++ b/modules/amplify/predict/meta.yml @@ -0,0 +1,47 @@ +name: "amplify_predict" +description: AMPlify is an attentive deep learning model for antimicrobial peptide prediction. +keywords: + - antimicrobial peptides + - AMPs + - prediction + - model +tools: + - "amplify": + description: "Attentive deep learning model for antimicrobial peptide prediction" + homepage: "https://github.com/bcgsc/AMPlify" + documentation: "https://github.com/bcgsc/AMPlify" + tool_dev_url: "https://github.com/bcgsc/AMPlify" + doi: "https://doi.org/10.1186/s12864-022-08310-4" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - faa: + type: file + description: amino acid sequences fasta + pattern: "*.{fa,fa.gz,faa,faa.gz,fasta,fasta.gz}" + - model_dir: + type: directory + description: Directory of where models are stored (optional) + +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" + - tsv: + type: file + description: amino acid sequences with prediction (AMP, non-AMP) and probability scores + pattern: "*.{tsv}" + +authors: + - "@louperelo" diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..a0928333 --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,56 @@ +process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { + label 'process_low' + + conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' : + 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" + + /* + These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. + Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them. + These files are also emitted as output channels in this module to enable the antismash-lite module to use them as mount volumes to the docker/singularity containers. + */ + + containerOptions { + workflow.containerEngine == 'singularity' ? + "-B $database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + workflow.containerEngine == 'docker' ? + "-v \$PWD/$database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + '' + } + + input: + path database_css + path database_detection + path database_modules + + output: + path("antismash_db") , emit: database + path("antismash_dir"), emit: antismash_dir + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + conda = params.enable_conda + """ + download-antismash-databases \\ + --database-dir antismash_db \\ + $args + + if [[ $conda = false ]]; \ + then \ + cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir; \ + else \ + cp -r \$(python -c 'import antismash;print(antismash.__file__.split("/__")[0])') antismash_dir; \ + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + antismash-lite: \$(antismash --version | sed 's/antiSMASH //') + END_VERSIONS + """ +} diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml new file mode 100644 index 00000000..f7ddf3b0 --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -0,0 +1,60 @@ +name: antismash_antismashlitedownloaddatabases +description: antiSMASH allows the rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters. This module downloads the antiSMASH databases. +keywords: + - secondary metabolites + - BGC + - biosynthetic gene cluster + - genome mining + - NRPS + - RiPP + - antibiotics + - prokaryotes + - bacteria + - eukaryotes + - fungi + - antismash + - database +tools: + - antismash: + description: antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell + homepage: https://docs.antismash.secondarymetabolites.org + documentation: https://docs.antismash.secondarymetabolites.org + tool_dev_url: https://github.com/antismash/antismash + doi: "10.1093/nar/gkab335" + licence: ["AGPL v3"] + +input: + - database_css: + type: directory + description: | + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "css" + - database_detection: + type: directory + description: | + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "detection" + - database_modules: + type: directory + description: | + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "modules" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - database: + type: directory + description: Download directory for antiSMASH databases + pattern: "antismash_db" + - antismash_dir: + type: directory + description: | + antismash installation folder which is being modified during the antiSMASH database downloading step. The modified files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database and installation folder in pipelines. + pattern: "antismash_dir" + +authors: + - "@jasmezz" diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 014e5cdb..aaa5b663 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -2,10 +2,10 @@ process BAMTOOLS_SPLIT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : - 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' : + 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }" input: tuple val(meta), path(bam) @@ -20,11 +20,15 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') """ bamtools \\ - split \\ - -in $bam \\ - $args + merge \\ + $input_list \\ + | bamtools \\ + split \\ + -stub $prefix \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0e848212..8af701f0 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,7 +23,7 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A BAM file to split + description: A list of one or more BAM files to merge and then split pattern: "*.bam" output: @@ -43,3 +43,4 @@ output: authors: - "@sguizard" + - "@matthdsm" diff --git a/modules/bclconvert/.gitignore b/modules/bclconvert/.gitignore new file mode 100644 index 00000000..45b0ea3a --- /dev/null +++ b/modules/bclconvert/.gitignore @@ -0,0 +1,2 @@ +bcl-convert +*.rpm diff --git a/modules/bclconvert/Dockerfile b/modules/bclconvert/Dockerfile new file mode 100644 index 00000000..df3e1d0f --- /dev/null +++ b/modules/bclconvert/Dockerfile @@ -0,0 +1,15 @@ +# Dockerfile to create container with bcl-convert +# Push to nfcore/bclconvert: + +FROM debian:bullseye-slim +LABEL authors="Matthias De Smet " \ + description="Docker image containing bcl-convert" +# Disclaimer: this container is not provided nor supported by Illumina +# 'ps' command is need by some nextflow executions to collect system stats +# Install procps and clean apt cache +RUN apt-get update \ + && apt-get install -y \ + procps \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* +COPY bcl-convert /usr/local/bin/bcl-convert +RUN chmod +x /usr/local/bin/bcl-convert diff --git a/modules/bclconvert/LICENSE b/modules/bclconvert/LICENSE new file mode 100644 index 00000000..6f523227 --- /dev/null +++ b/modules/bclconvert/LICENSE @@ -0,0 +1,30 @@ +ILLUMINA END-USER SOFTWARE LICENSE AGREEMENT + +IMPORTANT-READ CAREFULLY. THIS IS A LICENSE AGREEMENT THAT YOU ARE REQUIRED TO ACCEPT BEFORE, DOWNLOADING, INSTALLING AND USING ANY SOFTWARE MADE AVAILABLE FROM THE ILLUMINA SUPPORT CENTER (https://support.illumina.com). + +CAREFULLY READ ALL THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT BEFORE PROCEEDING WITH DOWNLOADING, INSTALLING, AND/OR USING THE SOFTWARE. YOU ARE NOT PERMITTED TO DOWNLOAD, INSTALL, AND/OR USE THE SOFTWARE UNTIL YOU HAVE AGREED TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. YOU REPRESENT AND WARRANT THAT YOU ARE DULY AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT ON BEHALF OF YOUR EMPLOYER. + +Software made available through the Illumina Support Center is licensed, not sold, to you. Your license to each software program made available through the Illumina Support Center is subject to your prior acceptance of either this Illumina End-User Software License Agreement (“Agreement”), or a custom end user license agreement (“Custom EULA”), if one is provided with the software. Any software that is subject to this Agreement is referred to herein as the “Software.” By accepting this Agreement, you agree the terms and conditions of this Agreement will apply to and govern any and all of your downloads, installations, and uses of each Illumina software program made available through the Illumina Support Center, except that your download, installation, and use of any software provided with a Custom EULA will be governed by the terms and conditions of the Custom EULA. + +This Agreement is made and entered into by and between Illumina, Inc., a Delaware corporation, having offices at 5200 Illumina Way, San Diego, CA 92122 (“Illumina”) and you as the end-user of the Software (hereinafter, “Licensee” or “you”). All software, firmware, and associated media, printed materials, and online and electronic documentation, including any updates or upgrades thereof, made available through the Illumina Support Center (collectively, “Software”) provided to Licensee are for use solely by Licensee and the provisions herein WILL apply with respect to such Software. + +License Grant. Subject to the terms and conditions of this Agreement, Illumina grants to Licensee, under the following terms and conditions, a personal, non-exclusive, revocable, non-transferable, non-sublicensable license, for its internal end-use purposes only, in the ordinary course of Licensee’s business to use the Software in executable object code form only, solely at the Licensee’s facility to, install and use the Software on a single computer accessible only by Licensee (and not on any public network or server), where the single computer is owned, leased, or otherwise substantially controlled by Licensee, for the purpose of processing and analyzing data generated from an Illumina genetic sequencing instrument owned and operated solely by Licensee (the “Product”). In the case of Software provided by Illumina in non-compiled form, Illumina grants Licensee a personal, non-exclusive, non-sublicenseable, restricted right to compile, install, and use one copy of the Software solely for processing and analyzing data generated from the Product. +License Restrictions. Except as expressly permitted in Section 1, Licensee may not make, have made, import, use, copy, reproduce, distribute, display, publish, sell, re-sell, lease, or sub-license the Software, in whole or in part, except as expressly provided for in this Agreement. Licensee may not modify, improve, translate, reverse engineer, decompile, disassemble, or create derivative works of the Software or otherwise attempt to (a) defeat, avoid, by-pass, remove, deactivate, or otherwise circumvent any software protection mechanisms in the Software including, without limitation, any such mechanism used to restrict or control the functionality of the Software, or (b) derive the source code or the underlying ideas, algorithms, structure, or organization form of the Software. Licensee will not allow, at any time, including during and after the term of the license, the Software or any portions or copies thereof in any form to become available to any third parties. Licensee may use the Software solely with genomic data that is generated using the Product; Licensee may not use the Software with any data generated from other products or instruments. Licensee may not use the Software to perform any data analysis services for any third party. +Ownership. The Software is protected by United States and international intellectual property laws. All right, title, and interest in and to the Software (including associated intellectual property rights) are and will remain vested in Illumina or Illumina’s affiliated companies or licensors. Licensee acknowledges that no rights, license or interest to any Illumina trademarks are granted hereunder. Licensee acknowledges that unauthorized reproduction or distribution of the Software, or any portion of it, may result in severe civil and criminal penalties. Illumina reserves all rights in and to the Software not expressly granted to Licensee under this Agreement. +Upgrades/Updates. Illumina may, at its sole discretion, provide updates or upgrades to the Software. In that case, Licensee WILL have the same rights and obligations under such updates or upgrades as it has for the versions of the Software initially provided to Licensee hereunder. Licensee recognizes that Illumina is not obligated to provide any upgrades or updates to, or support for, the Software. +Data Integrity/Loss. Licensee is responsible for the integrity and availability, including preventing the loss of data that Licensee generates, uses, analyzes, manages, or stores in connection with or through its use of the Software, including without limitation, investigating and implementing industry appropriate policies and procedures regarding the provision of access to Licensee’s data, monitoring access and use of Licensee’s data, conducting routine backups and archiving of Licensee’s data, and ensuring the adequacy of anti-virus software. Accordingly, Licensee agrees that Illumina is not responsible for any inability to access, loss or corruption of data as a result of Licensee’s use of the Software, and Illumina has no liability to Licensee in connection with such inability to access, loss or corruption of data. +Term of License. This Agreement will be in effect from the time Licensee expressly accepts the terms and conditions of this license, or otherwise installs the Software, thereby accepting the terms and conditions contained herein, and will remain in effect until terminated. This license will otherwise terminate upon the conditions set forth in this Agreement, if revoked by Illumina, or if Licensee fails to comply with any term or condition of this Agreement including failure to pay any applicable license fee. Licensee agrees upon termination of this Agreement for any reason to immediately discontinue use of and un-install the Software and destroy all copies of the Software in its possession and/or under its control, and return or destroy, at Illumina’s option, any compact disks, floppy disks or other media provided by Illumina storing the Software thereon (together with any authorized copies thereof), as well as any documentation associated therewith +Limited Warranty. Illumina warrants that, for a period of 6 months from the date of download or installation of the Software by Licensee, the Software will perform in all material respects in accordance with the accompanying documentation available on the Illumina Support Center. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN THE FOREGOING, AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED “AS IS” AND ILLUMINA EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS REGARDING THE SOFTWARE AND RESULTS GENERATED BY THE SOFTWARE, INCLUDING WITHOUT LIMITATION, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ALL OTHER EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABLE QUALITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALING OR USAGE OF TRADE. ILLUMINA DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE"S REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE ERROR FREE OR UNINTERRUPTED. +Limitation of Liability. +(a) ILLUMINA’S ENTIRE LIABILITY AND LICENSEE"S EXCLUSIVE REMEDY UNDER THE LIMITED WARRANTY PROVISION OF SECTION 7 ABOVE WILL BE, AT ILLUMINA’S OPTION, EITHER (i) RETURN OF THE PRICE PAID FOR THE SOFTWARE, OR (ii) REPAIR OR REPLACEMENT OF THE PORTIONS OF THE SOFTWARE THAT DO NOT COMPLY WITH ILLUMINA’S LIMITED WARRANTY. THIS LIMITED WARRANTY IS VOID AND ILLUMINA WILL HAVE NO LIABILITY AT ALL IF FAILURE OF THE SOFTWARE TO COMPLY WITH ILLUMINA LIMITED WARRANTY HAS RESULTED FROM: (w) FAILURE TO USE THE SOFTWARE IN ACCORDANCE WITH ILLUMINA’S THEN CURRENT USER MANUAL OR THIS AGREEMENT; (x) ACCIDENT, ABUSE, OR MISAPPLICATION; (y) PRODUCTS OR EQUIPMENT NOT SPECIFIED BY ILLUMINA AS BEING COMPATIBLE WITH THE SOFTWARE; OR (z) IF LICENSEE HAS NOT NOTIFIED ILLUMINA IN WRITING OF THE DEFECT WITHIN THE ABOVE WARRANTY PERIOD. + +(b) TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL ILLUMINA BE LIABLE UNDER ANY THEORY OF CONTRACT, TORT, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY PERSONAL INJURY OR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, EVEN IF ILLUMINA HAS BEEN ADVISED OF THE POSSIBILITY THEREOF INCLUDING, WITHOUT LIMITATION, LOST PROFITS, LOST DATA, INTERRUPTION OF BUSINESS, LOST BUSINESS REVENUE, OTHER ECONOMIC LOSS, OR ANY LOSS OF RECORDED DATA ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN SECTION 7 AND 8(a) ABOVE OR AS OTHERWISE PERMITTED BY LAW, IN NO EVENT WILL ILLUMINA’S TOTAL LIABILITY TO LICENSEE FOR ALL DAMAGES (OTHER THAN AS MAY BE REQUIRED BY APPLICABLE LAW IN CASES INVOLVING PERSONAL INJURY) EXCEED THE AMOUNT OF $500 USD. THE FOREGOING LIMITATIONS WILL APPLY EVEN IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. + +Survival. The limitations of liability and ownership rights of Illumina contained herein and Licensee’s obligations following termination of this Agreement WILL survive the termination of this Agreement for any reason. +Research Use Only. The Software is labeled with a For Research Use Only or similar labeling statement and the performance characteristics of the Software have not been established and the Software is not for use in diagnostic procedures. Licensee acknowledges and agrees that (i) the Software has not been approved, cleared, or licensed by the United States Food and Drug Administration or any other regulatory entity whether foreign or domestic for any specific intended use, whether research, commercial, diagnostic, or otherwise, and (ii) Licensee must ensure it has any regulatory approvals that are necessary for Licensee’s intended uses of the Software. Licensee will comply with all applicable laws and regulations when using and maintaining the Software. +General. Licensee may not sublicense, assign, share, pledge, rent or transfer any of its rights under this Agreement in relation to the Software or any portion thereof including documentation. Illumina reserves the right to change this Agreement at any time. When Illumina makes any changes, Illumina will provide the updated Agreement, or a link to it, on Illumina’s website (www.illumina.com) and such updated Agreement WILL become effective immediately. Licensee’s continued access to or use of the Software represents Licensee’s agreement to any revised Agreement. If one or more provisions of this Agreement are found to be invalid or unenforceable, this Agreement WILL not be rendered inoperative but the remaining provisions WILL continue in full force and effect. This Agreement constitutes the entire agreement between the parties with respect to the subject matter of this Agreement and merges all prior communications except that a “hard-copy” form of licensing agreement relating to the Software previously agreed to in writing by Illumina and Licensee WILL supersede and govern in the event of any conflicting provisions. +Governing Law. This Agreement WILL be governed by and construed in accordance with the laws of the state of California, USA, without regard to its conflicts of laws principles, and independent of where a suit or action hereunder may be filed. +U.S. Government End Users. If Licensee is a branch agency or instrumentality of the United States Government, the following provision applies. The Software is a “commercial item” as that term is defined at 48 C.F.R. 2.101, consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202 (as applicable). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4, all United States Government end users acquire the Software with only those rights set forth herein. +Contact. Any questions regarding legal rights, duties, obligations, or restrictions associated with the software hereunder should be directed to Illumina, Inc., 5200 Illumina Way, San Diego, CA 92122, Attention: Legal Department, Phone: (858) 202-4500, Fax: (858) 202-4599, web site: www.illumina.com . +Third Party Components. The Software may include third party software (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Licensed Software does not alter any rights or obligations Licensee may have under those open source or free software licenses. The licenses that govern the terms and conditions of use of the Third Party Programs included in the Licensed Software are provided in the READ ME provided with the Software. The READ ME also contains copyright statements for the various open source software components (or portions thereof) that are distributed with the Licensed Software. +END OF END-USER SOFTWARE LICENSE AGREEMENT. diff --git a/modules/bclconvert/README.md b/modules/bclconvert/README.md new file mode 100644 index 00000000..4f8538d0 --- /dev/null +++ b/modules/bclconvert/README.md @@ -0,0 +1,17 @@ +# Updating the docker container and making a new module release + +bcl-convert is a commercial tool from Illumina. The container provided for the bcl-convert nf-core module is not provided nor supported by Illumina. Updating the bcl-convert versions in the container and pushing the update to Dockerhub needs to be done manually. + +1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): download the rpm of the desired bcl-convert version with `curl` or `wget`. +2. Unpack the RPM package using `rpm2cpio bcl-convert-*.rpm | cpio -i --make-directories`. Place the executable located in `/usr/bin/bcl-convert` in the same folder where the Dockerfile lies. +3. Create and test the container: + + ```bash + docker build . -t nfcore/bclconvert: + ``` + +4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. + + ```bash + docker push nfcore/bclconvert: + ``` diff --git a/modules/bclconvert/main.nf b/modules/bclconvert/main.nf new file mode 100644 index 00000000..e6925b50 --- /dev/null +++ b/modules/bclconvert/main.nf @@ -0,0 +1,81 @@ +process BCLCONVERT { + tag '$samplesheet' + label 'process_high' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "nfcore/bclconvert:3.9.3" + + input: + path samplesheet + path run_dir + + output: + path "*.fastq.gz" ,emit: fastq + path "Reports/*.{csv,xml,bin}" ,emit: reports + path "Logs/*.{log,txt}" ,emit: logs + path "InterOp/*.bin" ,emit: interop + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + + """ + bcl-convert \ + $args \\ + --output-directory . \\ + --bcl-input-directory ${run_dir} \\ + --sample-sheet ${samplesheet} \\ + --bcl-num-parallel-tiles ${task.cpus} + + mkdir InterOp + cp ${run_dir}/InterOp/*.bin InterOp/ + mv Reports/*.bin InterOp/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ + + stub: + """ + echo "sample1_S1_L001_R1_001" > sample1_S1_L001_R1_001.fastq.gz + echo "sample1_S1_L001_R2_001" > sample1_S1_L001_R2_001.fastq.gz + echo "sample1_S1_L002_R1_001" > sample1_S1_L002_R1_001.fastq.gz + echo "sample1_S1_L002_R2_001" > sample1_S1_L002_R2_001.fastq.gz + echo "sample2_S2_L001_R1_001" > sample2_S2_L001_R1_001.fastq.gz + echo "sample2_S2_L001_R2_001" > sample2_S2_L001_R2_001.fastq.gz + echo "sample2_S2_L002_R1_001" > sample2_S2_L002_R1_001.fastq.gz + echo "sample2_S2_L002_R2_001" > sample2_S2_L002_R2_001.fastq.gz + + mkdir Reports + echo "Adapter_Metrics" > Reports/Adapter_Metrics.csv + echo "Demultiplex_Stats" > Reports/Demultiplex_Stats.csv + echo "fastq_list" > Reports/fastq_list.csv + echo "Index_Hopping_Counts" > Reports/Index_Hopping_Counts.csv + echo "IndexMetricsOut" > Reports/IndexMetricsOut.bin + echo "Quality_Metrics" > Reports/Quality_Metrics.csv + echo "RunInfo" > Reports/RunInfo.xml + echo "SampleSheet" > Reports/SampleSheet.csv + echo "Top_Unknown_Barcodes" > Reports/Top_Unknown_Barcodes.csv + + mkdir Logs + echo "Errors" > Logs/Errors.log + echo "FastqComplete" > Logs/FastqComplete.txt + echo "Info" > Logs/Info.log + echo "Warnings" > Logs/Warnings.log + + mkdir InterOp/ + echo "InterOp" > InterOp/InterOp.bin + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ +} diff --git a/modules/bclconvert/meta.yml b/modules/bclconvert/meta.yml new file mode 100644 index 00000000..5c59a978 --- /dev/null +++ b/modules/bclconvert/meta.yml @@ -0,0 +1,45 @@ +name: "bclconvert" +description: Demultiplex Illumina BCL files +keywords: + - demultiplex + - illumina + - fastq +tools: + - "bclconvert": + description: "Demultiplex Illumina BCL files" + homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html" + documentation: "https://support-docs.illumina.com/SW/BCL_Convert/Content/SW/FrontPages/BCL_Convert.htm" + licence: "ILLUMINA" + +input: + - samplesheet: + type: file + description: "Input samplesheet" + pattern: "*.{csv}" + - run_dir: + type: directory + description: "Input run directory containing RunInfo.xml and BCL data" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Demultiplexed FASTQ files + pattern: "*.{fastq.gz}" + - reports: + type: file + description: Demultiplexing Reports + pattern: "Reports/*.{csv,xml}" + - logs: + type: file + description: Log files + pattern: "Logs/*.{log,txt}" + - interop: + type: file + description: Interop files + pattern: "Interop/*.{bin}" +authors: + - "@matthdsm" diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 44ce76ca..c233f955 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -29,6 +29,8 @@ process BOWTIE2_ALIGN { def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` + [ -z "\$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed 's/.rev.1.bt2l//'` + [ -z "\$INDEX" ] && echo "BT2 index files not found" 1>&2 && exit 1 bowtie2 \\ -x \$INDEX \\ -U $reads \\ @@ -49,6 +51,8 @@ process BOWTIE2_ALIGN { def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` + [ -z "\$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed 's/.rev.1.bt2l//'` + [ -z "\$INDEX" ] && echo "BT2 index files not found" 1>&2 && exit 1 bowtie2 \\ -x \$INDEX \\ -1 ${reads[0]} \\ diff --git a/modules/busco/main.nf b/modules/busco/main.nf new file mode 100644 index 00000000..f0713862 --- /dev/null +++ b/modules/busco/main.nf @@ -0,0 +1,84 @@ +process BUSCO { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::busco=5.3.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/busco:5.3.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path('tmp_input/*') + each lineage // Required: lineage to check against, "auto" enables --auto-lineage instead + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file + + output: + tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt, optional: true + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json, optional: true + tuple val(meta), path("*-busco") , emit: busco_dir + 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}-${lineage}" + def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" + def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' + """ + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u + fi + + # If the augustus config directory is not writable, then copy to writeable area + if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then + # Create writable tmp directory for augustus + AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) + cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR + export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR + echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" + fi + + # Ensure the input is uncompressed + INPUT_SEQS=input_seqs + mkdir "\$INPUT_SEQS" + cd "\$INPUT_SEQS" + for FASTA in ../tmp_input/*; do + if [ "\${FASTA##*.}" == 'gz' ]; then + gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) + else + ln -s "\$FASTA" . + fi + done + cd .. + + busco \\ + --cpu $task.cpus \\ + --in "\$INPUT_SEQS" \\ + --out ${prefix}-busco \\ + $busco_lineage \\ + $busco_lineage_dir \\ + $busco_config \\ + $args + + # clean up + rm -rf "\$INPUT_SEQS" + + # Move files to avoid staging/publishing issues + mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt + mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) + END_VERSIONS + """ +} diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml new file mode 100644 index 00000000..ef8c5245 --- /dev/null +++ b/modules/busco/meta.yml @@ -0,0 +1,69 @@ +name: busco +description: Benchmarking Universal Single Copy Orthologs +keywords: + - quality control + - genome + - transcriptome + - proteome +tools: + - busco: + description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. + homepage: https://busco.ezlab.org/ + documentation: https://busco.ezlab.org/busco_userguide.html + tool_dev_url: https://gitlab.com/ezlab/busco + doi: "10.1007/978-1-4939-9173-0_14" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleic or amino acid sequence file in FASTA format. + pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" + - lineage: + type: value + description: The BUSCO lineage to use, or "auto" to automatically select lineage + - busco_lineages_path: + type: directory + description: Path to local BUSCO lineages directory. + - config_file: + type: file + description: Path to BUSCO config file. + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - batch_summary: + type: file + description: Summary of all sequence files analyzed + pattern: "*-busco.batch_summary.txt" + - short_summaries_txt: + type: file + description: Short Busco summary in plain text format + pattern: "short_summary.*.txt" + - short_summaries_json: + type: file + description: Short Busco summary in JSON format + pattern: "short_summary.*.json" + - busco_dir: + type: directory + description: BUSCO lineage specific output + pattern: "*-busco" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@priyanka-surana" + - "@charles-plessy" + - "@mahesh-panchal" + - "@muffato" + - "@jvhagey" diff --git a/modules/cat/fastq/main.nf b/modules/cat/fastq/main.nf index bf0877c3..b6854895 100644 --- a/modules/cat/fastq/main.nf +++ b/modules/cat/fastq/main.nf @@ -4,8 +4,8 @@ process CAT_FASTQ { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index 17675cde..69c9d40e 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -2,43 +2,42 @@ process CNVPYTOR_CALLCNVS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) + val bin_sizes output: - tuple val(meta), path("*.tsv"), emit: cnvs - path "versions.yml" , emit: versions + tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' - def prefix = task.ext.prefix ?: "${meta.id}" + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -call $args > ${prefix}.tsv + -call $bin_sizes cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.tsv + touch ${pytor.baseName}.pytor cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/callcnvs/meta.yml b/modules/cnvpytor/callcnvs/meta.yml index edfc462a..6ba46b6f 100644 --- a/modules/cnvpytor/callcnvs/meta.yml +++ b/modules/cnvpytor/callcnvs/meta.yml @@ -17,8 +17,11 @@ input: e.g. [ id:'test'] - pytor: type: file - description: cnvpytor root file + description: pytor file containing partitions of read depth histograms using mean-shift method pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: @@ -26,10 +29,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - cnvs: + - pytor: type: file - description: file containing identified copy numer variations - pattern: "*.{tsv}" + description: pytor files containing cnv calls + pattern: "*.{pytor}" - versions: type: file description: File containing software versions diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index 9e59c6b8..fd2ebe14 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -2,13 +2,15 @@ process CNVPYTOR_HISTOGRAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) + val bin_sizes + output: tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor @@ -18,15 +20,15 @@ process CNVPYTOR_HISTOGRAM { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -his $args + -his $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ @@ -36,7 +38,7 @@ process CNVPYTOR_HISTOGRAM { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml index fcad2221..ecd48b9a 100644 --- a/modules/cnvpytor/histogram/meta.yml +++ b/modules/cnvpytor/histogram/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: @@ -40,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index 162da719..6f9abae9 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_IMPORTREADDEPTH { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(input_file), path(index) @@ -32,7 +32,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ @@ -43,7 +43,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/importreaddepth/meta.yml b/modules/cnvpytor/importreaddepth/meta.yml index 1cf3c0d0..8b58887e 100644 --- a/modules/cnvpytor/importreaddepth/meta.yml +++ b/modules/cnvpytor/importreaddepth/meta.yml @@ -52,3 +52,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 0311bdfc..6d7a9c6b 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -2,13 +2,14 @@ process CNVPYTOR_PARTITION { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) + val bin_sizes output: tuple val(meta), path("${pytor.baseName}.pytor"), emit: pytor @@ -18,15 +19,15 @@ process CNVPYTOR_PARTITION { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -partition $args + -partition $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ @@ -36,7 +37,7 @@ process CNVPYTOR_PARTITION { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml index a72cea4c..17b5e199 100644 --- a/modules/cnvpytor/partition/meta.yml +++ b/modules/cnvpytor/partition/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: @@ -40,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..1bb61a38 --- /dev/null +++ b/modules/cnvpytor/view/main.nf @@ -0,0 +1,60 @@ +process CNVPYTOR_VIEW { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor_files) + val bin_sizes + val output_format + + output: + tuple val(meta), path("*.vcf"), emit: vcf , optional: true + tuple val(meta), path("*.tsv"), emit: tsv , optional: true + tuple val(meta), path("*.xls"), emit: xls , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def output_suffix = output_format ?: 'vcf' + def bins = bin_sizes ?: '1000' + def input = pytor_files.join(" ") + def prefix = task.ext.prefix ?: "${meta.id}" + """ + + python3 < versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + def output_suffix = output_format ?: 'vcf' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.${output_suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml new file mode 100644 index 00000000..e4e68fad --- /dev/null +++ b/modules/cnvpytor/view/meta.yml @@ -0,0 +1,56 @@ +name: cnvpytor_view +description: view function to generate vcfs +keywords: + - cnv calling +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor_files: + type: file + description: pytor file containing cnv calls. To merge calls from multiple samples use a list of files. + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + - output_format: + type: string + description: output format of the cnv calls. Valid entries are "tsv", "vcf", and "xls" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - tsv: + type: file + description: tsv file containing cnv calls + pattern: "*.{tsv}" + - vcf: + type: file + description: vcf file containing cnv calls + pattern: "*.{vcf}" + - xls: + type: file + description: xls file containing cnv calls + pattern: "*.{xls}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" + - "@ramprasadn" diff --git a/modules/custom/getchromsizes/main.nf b/modules/custom/getchromsizes/main.nf index bbcfa9be..0eabf3a4 100644 --- a/modules/custom/getchromsizes/main.nf +++ b/modules/custom/getchromsizes/main.nf @@ -2,10 +2,10 @@ process CUSTOM_GETCHROMSIZES { tag "$fasta" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.15" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15--h1170115_1' : - 'quay.io/biocontainers/samtools:1.15--h1170115_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: path fasta diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 955952dc..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -2,20 +2,26 @@ process DIAMOND_BLASTP { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) - path db + path db + val out_ext + val blast_columns output: - tuple val(meta), path('*.txt'), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,6 +29,21 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' + switch ( out_ext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +52,9 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 8ac1d371..3aa81e53 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,12 +28,50 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" + - out_ext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" + - blast_columns: + type: string + description: | + Optional space separated list of DIAMOND tabular BLAST output keywords + used for in conjunction with the 'txt' out_ext option (--outfmt 6). See + DIAMOND documnetation for more information. output: - - txt: + - blast: type: file description: File containing blastp hits - pattern: "*.{blastp.txt}" + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" + - txt: + type: file + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions @@ -41,3 +79,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3700bd36..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -2,20 +2,26 @@ process DIAMOND_BLASTX { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) - path db + path db + val out_ext + val blast_columns output: - tuple val(meta), path('*.txt'), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,6 +29,21 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' + switch ( out_ext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +52,9 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 7eb3d7b4..2dcd7bc6 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,12 +28,44 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" + - out_ext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: + - blast: + type: file + description: File containing blastp hits + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" - txt: type: file - description: File containing blastx hits - pattern: "*.{blastx.txt}" + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions @@ -41,3 +73,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/makedb/main.nf b/modules/diamond/makedb/main.nf index e3d62f00..a76a94e5 100644 --- a/modules/diamond/makedb/main.nf +++ b/modules/diamond/makedb/main.nf @@ -2,12 +2,10 @@ process DIAMOND_MAKEDB { tag "$fasta" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? 'bioconda::diamond=2.0.9' : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: path fasta diff --git a/modules/elprep/filter/main.nf b/modules/elprep/filter/main.nf new file mode 100644 index 00000000..5ca288bc --- /dev/null +++ b/modules/elprep/filter/main.nf @@ -0,0 +1,89 @@ +process ELPREP_FILTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + val(run_haplotypecaller) + val(run_bqsr) + path(reference_sequences) + path(filter_regions_bed) + path(reference_elfasta) + path(known_sites_elsites) + path(target_regions_bed) + path(intermediate_bqsr_tables) + val(bqsr_tables_only) + val(get_activity_profile) + val(get_assembly_regions) + + + output: + tuple val(meta), path("output/**.{bam,sam}") ,emit: bam + tuple val(meta), path("*.metrics.txt") ,optional: true, emit: metrics + tuple val(meta), path("*.recall") ,optional: true, emit: recall + tuple val(meta), path("*.vcf.gz") ,optional: true, emit: gvcf + tuple val(meta), path("*.table") ,optional: true, emit: table + tuple val(meta), path("*.activity_profile.igv") ,optional: true, emit: activity_profile + tuple val(meta), path("*.assembly_regions.igv") ,optional: true, emit: assembly_regions + 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 suffix = args.contains("--output-type sam") ? "sam" : "bam" + + // filter args + def reference_sequences_cmd = reference_sequences ? " --replace-reference-sequences ${reference_sequences}" : "" + def filter_regions_cmd = filter_regions_bed ? " --filter-non-overlapping-reads ${filter_regions_bed}" : "" + + // markdup args + def markdup_cmd = args.contains("--mark-duplicates") ? " --mark-optical-duplicates ${prefix}.metrics.txt": "" + + // variant calling args + def haplotyper_cmd = run_haplotypecaller ? " --haplotypecaller ${prefix}.g.vcf.gz": "" + + def fasta_cmd = reference_elfasta ? " --reference ${reference_elfasta}": "" + def known_sites_cmd = known_sites_elsites ? " --known-sites ${known_sites_elsites}": "" + def target_regions_cmd = target_regions_bed ? " --target-regions ${target_regions_bed}": "" + + // bqsr args + def bqsr_cmd = run_bqsr ? " --bqsr ${prefix}.recall": "" + def bqsr_tables_only_cmd = bqsr_tables_only ? " --bqsr-tables-only ${prefix}.table": "" + + def intermediate_bqsr_cmd = intermediate_bqsr_tables ? " --bqsr-apply .": "" + + // misc + def activity_profile_cmd = get_activity_profile ? " --activity-profile ${prefix}.activity_profile.igv": "" + def assembly_regions_cmd = get_assembly_regions ? " --assembly-regions ${prefix}.assembly_regions.igv": "" + + """ + elprep filter ${bam} output/${prefix}.${suffix} \\ + ${reference_sequences_cmd} \\ + ${filter_regions_cmd} \\ + ${markdup_cmd} \\ + ${haplotyper_cmd} \\ + ${fasta_cmd} \\ + ${known_sites_cmd} \\ + ${target_regions_cmd} \\ + ${bqsr_cmd} \\ + ${bqsr_tables_only_cmd} \\ + ${intermediate_bqsr_cmd} \\ + ${activity_profile_cmd} \\ + ${assembly_regions_cmd} \\ + --nr-of-threads ${task.cpus} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/filter/meta.yml b/modules/elprep/filter/meta.yml new file mode 100644 index 00000000..d7d41071 --- /dev/null +++ b/modules/elprep/filter/meta.yml @@ -0,0 +1,106 @@ +name: "elprep_filter" +description: "Filter, sort and markdup sam/bam files, with optional BQSR and variant calling." +keywords: + - sort + - bam + - sam + - filter + - variant calling +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input SAM/BAM file + pattern: "*.{bam,sam}" + - run_haplotypecaller: + type: boolean + description: Run variant calling on the input files. Needed to generate gvcf output. + - run_bqsr: + type: boolean + description: Run BQSR on the input files. Needed to generate recall metrics. + - reference_sequences: + type: file + description: Optional SAM header to replace existing header. + pattern: "*.sam" + - filter_regions_bed: + type: file + description: Optional BED file containing regions to filter. + pattern: "*.bed" + - reference_elfasta: + type: file + description: Elfasta file, required for BQSR and variant calling. + pattern: "*.elfasta" + - known_sites: + type: file + description: Optional elsites file containing known SNPs for BQSR. + pattern: "*.elsites" + - target_regions_bed: + type: file + description: Optional BED file containing target regions for BQSR and variant calling. + pattern: "*.bed" + - intermediate_bqsr_tables: + type: file + description: Optional list of BQSR tables, used when parsing files created by `elprep split` + pattern: "*.table" + - bqsr_tables_only: + type: boolean + description: Write intermediate BQSR tables, used when parsing files created by `elprep split`. + - get_activity_profile: + type: boolean + description: Get the activity profile calculated by the haplotypecaller to the given file in IGV format. + - get_assembly_regions: + type: boolean + description: Get the assembly regions calculated by haplotypecaller to the speficied file in IGV format. +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" + - bam: + type: file + description: Sorted, markdup, optionally BQSR BAM/SAM file + pattern: "*.{bam,sam}" + - metrics: + type: file + description: Optional duplicate metrics file generated by elprep + pattern: "*.{metrics.txt}" + - recall: + type: file + description: Optional recall metrics file generated by elprep + pattern: "*.{recall}" + - gvcf: + type: file + description: Optional GVCF output file + pattern: "*.{vcf.gz}" + - table: + type: file + description: Optional intermediate BQSR table output file + pattern: "*.{table}" + - activity_profile: + type: file + description: Optional activity profile output file + pattern: "*.{activity_profile.igv}" + - assembly_regions: + type: file + description: Optional activity regions output file + pattern: "*.{assembly_regions.igv}" +authors: + - "@matthdsm" diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf new file mode 100644 index 00000000..d5ffc497 --- /dev/null +++ b/modules/elprep/merge/main.nf @@ -0,0 +1,43 @@ +process ELPREP_MERGE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("output/**.{bam,sam}") , emit: 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}" + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def single_end = meta.single_end ? " --single-end" : "" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + elprep merge \\ + input/ \\ + output/${prefix}.${suffix} \\ + $args \\ + ${single_end} \\ + --nr-of-threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml new file mode 100644 index 00000000..1f49b1a0 --- /dev/null +++ b/modules/elprep/merge/meta.yml @@ -0,0 +1,44 @@ +name: "elprep_merge" +description: Merge split bam/sam chunks in one file +keywords: + - bam + - sam + - merge +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM chunks to merge + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: Merged BAM/SAM file + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/modules/elprep/split/main.nf b/modules/elprep/split/main.nf new file mode 100644 index 00000000..639944ef --- /dev/null +++ b/modules/elprep/split/main.nf @@ -0,0 +1,45 @@ +process ELPREP_SPLIT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("output/**.{bam,sam}"), emit: 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}" + def single_end = meta.single_end ? " --single-end": "" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + mkdir ${prefix} + + elprep split \\ + input \\ + output/ \\ + $args \\ + $single_end \\ + --nr-of-threads $task.cpus \\ + --output-prefix $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/split/meta.yml b/modules/elprep/split/meta.yml new file mode 100644 index 00000000..b99562fa --- /dev/null +++ b/modules/elprep/split/meta.yml @@ -0,0 +1,43 @@ +name: "elprep_split" +description: Split bam file into manageable chunks +keywords: + - bam + - split by chromosome +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM files + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: List of split BAM/SAM files + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/modules/ensemblvep/Dockerfile b/modules/ensemblvep/Dockerfile index ac1b4691..b4a1c664 100644 --- a/modules/ensemblvep/Dockerfile +++ b/modules/ensemblvep/Dockerfile @@ -8,13 +8,14 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-vep-104.3/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SPECIES=homo_sapiens -ARG VEP_VERSION=99 +ARG VEP_VERSION=104 +ARG VEP_TAG=104.3 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH # Download Genome RUN vep_install \ @@ -27,4 +28,4 @@ RUN vep_install \ --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-vep-104.3 > nf-core-vep-104.3.yml +RUN conda env export --name nf-core-vep-${VEP_TAG} > nf-core-vep-${VEP_TAG}.yml diff --git a/modules/ensemblvep/build.sh b/modules/ensemblvep/build.sh index 5fcb91df..650c8704 100755 --- a/modules/ensemblvep/build.sh +++ b/modules/ensemblvep/build.sh @@ -10,11 +10,12 @@ build_push() { VEP_TAG=$4 docker build \ + . \ -t nfcore/vep:${VEP_TAG}.${GENOME} \ - software/vep/. \ --build-arg GENOME=${GENOME} \ --build-arg SPECIES=${SPECIES} \ - --build-arg VEP_VERSION=${VEP_VERSION} + --build-arg VEP_VERSION=${VEP_VERSION} \ + --build-arg VEP_TAG=${VEP_TAG} docker push nfcore/vep:${VEP_TAG}.${GENOME} } diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index c2bd055f..a5a9b1ab 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -13,6 +13,7 @@ process ENSEMBLVEP { val species val cache_version path cache + path extra_files output: tuple val(meta), path("*.ann.vcf"), emit: vcf diff --git a/modules/ensemblvep/meta.yml b/modules/ensemblvep/meta.yml index cd9c8905..418bb970 100644 --- a/modules/ensemblvep/meta.yml +++ b/modules/ensemblvep/meta.yml @@ -10,17 +10,6 @@ tools: homepage: https://www.ensembl.org/info/docs/tools/vep/index.html documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html licence: ["Apache-2.0"] -params: - - use_cache: - type: boolean - description: | - Enable the usage of containers with cache - Does not work with conda - - vep_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/vep/tags input: - meta: type: map @@ -47,6 +36,10 @@ input: type: file description: | path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) output: - vcf: type: file diff --git a/modules/gamma/main.nf b/modules/gamma/main.nf new file mode 100644 index 00000000..e176ee68 --- /dev/null +++ b/modules/gamma/main.nf @@ -0,0 +1,41 @@ +def VERSION = '2.1' // Version information not provided by tool on CLI + +process GAMMA { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gamma=2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gamma%3A2.1--hdfd78af_0': + 'quay.io/biocontainers/gamma:2.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + path(db) + + output: + tuple val(meta), path("*.gamma") , emit: gamma + tuple val(meta), path("*.psl") , emit: psl + tuple val(meta), path("*.gff") , optional:true , emit: gff + tuple val(meta), path("*.fasta"), optional:true , emit: fasta + 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}" + """ + GAMMA.py \\ + $args \\ + $fasta \\ + $db \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gamma: $VERSION + END_VERSIONS + """ +} diff --git a/modules/gamma/meta.yml b/modules/gamma/meta.yml new file mode 100644 index 00000000..316b685b --- /dev/null +++ b/modules/gamma/meta.yml @@ -0,0 +1,63 @@ +name: "gamma" +description: Gene Allele Mutation Microbial Assessment +keywords: + - gamma + - gene-calling +tools: + - "gamma": + description: "Tool for Gene Allele Mutation Microbial Assessment" + homepage: "https://github.com/rastanton/GAMMA" + documentation: "https://github.com/rastanton/GAMMA" + tool_dev_url: "https://github.com/rastanton/GAMMA" + doi: "10.1093/bioinformatics/btab607" + licence: "['Apache License 2.0']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" + - db: + type: file + description: Database in FASTA format + pattern: "*.{fa,fasta}" + +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" + + - gamma: + type: file + description: GAMMA file with annotated gene matches + pattern: "*.{gamma}" + + - psl: + type: file + description: PSL file with all gene matches found + pattern: "*.{psl}" + + - gff: + type: file + description: GFF file + pattern: "*.{gff}" + + - fasta: + type: file + description: multifasta file of the gene matches + pattern: "*.{fasta}" + +authors: + - "@sateeshperi" + - "@rastanton" diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 57f69ecd..2cd9e7d4 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -17,7 +17,7 @@ process GATK4_HAPLOTYPECALLER { output: tuple val(meta), path("*.vcf.gz"), emit: vcf - tuple val(meta), path("*.tbi") , emit: tbi + tuple val(meta), path("*.tbi") , optional:true, emit: tbi path "versions.yml" , emit: versions when: diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index e8a98156..2650925b 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -12,7 +12,7 @@ process GATK4_MARKDUPLICATES { output: tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bai") , emit: bai + tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.metrics"), emit: metrics path "versions.yml" , emit: versions diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index 7ba9ccda..5c36b4ba 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -43,4 +43,15 @@ process GATK4_MERGEBAMALIGNMENT { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 4a1f5768..9969ad70 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -57,4 +57,18 @@ process GATK4_MUTECT2 { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.vcf.gz.stats + touch ${prefix}.f1r2.tar.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 4e8e9ddc..3084658d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -39,4 +39,15 @@ process GATK4_REVERTSAM { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.reverted.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 8553e419..d8d94d69 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -40,4 +40,17 @@ process GATK4_SAMTOFASTQ { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fastq.gz + touch ${prefix}_1.fastq.gz + touch ${prefix}_2.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index f7c559d9..85e5daa8 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -8,7 +8,7 @@ process GATK4_SPLITNCIGARREADS { 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai), path(intervals) path fasta path fai path dict @@ -23,6 +23,7 @@ process GATK4_SPLITNCIGARREADS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? "--intervals $intervals" : "" def avail_mem = 3 if (!task.memory) { @@ -35,6 +36,7 @@ process GATK4_SPLITNCIGARREADS { --input $bam \\ --output ${prefix}.bam \\ --reference $fasta \\ + $interval_command \\ --tmp-dir . \\ $args diff --git a/modules/gatk4/splitncigarreads/meta.yml b/modules/gatk4/splitncigarreads/meta.yml index 407e80bd..76bfdcd3 100644 --- a/modules/gatk4/splitncigarreads/meta.yml +++ b/modules/gatk4/splitncigarreads/meta.yml @@ -23,6 +23,13 @@ input: type: list description: BAM/SAM/CRAM file containing reads pattern: "*.{bam,sam,cram}" + - bai: + type: list + description: BAI/SAI/CRAI index file (optional) + pattern: "*.{bai,sai,crai}" + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) - fasta: type: file description: The reference fasta file diff --git a/modules/gunzip/main.nf b/modules/gunzip/main.nf index 9d4b0666..61bf1afa 100644 --- a/modules/gunzip/main.nf +++ b/modules/gunzip/main.nf @@ -4,8 +4,8 @@ process GUNZIP { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/happy/happy/main.nf b/modules/happy/happy/main.nf new file mode 100644 index 00000000..1bb99117 --- /dev/null +++ b/modules/happy/happy/main.nf @@ -0,0 +1,42 @@ +def VERSION = '0.3.14' + +process HAPPY_HAPPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(truth_vcf), path(query_vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.csv'), path('*.json') , emit: metrics + 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}" + + """ + hap.py \\ + $truth_vcf \\ + $query_vcf \\ + $args \\ + --reference $fasta \\ + --threads $task.cpus \\ + -R $bed \\ + -o $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hap.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/happy/meta.yml b/modules/happy/happy/meta.yml new file mode 100644 index 00000000..8ec762d5 --- /dev/null +++ b/modules/happy/happy/meta.yml @@ -0,0 +1,67 @@ +name: "happy_happy" +description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - truth_vcf: + type: file + description: gold standard VCF file + pattern: "*.{vcf,vcf.gz}" + - query_vcf: + type: file + description: VCF/GVCF file to query + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - summary: + type: file + description: A CSV file containing the summary of the benchmarking + pattern: "*.summary.csv" + - extended: + type: file + description: A CSV file containing extended info of the benchmarking + pattern: "*.extended.csv" + - runinfo: + type: file + description: A JSON file containing the run info + pattern: "*.runinfo.json" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/modules/happy/prepy/main.nf b/modules/happy/prepy/main.nf new file mode 100644 index 00000000..936f56ea --- /dev/null +++ b/modules/happy/prepy/main.nf @@ -0,0 +1,41 @@ +def VERSION = '0.3.14' + +process HAPPY_PREPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.vcf.gz') , emit: preprocessed_vcf + 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}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $vcf \\ + ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pre.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/prepy/meta.yml b/modules/happy/prepy/meta.yml new file mode 100644 index 00000000..7e27a652 --- /dev/null +++ b/modules/happy/prepy/meta.yml @@ -0,0 +1,55 @@ +name: "happy_prepy" +description: Pre.py is a preprocessing tool made to preprocess VCF files for Hap.py +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file to preprocess + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: A preprocessed VCF file + pattern: "*.vcf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/modules/kaiju/kaiju2table/main.nf b/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..00739d1e --- /dev/null +++ b/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,40 @@ +process KAIJU_KAIJU2TABLE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': + 'quay.io/biocontainers/kaiju:1.8.2--h2e03b76_0' }" + + input: + tuple val(meta), path(results) + path db + val taxon_rank + + output: + tuple val(meta), path('*.txt'), emit: summary + 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}" + """ + dbnodes=`find -L ${db} -name "*nodes.dmp"` + dbname=`find -L ${db} -name "*.fmi" -not -name "._*"` + kaiju2table $args \\ + -t \$dbnodes \\ + -n \$dbname \\ + -r ${taxon_rank} \\ + -o ${prefix}.txt \\ + ${results} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ +} diff --git a/modules/kaiju/kaiju2table/meta.yml b/modules/kaiju/kaiju2table/meta.yml new file mode 100644 index 00000000..bc3e85d7 --- /dev/null +++ b/modules/kaiju/kaiju2table/meta.yml @@ -0,0 +1,50 @@ +name: "kaiju_kaiju2table" +description: write your description here +keywords: + - classify + - metagenomics +tools: + - kaiju: + description: Fast and sensitive taxonomic classification for metagenomics + homepage: https://kaiju.binf.ku.dk/ + documentation: https://github.com/bioinformatics-centre/kaiju/blob/master/README.md + tool_dev_url: https://github.com/bioinformatics-centre/kaiju + doi: "10.1038/ncomms11257" + licence: ["GNU GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: file + description: File containing the kaiju classification results + pattern: "*.{txt}" + - taxon_rank: + type: string + description: | + Taxonomic rank to display in report + pattern: "phylum|class|order|family|genus|species" + +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" + - results: + type: file + description: | + Summary table for a given taxonomic rank + pattern: "*.{tsv}" + +authors: + - "@sofstam" + - "@talnor" + - "@jfy133" diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index 3ec5df52..d4000233 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -10,12 +10,15 @@ process KRAKEN2_KRAKEN2 { input: tuple val(meta), path(reads) path db + val save_output_fastqs + val save_reads_assignment output: - tuple val(meta), path('*classified*') , emit: classified - tuple val(meta), path('*unclassified*'), emit: unclassified - tuple val(meta), path('*report.txt') , emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*classified*') , optional:true, emit: classified_reads_fastq + tuple val(meta), path('*unclassified*') , optional:true, emit: unclassified_reads_fastq + tuple val(meta), path('*classifiedreads*'), optional:true, emit: classified_reads_assignment + tuple val(meta), path('*report.txt') , emit: report + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -26,19 +29,25 @@ process KRAKEN2_KRAKEN2 { def paired = meta.single_end ? "" : "--paired" def classified = meta.single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq" def unclassified = meta.single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq" + def classified_command = save_output_fastqs ? "--classified-out ${classified}" : "" + def unclassified_command = save_output_fastqs ? "--unclassified-out ${unclassified}" : "" + def readclassification_command = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : "" + def compress_reads_command = save_output_fastqs ? "pigz -p $task.cpus *.fastq" : "" + """ kraken2 \\ --db $db \\ --threads $task.cpus \\ - --unclassified-out $unclassified \\ - --classified-out $classified \\ --report ${prefix}.kraken2.report.txt \\ --gzip-compressed \\ + $unclassified_command \\ + $classified_command \\ + $readclassification_command \\ $paired \\ $args \\ $reads - pigz -p $task.cpus *.fastq + $compress_reads_command cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/kraken2/kraken2/meta.yml b/modules/kraken2/kraken2/meta.yml index 9d6a3855..7129fe3a 100644 --- a/modules/kraken2/kraken2/meta.yml +++ b/modules/kraken2/kraken2/meta.yml @@ -27,25 +27,40 @@ input: - db: type: directory description: Kraken2 database + - save_output_fastqs: + type: boolean + description: | + If true, optional commands are added to save classified and unclassified reads + as fastq files + - save_reads_assignment: + type: boolean + description: | + If true, an optional command is added to save a file reporting the taxonomic + classification of each input read output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - classified: + - classified_reads_fastq: type: file description: | - Reads classified to belong to any of the taxa + Reads classified as belonging to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - unclassified: + - unclassified_reads_fastq: type: file description: | - Reads not classified to belong to any of the taxa + Reads not classified to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - txt: + - classified_reads_assignment: + type: file + description: | + Kraken2 output file indicating the taxonomic assignment of + each input read + - report: type: file description: | Kraken2 report containing stats about classified diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index afcb0694..eaab43f0 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -18,7 +18,9 @@ process KRONA_KRONADB { script: def args = task.ext.args ?: '' """ - ktUpdateTaxonomy.sh taxonomy + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 7837bb87..bc78c6ba 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -23,7 +23,10 @@ process KRONA_KTIMPORTTAXONOMY { script: def args = task.ext.args ?: '' """ - ktImportTaxonomy "$report" -tax taxonomy + ktImportTaxonomy \\ + $args \\ + -tax taxonomy/ \\ + "$report" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/ktimporttaxonomy/meta.yml b/modules/krona/ktimporttaxonomy/meta.yml index b65919f8..df0ad1c9 100644 --- a/modules/krona/ktimporttaxonomy/meta.yml +++ b/modules/krona/ktimporttaxonomy/meta.yml @@ -23,8 +23,11 @@ input: Groovy Map containing sample information e.g. [ id:'test'] - database: - type: path - description: "Path to the taxonomy database downloaded by krona/kronadb" + type: file + description: | + Path to the taxonomy database .tab file downloaded by krona/ktUpdateTaxonomy + The file will be saved under a folder named "taxonomy" as "taxonomy/taxonomy.tab". + The parent folder will be passed as argument to ktImportTaxonomy. - report: type: file description: "A tab-delimited file with taxonomy IDs and (optionally) query IDs, magnitudes, and scores. Query IDs are taken from column 1, taxonomy IDs from column 2, and scores from column 3. Lines beginning with # will be ignored." diff --git a/modules/krona/ktimporttext/main.nf b/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..de0cfc22 --- /dev/null +++ b/modules/krona/ktimporttext/main.nf @@ -0,0 +1,34 @@ +process KRONA_KTIMPORTTEXT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.8.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1': + 'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }" + + input: + tuple val(meta), path(report) + + output: + tuple val(meta), path ('*.html'), emit: html + 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}" + """ + ktImportText \\ + $args \\ + -o ${prefix}.html \\ + $report + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g') + END_VERSIONS + """ +} diff --git a/modules/krona/ktimporttext/meta.yml b/modules/krona/ktimporttext/meta.yml new file mode 100644 index 00000000..a7108e0d --- /dev/null +++ b/modules/krona/ktimporttext/meta.yml @@ -0,0 +1,47 @@ +name: "krona_ktimporttext" +description: Creates a Krona chart from text files listing quantities and lineages. +keywords: + - plot + - taxonomy + - interactive + - html + - visualisation + - krona chart + - metagenomics +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: http://manpages.ubuntu.com/manpages/impish/man1/ktImportTaxonomy.1.html + tool_dev_url: https://github.com/marbl/Krona + doi: 10.1186/1471-2105-12-385 + licence: https://raw.githubusercontent.com/marbl/Krona/master/KronaTools/LICENSE.txt + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - report: + type: file + description: "Tab-delimited text file. Each line should be a number followed by a list of wedges to contribute to (starting from the highest level). If no wedges are listed (and just a quantity is given), it will contribute to the top level. If the same lineage is listed more than once, the values will be added. Quantities can be omitted if -q is specified. Lines beginning with '#' will be ignored." + pattern: "*.{txt}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - html: + type: file + description: A html file containing an interactive krona plot. + pattern: "*.{html}" + +authors: + - "@jianhong" diff --git a/modules/krona/ktupdatetaxonomy/main.nf b/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..8326f219 --- /dev/null +++ b/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,30 @@ +def VERSION='2.7.1' // Version information not provided by tool on CLI + +process KRONA_KTUPDATETAXONOMY { + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' : + 'quay.io/biocontainers/krona:2.7.1--pl526_5' }" + + output: + path 'taxonomy/taxonomy.tab', emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: $VERSION + END_VERSIONS + """ +} diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml new file mode 100644 index 00000000..945b5062 --- /dev/null +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -0,0 +1,31 @@ +name: krona_ktupdatetaxonomy +description: KronaTools Update Taxonomy downloads a taxonomy database +keywords: + - database + - taxonomy + - krona + - visualisation +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: https://github.com/marbl/Krona/wiki/Installing + tool_dev_url: + doi: https://doi.org/10.1186/1471-2105-12-385 + licence: + +input: + - none: There is no input. This module downloads a pre-built taxonomy database for use with Krona Tools. + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: A TAB separated file that contains a taxonomy database. + pattern: "*.{tab}" + +authors: + - "@mjakobs" diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf new file mode 100644 index 00000000..2b516f1b --- /dev/null +++ b/modules/md5sum/main.nf @@ -0,0 +1,35 @@ +process MD5SUM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.md5"), emit: checksum + 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}" + + """ + md5sum \\ + $args \\ + ${file} \\ + > ${file}.md5 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + md5sum: \$(echo \$(md5sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/md5sum/meta.yml b/modules/md5sum/meta.yml new file mode 100644 index 00000000..d4f1939d --- /dev/null +++ b/modules/md5sum/meta.yml @@ -0,0 +1,39 @@ +name: "md5sum" +description: Create an MD5 (128-bit) checksum +keywords: + - checksum +tools: + - "md5sum": + description: Create an MD5 (128-bit) checksum + homepage: "https://www.gnu.org" + documentation: "https://man7.org/linux/man-pages/man1/md5sum.1.html" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + pattern: "*.*" + +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" + - checksum: + type: file + description: File containing checksum + pattern: "*.md5" + +authors: + - "@matthdsm" diff --git a/modules/meryl/count/main.nf b/modules/meryl/count/main.nf new file mode 100644 index 00000000..f7a2811d --- /dev/null +++ b/modules/meryl/count/main.nf @@ -0,0 +1,37 @@ +process MERYL_COUNT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::meryl=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1': + 'quay.io/biocontainers/meryl:1.3--h87f3376_1' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.meryldb"), emit: meryl_db + 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}" + """ + for READ in $reads; do + meryl count \\ + threads=$task.cpus \\ + $args \\ + $reads \\ + output read.\${READ%.f*}.meryldb + done + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml new file mode 100644 index 00000000..854f8759 --- /dev/null +++ b/modules/meryl/count/meta.yml @@ -0,0 +1,43 @@ +name: "meryl_count" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - count +tools: + - "meryl": + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" + doi: "" + licence: "['GPL']" + +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. + +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" + - meryl_db: + type: directory + description: A Meryl k-mer database + pattern: "*.meryldb" + +authors: + - "@mahesh-panchal" diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 3fc6b277..bff0eb9a 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -23,7 +23,7 @@ process METAPHLAN3 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_type = ("$input".endsWith(".fastq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" + def input_type = ("$input".endsWith(".fastq.gz") || "$input".endsWith(".fq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index fe06f14d..08ac6eef 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -2,18 +2,22 @@ process MINIMAP2_ALIGN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::minimap2=2.21' : null) + conda (params.enable_conda ? 'bioconda::minimap2=2.21 bioconda::samtools=1.12' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.21--h5bf99c6_0' : - 'quay.io/biocontainers/minimap2:2.21--h5bf99c6_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" input: tuple val(meta), path(reads) path reference + val bam_format + val cigar_paf_format + val cigar_bam output: - tuple val(meta), path("*.paf"), emit: paf - path "versions.yml" , emit: versions + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,13 +26,19 @@ process MINIMAP2_ALIGN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" + def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' """ minimap2 \\ $args \\ -t $task.cpus \\ $reference \\ $input_reads \\ - > ${prefix}.paf + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/minimap2/align/meta.yml b/modules/minimap2/align/meta.yml index 89e24283..991b39a0 100644 --- a/modules/minimap2/align/meta.yml +++ b/modules/minimap2/align/meta.yml @@ -29,6 +29,17 @@ input: type: file description: | Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) output: - meta: type: map @@ -39,9 +50,16 @@ output: type: file description: Alignment in PAF format pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" - versions: type: file description: File containing software versions pattern: "versions.yml" authors: - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..317624b5 --- /dev/null +++ b/modules/motus/downloaddb/main.nf @@ -0,0 +1,39 @@ +process MOTUS_DOWNLOADDB { + label 'process_low' + + conda (params.enable_conda ? "bioconda::motus=3.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" + + input: + path motus_downloaddb_script + + output: + path "db_mOTU/" , emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def software = "${motus_downloaddb_script.simpleName}_copy.py" + """ + ## must copy script file to working directory, + ## otherwise the reference_db will be download to bin folder + ## other than current directory + cp $motus_downloaddb_script ${software} + python ${software} \\ + $args \\ + -t $task.cpus + + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + END_VERSIONS + """ +} diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml new file mode 100644 index 00000000..64df5ee0 --- /dev/null +++ b/modules/motus/downloaddb/meta.yml @@ -0,0 +1,39 @@ +name: "motus_downloaddb" +description: Download the mOTUs database +keywords: + - classify + - metagenomics + - fastq + - taxonomic profiling + - database + - download +tools: + - "motus": + description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." + homepage: "None" + documentation: "https://github.com/motu-tool/mOTUs/wiki" + tool_dev_url: "https://github.com/motu-tool/mOTUs" + doi: "10.1038/s41467-019-08844-4" + licence: "['GPL v3']" + +input: + - motus_downloaddb: + type: directory + description: | + The mOTUs downloadDB script source file. + It is the source file installed or + remote source in github such as https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py + pattern: "downloadDB.py" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: directory + description: The mOTUs database directory + pattern: "db_mOTU" + +authors: + - "@jianhong" diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index f584cb65..d8f73342 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -22,11 +22,12 @@ process PHANTOMPEAKQUALTOOLS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ RUN_SPP=`which run_spp.R` - Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus + Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index 8e1d10af..fd102f67 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -38,12 +38,12 @@ process PICARD_ADDORREPLACEREADGROUPS { -Xmx${avail_mem}g \\ --INPUT ${bam} \\ --OUTPUT ${prefix}.bam \\ - -ID ${ID} \\ - -LB ${LIBRARY} \\ - -PL ${PLATFORM} \\ - -PU ${BARCODE} \\ - -SM ${SAMPLE} \\ - -CREATE_INDEX true + --RGID ${ID} \\ + --RGLB ${LIBRARY} \\ + --RGPL ${PLATFORM} \\ + --RGPU ${BARCODE} \\ + --RGSM ${SAMPLE} \\ + --CREATE_INDEX true cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf index fb435911..62989565 100644 --- a/modules/picard/cleansam/main.nf +++ b/modules/picard/cleansam/main.nf @@ -2,10 +2,10 @@ process PICARD_CLEANSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -31,8 +31,8 @@ process PICARD_CLEANSAM { -Xmx${avail_mem}g \\ CleanSam \\ ${args} \\ - -I ${bam} \\ - -O ${prefix}.bam + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 3acf8bb8..317aff4b 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -15,8 +15,8 @@ process PICARD_COLLECTHSMETRICS { path target_intervals output: - tuple val(meta), path("*collecthsmetrics.txt"), emit: hs_metrics - path "versions.yml" , emit: versions + tuple val(meta), path("*_metrics") , emit: metrics + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -38,10 +38,11 @@ process PICARD_COLLECTHSMETRICS { CollectHsMetrics \\ $args \\ $reference \\ - -BAIT_INTERVALS $bait_intervals \\ - -TARGET_INTERVALS $target_intervals \\ - -INPUT $bam \\ - -OUTPUT ${prefix}_collecthsmetrics.txt + --BAIT_INTERVALS $bait_intervals \\ + --TARGET_INTERVALS $target_intervals \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics + cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -52,7 +53,7 @@ process PICARD_COLLECTHSMETRICS { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}_collecthsmetrics.txt + touch ${prefix}.CollectHsMetrics.coverage_metrics cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/meta.yml b/modules/picard/collecthsmetrics/meta.yml index 4b94909f..dc9d647a 100644 --- a/modules/picard/collecthsmetrics/meta.yml +++ b/modules/picard/collecthsmetrics/meta.yml @@ -57,10 +57,11 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - hs_metrics: + - metrics: type: file - description: The metrics file. - pattern: "*_collecthsmetrics.txt" + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" authors: - "@projectoriented" + - "@matthdsm" diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 340463a8..a653b549 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -33,9 +33,9 @@ process PICARD_COLLECTMULTIPLEMETRICS { -Xmx${avail_mem}g \\ CollectMultipleMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectMultipleMetrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..e6dd49e9 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,13 +2,13 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) + tuple val(meta), path(bam) path fasta output: @@ -32,9 +32,10 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE $fasta + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 96069e9f..2348c496 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -2,10 +2,10 @@ process PICARD_CREATESEQUENCEDICTIONARY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(fasta) @@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - R=$fasta \\ - O=${prefix}.dict + --REFERENCE $fasta \\ + --OUTPUT ${prefix}.dict cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/crosscheckfingerprints/main.nf b/modules/picard/crosscheckfingerprints/main.nf index b3dface5..d3b59402 100644 --- a/modules/picard/crosscheckfingerprints/main.nf +++ b/modules/picard/crosscheckfingerprints/main.nf @@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input1) diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index ab75abfa..adedcdc2 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(readlist) diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf index 763f3bb4..539b1082 100644 --- a/modules/picard/fixmateinformation/main.nf +++ b/modules/picard/fixmateinformation/main.nf @@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -31,8 +31,8 @@ process PICARD_FIXMATEINFORMATION { picard \\ FixMateInformation \\ -Xmx${avail_mem}g \\ - -I ${bam} \\ - -O ${prefix}.bam \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam \\ --VALIDATION_STRINGENCY ${STRINGENCY} cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index cdbd637e..c92abfeb 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input_vcf) @@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF { -Xmx${avail_mem}g \\ LiftoverVcf \\ $args \\ - I=$input_vcf \\ - O=${prefix}.lifted.vcf.gz \\ - CHAIN=$chain \\ - REJECT=${prefix}.unlifted.vcf.gz \\ - R=$fasta + --INPUT $input_vcf \\ + --OUTPUT ${prefix}.lifted.vcf.gz \\ + --CHAIN $chain \\ + --REJECT ${prefix}.unlifted.vcf.gz \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index e754a587..1565c647 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) @@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - I=$bam \\ - O=${prefix}.bam \\ - M=${prefix}.MarkDuplicates.metrics.txt + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index ef5c3980..1e32c63a 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bams) @@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES { -Xmx${avail_mem}g \\ MergeSamFiles \\ $args \\ - ${'INPUT='+bam_files.join(' INPUT=')} \\ - OUTPUT=${prefix}.bam + ${'--INPUT '+bam_files.join(' --INPUT ')} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index adec17cb..cee60fd1 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTSAM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf index 4047545e..fb8dbb79 100644 --- a/modules/picard/sortvcf/main.nf +++ b/modules/picard/sortvcf/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTVCF { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(vcf) @@ -22,8 +22,8 @@ process PICARD_SORTVCF { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : "" - def reference = reference ? "-REFERENCE_SEQUENCE $reference" : "" + def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : "" + def reference = reference ? "--REFERENCE_SEQUENCE $reference" : "" def avail_mem = 3 if (!task.memory) { log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' diff --git a/modules/rsem/calculateexpression/main.nf b/modules/rsem/calculateexpression/main.nf index cf147a63..1ab3a635 100644 --- a/modules/rsem/calculateexpression/main.nf +++ b/modules/rsem/calculateexpression/main.nf @@ -2,10 +2,10 @@ process RSEM_CALCULATEEXPRESSION { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: tuple val(meta), path(reads) diff --git a/modules/rsem/preparereference/main.nf b/modules/rsem/preparereference/main.nf index 2d2ca205..da11be45 100644 --- a/modules/rsem/preparereference/main.nf +++ b/modules/rsem/preparereference/main.nf @@ -2,10 +2,10 @@ process RSEM_PREPAREREFERENCE { tag "$fasta" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: path fasta, stageAs: "rsem/*" diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 5d6aa79d..9301d1d3 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam >${prefix}_interleaved.fq.gz + $inputbam | gzip --no-name > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/bamtocram/main.nf b/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b49c308f --- /dev/null +++ b/modules/samtools/bamtocram/main.nf @@ -0,0 +1,35 @@ +//There is a -L option to only output alignments in interval, might be an option for exons/panel data? +process SAMTOOLS_BAMTOCRAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + 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' }" + + input: + tuple val(meta), path(input), path(index) + path fasta + path fai + + output: + tuple val(meta), path("*.cram"), path("*.crai"), emit: cram_crai + 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}" + """ + samtools view --threads ${task.cpus} --reference ${fasta} -C $args $input > ${prefix}.cram + samtools index -@${task.cpus} ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/bamtocram/meta.yml b/modules/samtools/bamtocram/meta.yml new file mode 100644 index 00000000..037704c6 --- /dev/null +++ b/modules/samtools/bamtocram/meta.yml @@ -0,0 +1,52 @@ +name: samtools_bamtocram +description: filter/convert and then index CRAM file +keywords: + - view + - index + - bam + - cram +tools: + - 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 ] + - input: + type: file + description: BAM/SAM file + pattern: "*.{bam,sam}" + - index: + type: file + description: BAM/SAM index file + pattern: "*.{bai,sai}" + - fasta: + type: file + description: Reference file to create the CRAM file + pattern: "*.{fasta,fa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - cram_crai: + type: file + description: filtered/converted CRAM file + index + pattern: "*{.cram,.crai}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/modules/samtools/collatefastq/main.nf b/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..3d9becda --- /dev/null +++ b/modules/samtools/collatefastq/main.nf @@ -0,0 +1,47 @@ +process SAMTOOLS_COLLATEFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + 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' }" + + input: + tuple val(meta), path(input) + + output: + //TODO might be good to have ordered output of the fastq files, so we can + // make sure the we get the right files + tuple val(meta), path("*_{1,2}.fq.gz"), path("*_other.fq.gz"), path("*_singleton.fq.gz"), emit: reads + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + samtools collate \\ + $args \\ + --threads $task.cpus \\ + -O \\ + $input \\ + . | + + samtools fastq \\ + $args2 \\ + --threads $task.cpus \\ + -1 ${prefix}_1.fq.gz \\ + -2 ${prefix}_2.fq.gz \\ + -0 ${prefix}_other.fq.gz \\ + -s ${prefix}_singleton.fq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/collatefastq/meta.yml b/modules/samtools/collatefastq/meta.yml new file mode 100644 index 00000000..d3a2e3af --- /dev/null +++ b/modules/samtools/collatefastq/meta.yml @@ -0,0 +1,48 @@ +name: samtools_collatefastq +description: | + The module uses collate and then fastq methods from samtools to + convert a SAM, BAM or CRAM file to FASTQ format +keywords: + - bam2fq + - samtools + - fastq +tools: + - samtools: + description: Tools for dealing with SAM, BAM and CRAM files + homepage: None + documentation: http://www.htslib.org/doc/1.1/samtools.html + tool_dev_url: None + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + FASTQ files, which will be either a group of 4 files (read_1, read_2, other and singleton) + or a single interleaved .fq.gz file if the user chooses not to split the reads. + pattern: "*.fq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@lescai" + - "@maxulysse" diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 5f14fbbf..55194e88 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -8,7 +8,7 @@ process SAMTOOLS_VIEW { 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input), path(index) path fasta output: @@ -41,4 +41,16 @@ process SAMTOOLS_VIEW { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/view/meta.yml b/modules/samtools/view/meta.yml index 5604bfa7..a8b43ecc 100644 --- a/modules/samtools/view/meta.yml +++ b/modules/samtools/view/meta.yml @@ -25,6 +25,10 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + - index: + type: optional file + description: BAM.BAI/CRAM.CRAI file + pattern: "*.{.bai,.crai}" - fasta: type: optional file description: Reference file the CRAM was created with diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf new file mode 100644 index 00000000..0e288435 --- /dev/null +++ b/modules/shasum/main.nf @@ -0,0 +1,35 @@ +process SHASUM { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.sha256"), emit: checksum + 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}" + + """ + sha256sum \\ + $args \\ + ${file} \\ + > ${file}.sha256 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sha256sum: \$(echo \$(sha256sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/shasum/meta.yml b/modules/shasum/meta.yml new file mode 100644 index 00000000..f16e0771 --- /dev/null +++ b/modules/shasum/meta.yml @@ -0,0 +1,40 @@ +name: "shasum" +description: Print SHA256 (256-bit) checksums. +keywords: + - checksum + - sha256 +tools: + - "md5sum": + description: Create an SHA256 (256-bit) checksum. + homepage: "https://www.gnu.org" + documentation: "https://linux.die.net/man/1/shasum" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + pattern: "*.*" + +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" + - checksum: + type: file + description: File containing checksum + pattern: "*.sha256" + +authors: + - "@matthdsm" diff --git a/modules/shigatyper/main.nf b/modules/shigatyper/main.nf new file mode 100644 index 00000000..9d5c189a --- /dev/null +++ b/modules/shigatyper/main.nf @@ -0,0 +1,64 @@ +process SHIGATYPER { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::shigatyper=2.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/shigatyper%3A2.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/shigatyper:2.0.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}-hits.tsv"), optional: true, emit: hits + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + if (meta.is_ont) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --ont \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else if (meta.single_end) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else { + """ + shigatyper \\ + $args \\ + --R1 ${reads[0]} \\ + --R2 ${reads[1]} \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } +} diff --git a/modules/shigatyper/meta.yml b/modules/shigatyper/meta.yml new file mode 100644 index 00000000..ebaded6b --- /dev/null +++ b/modules/shigatyper/meta.yml @@ -0,0 +1,47 @@ +name: "shigatyper" +description: Determine Shigella serotype from Illumina or Oxford Nanopore reads +keywords: + - fastq + - shigella + - serotype +tools: + - "shigatyper": + description: "Typing tool for Shigella spp. from WGS Illumina sequencing" + homepage: "https://github.com/CFSAN-Biostatistics/shigatyper" + documentation: "https://github.com/CFSAN-Biostatistics/shigatyper" + tool_dev_url: "https://github.com/CFSAN-Biostatistics/shigatyper" + doi: "10.1128/AEM.00165-19" + licence: "['Public Domain']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false, is_ont:false ] + - reads: + type: file + description: Illumina or Nanopore FASTQ file + pattern: "*.fastq.gz" + +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" + - tsv: + type: file + description: A TSV formatted file with ShigaTyper results + pattern: "*.tsv" + - hits: + type: file + description: A TSV formatted file with individual gene hits + pattern: "*-hits.tsv" + +authors: + - "@rpetit3" diff --git a/modules/slimfastq/main.nf b/modules/slimfastq/main.nf new file mode 100644 index 00000000..19ca876f --- /dev/null +++ b/modules/slimfastq/main.nf @@ -0,0 +1,52 @@ +def VERSION = '2.04' + +process SLIMFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::slimfastq=2.04" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/slimfastq:2.04--h87f3376_2': + 'quay.io/biocontainers/slimfastq:2.04--h87f3376_2' }" + + input: + tuple val(meta), path(fastq) + + output: + tuple val(meta), path("*.sfq"), emit: sfq + 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 (meta.single_end) { + """ + gzip -d -c '${fastq}' | slimfastq \\ + $args \\ + -f '${prefix}.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } else { + """ + gzip -d -c '${fastq[0]}' | slimfastq \\ + $args \\ + -f '${prefix}_1.sfq' + + gzip -d -c '${fastq[1]}' | slimfastq \\ + $args \\ + -f '${prefix}_2.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } +} diff --git a/modules/slimfastq/meta.yml b/modules/slimfastq/meta.yml new file mode 100644 index 00000000..3b040f25 --- /dev/null +++ b/modules/slimfastq/meta.yml @@ -0,0 +1,41 @@ +name: "slimfastq" +description: Fast, efficient, lossless compression of FASTQ files. +keywords: + - FASTQ + - compression + - lossless +tools: + - "slimfastq": + description: "slimfastq efficiently compresses/decompresses FASTQ files" + homepage: "https://github.com/Infinidat/slimfastq" + tool_dev_url: "https://github.com/Infinidat/slimfastq" + licence: "['BSD-3-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: Either a single-end FASTQ file or paired-end files. + pattern: "*.{fq.gz,fastq.gz}" + +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" + - sfq: + type: file + description: Either one or two sequence files in slimfastq compressed format. + pattern: "*.{sfq}" + +authors: + - "@Midnighter" diff --git a/modules/snapaligner/single/main.nf b/modules/snapaligner/align/main.nf similarity index 87% rename from modules/snapaligner/single/main.nf rename to modules/snapaligner/align/main.nf index b13e1153..ef7af561 100644 --- a/modules/snapaligner/single/main.nf +++ b/modules/snapaligner/align/main.nf @@ -1,4 +1,4 @@ -process SNAPALIGNER_SINGLE { +process SNAPALIGNER_ALIGN { tag '$meta.id' label 'process_high' @@ -21,15 +21,16 @@ process SNAPALIGNER_SINGLE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def subcmd = meta.single_end ? "single" : "paired" """ mkdir -p index mv $index index/ - snap-aligner single \\ + snap-aligner ${subcmd} \\ index \\ ${reads.join(" ")} \\ - -o -bam ${prefix}.bam \\ + -o ${prefix}.bam \\ -t ${task.cpus} \\ $args diff --git a/modules/snapaligner/paired/meta.yml b/modules/snapaligner/align/meta.yml similarity index 86% rename from modules/snapaligner/paired/meta.yml rename to modules/snapaligner/align/meta.yml index b19e0174..611b0b71 100644 --- a/modules/snapaligner/paired/meta.yml +++ b/modules/snapaligner/align/meta.yml @@ -1,5 +1,5 @@ -name: "snapaligner_paired" -description: Performs paired end fastq alignment to a fasta reference using SNAP +name: "snapaligner_align" +description: Performs fastq alignment to a fasta reference using SNAP keywords: - alignment - map @@ -22,7 +22,7 @@ input: e.g. [ id:'test', single_end:false ] - reads: type: file - description: List of input fastq files of size 2 for fastq or 1 for bam + description: List of input fastq files of size 2 for paired fastq or 1 for bam or single fastq pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" - index: type: file diff --git a/modules/snapaligner/paired/main.nf b/modules/snapaligner/paired/main.nf deleted file mode 100644 index 57044893..00000000 --- a/modules/snapaligner/paired/main.nf +++ /dev/null @@ -1,41 +0,0 @@ -process SNAPALIGNER_PAIRED { - tag '$meta.id' - label 'process_high' - - conda (params.enable_conda ? "bioconda::snap-aligner=2.0.1" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.1--hd03093a_1': - 'quay.io/biocontainers/snap-aligner:2.0.1--hd03093a_1' }" - - input: - tuple val(meta), path(reads) - path index - - output: - tuple val(meta), path("*.bam"), emit: 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}" - - """ - mkdir -p index - mv $index index/ - - snap-aligner paired \\ - index \\ - ${reads.join(" ")} \\ - -o -bam ${prefix}.bam \\ - -t ${task.cpus} \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - snapaligner: \$(snap-aligner 2>&1| head -n 1 | sed 's/^.*version //;s/.\$//') - END_VERSIONS - """ -} diff --git a/modules/snapaligner/single/meta.yml b/modules/snapaligner/single/meta.yml deleted file mode 100644 index e69cc721..00000000 --- a/modules/snapaligner/single/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "snapaligner_single" -description: Performs single end fastq alignment to a fasta reference using SNAP -keywords: - - alignment - - map - - fastq - - bam - - sam -tools: - - "snapaligner": - description: "Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data" - homepage: "http://snap.cs.berkeley.edu" - documentation: "https://1drv.ms/b/s!AhuEg_0yZD86hcpblUt-muHKYsG8fA?e=R8ogug" - tool_dev_url: "https://github.com/amplab/snap" - doi: "10.1101/2021.11.23.469039" - licence: "['Apache v2']" -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: List of single end input files - pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" - - index: - type: file - description: List of SNAP genome index files - pattern: "{Genome,GenomeIndex,GenomeIndexHash,OverflowTable}" - -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" - - bam: - type: file - description: Aligned BAM file - pattern: "*.{bam}" - -authors: - - "@matthdsm" diff --git a/modules/snpeff/Dockerfile b/modules/snpeff/Dockerfile index 608716a4..d0e34757 100644 --- a/modules/snpeff/Dockerfile +++ b/modules/snpeff/Dockerfile @@ -8,15 +8,16 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-snpeff-5.0/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SNPEFF_CACHE_VERSION=99 +ARG SNPEFF_TAG=99 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-snpeff-${SNPEFF_TAG}/bin:$PATH # Download Genome RUN snpEff download -v ${GENOME}.${SNPEFF_CACHE_VERSION} # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-snpeff-5.0 > nf-core-snpeff-5.0.yml +RUN conda env export --name nf-core-snpeff-${SNPEFF_TAG} > nf-core-snpeff-${SNPEFF_TAG}.yml diff --git a/modules/snpeff/build.sh b/modules/snpeff/build.sh old mode 100755 new mode 100644 index b94ffd69..2fccf9a8 --- a/modules/snpeff/build.sh +++ b/modules/snpeff/build.sh @@ -9,10 +9,11 @@ build_push() { SNPEFF_TAG=$3 docker build \ + . \ -t nfcore/snpeff:${SNPEFF_TAG}.${GENOME} \ - software/snpeff/. \ --build-arg GENOME=${GENOME} \ - --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} + --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} \ + --build-arg SNPEFF_TAG=${SNPEFF_TAG} docker push nfcore/snpeff:${SNPEFF_TAG}.${GENOME} } diff --git a/modules/snpeff/meta.yml b/modules/snpeff/meta.yml index c191b9ac..2f0d866e 100644 --- a/modules/snpeff/meta.yml +++ b/modules/snpeff/meta.yml @@ -10,18 +10,6 @@ tools: homepage: https://pcingola.github.io/SnpEff/ documentation: https://pcingola.github.io/SnpEff/se_introduction/ licence: ["MIT"] -params: - - use_cache: - type: boolean - description: | - boolean to enable the usage of containers with cache - Enable the usage of containers with cache - Does not work with conda - - snpeff_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/snpeff/tags input: - meta: type: map diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 2233d0aa..3408c3e9 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -1,43 +1,26 @@ process SRATOOLS_PREFETCH { tag "$id" label 'process_low' - label 'error_retry' conda (params.enable_conda ? 'bioconda::sra-tools=2.11.0' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5262h314213e_0' : - 'quay.io/biocontainers/sra-tools:2.11.0--pl5262h314213e_0' }" + 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5321ha49a11a_3' : + 'quay.io/biocontainers/sra-tools:2.11.0--pl5321ha49a11a_3' }" input: tuple val(meta), val(id) output: - tuple val(meta), path("$id"), emit: sra + tuple val(meta), path(id), emit: sra path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when - script: - def args = task.ext.args ?: '' - def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" - """ - eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" - if [[ ! -f "\${NCBI_SETTINGS}" ]]; then - mkdir -p "\$(dirname "\${NCBI_SETTINGS}")" - printf '${config}' > "\${NCBI_SETTINGS}" - fi + shell: + args = task.ext.args ?: '' + args2 = task.ext.args2 ?: '5 1 100' // + config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" - prefetch \\ - $args \\ - --progress \\ - $id - - vdb-validate $id - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sratools: \$(prefetch --version 2>&1 | grep -Eo '[0-9.]+') - END_VERSIONS - """ + template 'retry_with_backoff.sh' } diff --git a/modules/sratools/prefetch/templates/retry_with_backoff.sh b/modules/sratools/prefetch/templates/retry_with_backoff.sh new file mode 100755 index 00000000..fbcb6532 --- /dev/null +++ b/modules/sratools/prefetch/templates/retry_with_backoff.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +set -u + +retry_with_backoff() { + local max_attempts=${1} + local delay=${2} + local max_time=${3} + local attempt=1 + local output= + local status= + + # Remove the first three arguments to this function in order to access + # the 'real' command with `${@}`. + shift 3 + + while [ ${attempt} -le ${max_attempts} ]; do + output=$("${@}") + status=${?} + + if [ ${status} -eq 0 ]; then + break + fi + + if [ ${attempt} -lt ${max_attempts} ]; then + echo "Failed attempt ${attempt} of ${max_attempts}. Retrying in ${delay} s." >&2 + sleep ${delay} + elif [ ${attempt} -eq ${max_attempts} ]; then + echo "Failed after ${attempt} attempts." >&2 + return ${status} + fi + + attempt=$(( ${attempt} + 1 )) + delay=$(( ${delay} * 2 )) + if [ ${delay} -ge ${max_time} ]; then + delay=${max_time} + fi + done + + echo "${output}" +} + +eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" +if [[ ! -f "${NCBI_SETTINGS}" ]]; then + mkdir -p "$(dirname "${NCBI_SETTINGS}")" + printf '!{config}' > "${NCBI_SETTINGS}" +fi + +retry_with_backoff !{args2} \ + prefetch \ + !{args} \ + !{id} + +vdb-validate !{id} + +cat <<-END_VERSIONS > versions.yml +"!{task.process}": + sratools: $(prefetch --version 2>&1 | grep -Eo '[0-9.]+') +END_VERSIONS diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..e8a91716 --- /dev/null +++ b/modules/srst2/srst2/main.nf @@ -0,0 +1,47 @@ +process SRST2_SRST2 { + tag "${meta.id}" + label 'process_low' + + conda (params.enable_conda ? "bioconda::srst2=0.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/srst2%3A0.2.0--py27_2': + 'quay.io/biocontainers/srst2:0.2.0--py27_2'}" + + input: + tuple val(meta), path(fastq_s), path(db) + + output: + tuple val(meta), path("*_genes_*_results.txt") , optional:true, emit: gene_results + tuple val(meta), path("*_fullgenes_*_results.txt") , optional:true, emit: fullgene_results + tuple val(meta), path("*_mlst_*_results.txt") , optional:true, emit: mlst_results + tuple val(meta), path("*.pileup") , emit: pileup + tuple val(meta), path("*.sorted.bam") , emit: sorted_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}" + def read_s = meta.single_end ? "--input_se ${fastq_s}" : "--input_pe ${fastq_s[0]} ${fastq_s[1]}" + if (meta.db=="gene") { + database = "--gene_db ${db}" + } else if (meta.db=="mlst") { + database = "--mlst_db ${db}" + } else { + error "Please set meta.db to either \"gene\" or \"mlst\"" + } + """ + srst2 \\ + ${read_s} \\ + --threads $task.cpus \\ + --output ${prefix} \\ + ${database} \\ + $args + cat <<-END_VERSIONS > versions.yml + "${task.process}": + srst2: \$(echo \$(srst2 --version 2>&1) | sed 's/srst2 //' )) + END_VERSIONS + """ +} diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml new file mode 100644 index 00000000..94c763bb --- /dev/null +++ b/modules/srst2/srst2/meta.yml @@ -0,0 +1,72 @@ +name: srst2_srst2 +description: | + Short Read Sequence Typing for Bacterial Pathogens is a program designed to take Illumina sequence data, + a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) + and report the presence of STs and/or reference genes. +keywords: + - mlst + - typing + - illumina +tools: + - srst2: + description: "Short Read Sequence Typing for Bacterial Pathogens" + homepage: "http://katholt.github.io/srst2/" + documentation: "https://github.com/katholt/srst2/blob/master/README.md" + tool_dev_url: "https://github.com/katholt/srst2" + doi: "10.1186/s13073-014-0090-6" + licence: ["BSD"] + +input: + - meta: + type: map0.2.0-4 + description: | + Groovy Map containing sample information + id: should be the identification number or sample name + single_end: should be true for single end data and false for paired in data + db: should be either 'gene' to use the --gene_db option or "mlst" to use the --mlst_db option + e.g. [ id:'sample', single_end:false , db:'gene'] + - fasta: + type: file + description: | + gzipped fasta file. If files are NOT in + MiSeq format sample_S1_L001_R1_001.fastq.gz uses --forward and --reverse parameters; otherwise + default is _1, i.e. expect forward reads as sample_1.fastq.gz). + pattern: "*.fastq.gz" + - db: + type: file + description: Database in FASTA format + pattern: "*.fasta" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - txt: + type: file + description: A detailed report, with one row per gene per sample described here github.com/katholt/srst2#gene-typing + pattern: "*_fullgenes_*_results.txt" + - txt: + type: file + description: A tabulated summary report of samples x genes. + pattern: "*_genes_*_results.txt" + - txt: + type: file + description: A tabulated summary report of mlst subtyping. + pattern: "*_mlst_*_results.txt" + - bam: + type: file + description: Sorted BAM file + pattern: "*.sorted.bam" + - pileup: + type: file + description: SAMtools pileup file + pattern: "*.pileup" + +authors: + - "@jvhagey" diff --git a/modules/stranger/main.nf b/modules/stranger/main.nf index 2e647627..ddfa0070 100644 --- a/modules/stranger/main.nf +++ b/modules/stranger/main.nf @@ -9,6 +9,7 @@ process STRANGER { input: tuple val(meta), path(vcf) + path variant_catalog output: tuple val(meta), path("*.gz"), emit: vcf @@ -20,10 +21,23 @@ process STRANGER { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def options_variant_catalog = variant_catalog ? "--repeats-file $variant_catalog" : "" """ stranger \\ $args \\ - $vcf | gzip --no-name > ${prefix}.vcf.gz + $vcf \\ + $options_variant_catalog | gzip --no-name > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stranger: \$( stranger --version ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/stranger/meta.yml b/modules/stranger/meta.yml index 61ebc7a9..0707d806 100644 --- a/modules/stranger/meta.yml +++ b/modules/stranger/meta.yml @@ -24,6 +24,10 @@ input: type: file description: VCF with repeat expansions pattern: "*.{vcf.gz,vcf}" + - variant_catalog: + type: file + description: json file with repeat expansion sites to genotype + pattern: "*.{json}" output: - meta: diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index aa11eb36..c8460c94 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -2,10 +2,10 @@ process STRINGTIE_MERGE { label 'process_medium' // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: path stringtie_gtf diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index f37e347a..c70c9819 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -1,11 +1,11 @@ -process STRINGTIE { +process STRINGTIE_STRINGTIE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) diff --git a/modules/stringtie/stringtie/meta.yml b/modules/stringtie/stringtie/meta.yml index a462c574..0dda84d0 100644 --- a/modules/stringtie/stringtie/meta.yml +++ b/modules/stringtie/stringtie/meta.yml @@ -1,4 +1,4 @@ -name: stringtie +name: stringtie_stringtie description: Transcript assembly and quantification for RNA-Se keywords: - transcript diff --git a/modules/svdb/merge/main.nf b/modules/svdb/merge/main.nf index 4a39940c..0d56fea2 100644 --- a/modules/svdb/merge/main.nf +++ b/modules/svdb/merge/main.nf @@ -2,10 +2,10 @@ process SVDB_MERGE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcfs) diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf index c669b5a5..dbab5259 100644 --- a/modules/svdb/query/main.nf +++ b/modules/svdb/query/main.nf @@ -2,10 +2,10 @@ process SVDB_QUERY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcf) diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index 90940a5d..18e83c84 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -11,17 +11,20 @@ process TABIX_BGZIP { tuple val(meta), path(input) output: - tuple val(meta), path("*.gz"), emit: gz - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}*"), emit: output + 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}" + prefix = task.ext.prefix ?: "${meta.id}" + in_bgzip = input.toString().endsWith(".gz") + command1 = in_bgzip ? '-d' : '-c' + command2 = in_bgzip ? '' : " > ${prefix}.${input.getExtension()}.gz" """ - bgzip -c $args $input > ${prefix}.${input.getExtension()}.gz + bgzip $command1 $args -@${task.cpus} $input $command2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/tabix/bgzip/meta.yml b/modules/tabix/bgzip/meta.yml index 207427e4..50070175 100644 --- a/modules/tabix/bgzip/meta.yml +++ b/modules/tabix/bgzip/meta.yml @@ -1,13 +1,14 @@ name: tabix_bgzip -description: Compresses files +description: Compresses/decompresses files keywords: - compress + - decompress - bgzip - tabix tools: - bgzip: description: | - Bgzip compresses files in a similar manner to, and compatible with, gzip. + Bgzip compresses or decompresses files in a similar manner to, and compatible with, gzip. homepage: https://www.htslib.org/doc/tabix.html documentation: http://www.htslib.org/doc/bgzip.html doi: 10.1093/bioinformatics/btp352 @@ -18,19 +19,19 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - file: + - input: type: file - description: text file + description: file to compress or to decompress output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - file: + - output: type: file - description: Output compressed file - pattern: "*.{gz}" + description: Output compressed/decompressed file + pattern: "*." - versions: type: file description: File containing software versions diff --git a/modules/tabix/tabix/main.nf b/modules/tabix/tabix/main.nf index c9dab068..e155e468 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -11,7 +11,8 @@ process TABIX_TABIX { tuple val(meta), path(tab) output: - tuple val(meta), path("*.tbi"), emit: tbi + tuple val(meta), path("*.tbi"), optional:true, emit: tbi + tuple val(meta), path("*.csi"), optional:true, emit: csi path "versions.yml" , emit: versions when: diff --git a/modules/tabix/tabix/meta.yml b/modules/tabix/tabix/meta.yml index 89478abe..fcc6e524 100644 --- a/modules/tabix/tabix/meta.yml +++ b/modules/tabix/tabix/meta.yml @@ -31,6 +31,10 @@ output: type: file description: tabix index file pattern: "*.{tbi}" + - csi: + type: file + description: coordinate sorted index file + pattern: "*.{csi}" - versions: type: file description: File containing software versions diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 1bf7146a..b3e3813c 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -24,7 +24,7 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" + def reference = fasta ? "--ref $fasta" : "" """ tiddit \\ --sv \\ diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index 9487c799..3a3fca90 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -11,12 +11,13 @@ process TRIMGALORE { tuple val(meta), path(reads) output: - tuple val(meta), path("*.fq.gz") , emit: reads - tuple val(meta), path("*report.txt"), emit: log - path "versions.yml" , emit: versions + 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("*.html"), emit: html optional true - tuple val(meta), path("*.zip") , emit: zip 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 when: task.ext.when == null || task.ext.when @@ -52,6 +53,7 @@ process TRIMGALORE { $c_r1 \\ $tpc_r1 \\ ${prefix}.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') @@ -73,6 +75,7 @@ process TRIMGALORE { $tpc_r2 \\ ${prefix}_1.fastq.gz \\ ${prefix}_2.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') diff --git a/modules/trimgalore/meta.yml b/modules/trimgalore/meta.yml index e99a8833..439f566d 100644 --- a/modules/trimgalore/meta.yml +++ b/modules/trimgalore/meta.yml @@ -37,6 +37,11 @@ output: List of input adapter trimmed FastQ files of size 1 and 2 for single-end and paired-end data, respectively. pattern: "*.{fq.gz}" + - unpaired: + type: file + description: | + FastQ files containing unpaired reads from read 1 or read 2 + pattern: "*unpaired*.fq.gz" - html: type: file description: FastQC report (optional) diff --git a/modules/untar/main.nf b/modules/untar/main.nf index bbfa0bfe..058d1764 100644 --- a/modules/untar/main.nf +++ b/modules/untar/main.nf @@ -2,10 +2,10 @@ process UNTAR { tag "$archive" label 'process_low' - conda (params.enable_conda ? "conda-forge::tar=1.34" : null) + conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv2/biocontainers_v1.2.0_cv2.img' : - 'biocontainers/biocontainers:v1.2.0_cv2' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf new file mode 100644 index 00000000..c99301bb --- /dev/null +++ b/modules/vardictjava/main.nf @@ -0,0 +1,49 @@ +def VERSION = '1.8.3' + +process VARDICTJAVA { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': + 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" + + input: + tuple val(meta), path(bam), path(bai), path(bed) + tuple path(fasta), path(fasta_fai) + + 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}" + + """ + vardict-java \\ + $args \\ + -c 1 -S 2 -E 3 \\ + -b $bam \\ + -th $task.cpus \\ + -N $prefix \\ + -G $fasta \\ + $bed \\ + | teststrandbias.R \\ + | var2vcf_valid.pl \\ + $args2 \\ + -N $prefix \\ + | gzip -c > ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vardict-java: $VERSION + var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) + END_VERSIONS + """ +} diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml new file mode 100644 index 00000000..59fba966 --- /dev/null +++ b/modules/vardictjava/meta.yml @@ -0,0 +1,60 @@ +name: "vardictjava" + +description: The Java port of the VarDict variant caller +keywords: + - variant calling + - VarDict + - AstraZeneca +tools: + - "vardictjava": + description: "Java port of the VarDict variant discovery program" + homepage: "https://github.com/AstraZeneca-NGS/VarDictJava" + documentation: "https://github.com/AstraZeneca-NGS/VarDictJava" + tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava" + doi: "10.1093/nar/gkw227 " + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/SAM file + pattern: "*.{bam,sam}" + - bai: + type: file + description: Index of the BAM file + pattern: "*.bai" + - fasta: + type: file + description: FASTA of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the FASTA of the reference genome + pattern: "*.fai" + - bed: + type: file + description: BED with the regions of interest + pattern: "*.bed" + +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 output + pattern: "*.vcf.gz" + +authors: + - "@nvnieuwk" diff --git a/subworkflows/nf-core/annotation/ensemblvep/main.nf b/subworkflows/nf-core/annotation/ensemblvep/main.nf new file mode 100644 index 00000000..5073f38d --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -0,0 +1,31 @@ +// +// Run VEP to annotate VCF files +// + +include { ENSEMBLVEP } from '../../../../modules/ensemblvep/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_ENSEMBLVEP { + take: + vcf // channel: [ val(meta), vcf ] + vep_genome // value: genome to use + vep_species // value: species to use + vep_cache_version // value: cache version to use + vep_cache // path: /path/to/vep/cache (optionnal) + vep_extra_files // channel: [ file1, file2...] (optionnal) + + main: + ch_versions = Channel.empty() + + ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, vep_extra_files) + TABIX_BGZIPTABIX(ENSEMBLVEP.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(ENSEMBLVEP.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = ENSEMBLVEP.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation/ensemblvep/meta.yml b/subworkflows/nf-core/annotation/ensemblvep/meta.yml new file mode 100644 index 00000000..585e003b --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/meta.yml @@ -0,0 +1,49 @@ +name: annotation_ensemblvep +description: | + Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file +keywords: + - ensemblvep +modules: + - ensemblvep + - tabix/bgziptabix +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - genome: + type: value + description: | + which genome to annotate with + - species: + type: value + description: | + which species to annotate with + - cache_version: + type: value + description: | + which version of the cache to annotate with + - cache: + type: file + description: | + path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf_tbi: + type: file + description: Compressed vcf file + tabix index + pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" +authors: + - "@maxulysse" diff --git a/subworkflows/nf-core/annotation/snpeff/main.nf b/subworkflows/nf-core/annotation/snpeff/main.nf new file mode 100644 index 00000000..dcf06eb0 --- /dev/null +++ b/subworkflows/nf-core/annotation/snpeff/main.nf @@ -0,0 +1,28 @@ +// +// Run SNPEFF to annotate VCF files +// + +include { SNPEFF } from '../../../../modules/snpeff/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_SNPEFF { + take: + vcf // channel: [ val(meta), vcf ] + snpeff_db // value: db version to use + snpeff_cache // path: /path/to/snpeff/cache (optionnal) + + main: + ch_versions = Channel.empty() + + SNPEFF(vcf, snpeff_db, snpeff_cache) + TABIX_BGZIPTABIX(SNPEFF.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(SNPEFF.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = SNPEFF.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation_snpeff/meta.yml b/subworkflows/nf-core/annotation/snpeff/meta.yml similarity index 66% rename from subworkflows/nf-core/annotation_snpeff/meta.yml rename to subworkflows/nf-core/annotation/snpeff/meta.yml index e0773626..241a00cc 100644 --- a/subworkflows/nf-core/annotation_snpeff/meta.yml +++ b/subworkflows/nf-core/annotation/snpeff/meta.yml @@ -11,11 +11,19 @@ input: type: map description: | Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - db: + type: value + description: | + which db to annotate with + - cache: + type: file + description: | + path to snpEff cache (optional) output: - versions: type: file diff --git a/subworkflows/nf-core/annotation_ensemblvep/main.nf b/subworkflows/nf-core/annotation_ensemblvep/main.nf deleted file mode 100644 index 3f3ecc6e..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ /dev/null @@ -1,26 +0,0 @@ -// -// Run VEP to annotate VCF files -// - -include { ENSEMBLVEP } from '../../../modules/ensemblvep/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_ENSEMBLVEP { - take: - vcf // channel: [ val(meta), vcf ] - vep_genome // value: which genome - vep_species // value: which species - vep_cache_version // value: which cache version - vep_cache // path: path_to_vep_cache (optionnal) - - main: - ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache) - ANNOTATION_BGZIPTABIX(ENSEMBLVEP.out.vcf) - - ch_versions = ENSEMBLVEP.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = ENSEMBLVEP.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/annotation_ensemblvep/meta.yml b/subworkflows/nf-core/annotation_ensemblvep/meta.yml deleted file mode 100644 index 991a8b2f..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/meta.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: annotation_ensemblvep -description: | - Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file -keywords: - - ensemblvep -modules: - - ensemblvep - - tabix/bgziptabix -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - vcf_tbi: - type: file - description: Compressed vcf file + tabix index - pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" -authors: - - "@maxulysse" diff --git a/subworkflows/nf-core/annotation_snpeff/main.nf b/subworkflows/nf-core/annotation_snpeff/main.nf deleted file mode 100644 index add5f9c8..00000000 --- a/subworkflows/nf-core/annotation_snpeff/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -// -// Run SNPEFF to annotate VCF files -// - -include { SNPEFF } from '../../../modules/snpeff/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_SNPEFF { - take: - vcf // channel: [ val(meta), vcf ] - snpeff_db // value: version of db to use - snpeff_cache // path: path_to_snpeff_cache (optionnal) - - main: - SNPEFF(vcf, snpeff_db, snpeff_cache) - ANNOTATION_BGZIPTABIX(SNPEFF.out.vcf) - ch_versions = SNPEFF.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = SNPEFF.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..e38697c3 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,41 @@ +// +// Run QC steps on BAM/CRAM files using Picard +// + +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picard/collectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picard/collectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecthsmetrics/main' + +workflow BAM_QC_PICARD { + take: + ch_bam // channel: [ val(meta), [ bam ]] + ch_fasta // channel: [ fasta ] + ch_fasta_fai // channel: [ fasta_fai ] + ch_bait_interval // channel: [ bait_interval ] + ch_target_interval // channel: [ target_interval ] + + main: + ch_versions = Channel.empty() + ch_coverage_metrics = Channel.empty() + + PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + + if (ch_bait_interval || ch_target_interval) { + if (!ch_bait_interval) log.error("Bait interval channel is empty") + if (!ch_target_interval) log.error("Target interval channel is empty") + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + } else { + PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) + } + + emit: + coverage_metrics = ch_coverage_metrics // channel: [ val(meta), [ coverage_metrics ] ] + multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml new file mode 100644 index 00000000..c45215d1 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -0,0 +1,60 @@ +name: bam_qc +description: Produces comprehensive statistics from BAM file +keywords: + - statistics + - counts + - hs_metrics + - wgs_metrics + - bam + - sam + - cram +modules: + - picard/collectmultiplemetrics + - picard/collectwgsmetrics + - picard/collecthsmetrics +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: optional file + description: Reference fasta file + pattern: "*.{fasta,fa}" + - fasta_fai: + type: optional file + description: Reference fasta file index + pattern: "*.{fasta,fa}.fai" + - bait_intervals: + type: optional file + description: An interval list file that contains the locations of the baits used. + pattern: "baits.interval_list" + - target_intervals: + type: optional file + description: An interval list file that contains the locations of the targets. + pattern: "targets.interval_list" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - coverage_metrics: + type: file + description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics + pattern: "*_metrics.txt" + - multiple_metrics: + type: file + description: Alignment metrics files generated by picard CollectMultipleMetrics + pattern: "*_{metrics}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..ec7fc321 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -26,6 +26,10 @@ allelecounter: - modules/allelecounter/** - tests/modules/allelecounter/** +amplify/predict: + - modules/amplify/predict/** + - tests/modules/amplify/predict/** + amps: - modules/amps/** - tests/modules/amps/** @@ -38,6 +42,10 @@ amrfinderplus/update: - modules/amrfinderplus/update/** - tests/modules/amrfinderplus/update/** +antismash/antismashlitedownloaddatabases: + - modules/antismash/antismashlitedownloaddatabases/** + - tests/modules/antismash/antismashlitedownloaddatabases/** + arriba: - modules/arriba/** - tests/modules/arriba/** @@ -166,6 +174,10 @@ bcftools/view: - modules/bcftools/view/** - tests/modules/bcftools/view/** +bclconvert: + - modules/bclconvert/** + - tests/modules/bclconvert/** + bedtools/bamtobed: - modules/bedtools/bamtobed/** - tests/modules/bedtools/bamtobed/** @@ -325,6 +337,10 @@ bracken/bracken: - modules/bracken/bracken/** - tests/modules/bracken/bracken/** +busco: + - modules/busco/** + - tests/modules/busco/** + bwa/aln: - modules/bwa/aln/** - tests/modules/bwa/aln/** @@ -587,6 +603,18 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/filter: + - modules/elprep/filter/** + - tests/modules/elprep/filter/** + +elprep/merge: + - modules/elprep/merge/** + - tests/modules/elprep/merge/** + +elprep/split: + - modules/elprep/split/** + - tests/modules/elprep/split/** + emmtyper: - modules/emmtyper/** - tests/modules/emmtyper/** @@ -655,10 +683,18 @@ freebayes: - modules/freebayes/** - tests/modules/freebayes/** +gamma: + - modules/gamma/** + - tests/modules/gamma/** + gatk4/applybqsr: - modules/gatk4/applybqsr/** - tests/modules/gatk4/applybqsr/** +gatk4/applybqsrspark: + - modules/gatk4/applybqsrspark/** + - tests/modules/gatk4/applybqsrspark/** + gatk4/applyvqsr: - modules/gatk4/applyvqsr/** - tests/modules/gatk4/applyvqsr/** @@ -667,6 +703,10 @@ gatk4/baserecalibrator: - modules/gatk4/baserecalibrator/** - tests/modules/gatk4/baserecalibrator/** +gatk4/baserecalibratorspark: + - modules/gatk4/baserecalibratorspark/** + - tests/modules/gatk4/baserecalibratorspark/** + gatk4/bedtointervallist: - modules/gatk4/bedtointervallist/** - tests/modules/gatk4/bedtointervallist/** @@ -743,6 +783,10 @@ gatk4/markduplicates: - modules/gatk4/markduplicates/** - tests/modules/gatk4/markduplicates/** +gatk4/markduplicatesspark: + - modules/gatk4/markduplicatesspark/** + - tests/modules/gatk4/markduplicatesspark/** + gatk4/mergebamalignment: - modules/gatk4/mergebamalignment/** - tests/modules/gatk4/mergebamalignment/** @@ -851,6 +895,14 @@ hamronization/summarize: - modules/hamronization/summarize/** - tests/modules/hamronization/summarize/** +happy/happy: + - modules/happy/happy/** + - tests/modules/happy/happy/** + +happy/prepy: + - modules/happy/prepy/** + - tests/modules/happy/prepy/** + hicap: - modules/hicap/** - tests/modules/hicap/** @@ -977,6 +1029,10 @@ kaiju/kaiju: - modules/kaiju/kaiju/** - tests/modules/kaiju/kaiju/** +kaiju/kaiju2table: + - modules/kaiju/kaiju2table/** + - tests/modules/kaiju/kaiju2table/** + kallisto/index: - modules/kallisto/index/** - tests/modules/kallisto/index/** @@ -1010,6 +1066,14 @@ krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** +krona/ktimporttext: + - modules/krona/ktimporttext/** + - tests/modules/krona/ktimporttext/** + +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** @@ -1130,6 +1194,10 @@ maxbin2: - modules/maxbin2/** - tests/modules/maxbin2/** +md5sum: + - modules/md5sum/** + - tests/modules/md5sum/** + medaka: - modules/medaka/** - tests/modules/medaka/** @@ -1146,6 +1214,10 @@ meningotype: - modules/meningotype/** - tests/modules/meningotype/** +meryl/count: + - modules/meryl/count/** + - tests/modules/meryl/count/** + metabat2/jgisummarizebamcontigdepths: - modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/** @@ -1194,6 +1266,10 @@ mosdepth: - modules/mosdepth/** - tests/modules/mosdepth/** +motus/downloaddb: + - modules/motus/downloaddb/** + - tests/modules/motus/downloaddb/** + msisensor/msi: - modules/msisensor/msi/** - tests/modules/msisensor/msi/** @@ -1555,6 +1631,14 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** +samtools/bamtocram: + - modules/samtools/bamtocram/** + - tests/modules/samtools/bamtocram/** + +samtools/collatefastq: + - modules/samtools/collatefastq/** + - tests/modules/samtools/collatefastq/** + samtools/depth: - modules/samtools/depth/** - tests/modules/samtools/depth/** @@ -1663,6 +1747,14 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +shasum: + - modules/shasum/** + - tests/modules/shasum/** + +shigatyper: + - modules/shigatyper/** + - tests/modules/shigatyper/** + shovill: - modules/shovill/** - tests/modules/shovill/** @@ -1671,17 +1763,17 @@ sistr: - modules/sistr/** - tests/modules/sistr/** +slimfastq: + - modules/slimfastq/** + - tests/modules/slimfastq/** + snapaligner/index: - modules/snapaligner/index/** - tests/modules/snapaligner/index/** -snapaligner/paired: - - modules/snapaligner/paired/** - - tests/modules/snapaligner/paired/** - -snapaligner/single: - - modules/snapaligner/single/** - - tests/modules/snapaligner/single/** +snapaligner/align: + - modules/snapaligner/align/** + - tests/modules/snapaligner/align/** snpdists: - modules/snpdists/** @@ -1719,6 +1811,10 @@ sratools/prefetch: - modules/sratools/prefetch/** - tests/modules/sratools/prefetch/** +srst2/srst2: + - modules/srst2/srst2/** + - tests/modules/srst2/srst2/** + ssuissero: - modules/ssuissero/** - tests/modules/ssuissero/** @@ -1860,6 +1956,10 @@ unzip: - modules/unzip/** - tests/modules/unzip/** +vardictjava: + - modules/vardictjava/** + - tests/modules/vardictjava/** + variantbam: - modules/variantbam/** - tests/modules/variantbam/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 97d22981..c4f470a4 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -14,6 +14,7 @@ params { genome_paf = "${test_data_dir}/genomics/sarscov2/genome/genome.paf" genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes" transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta" + proteome_fasta = "${test_data_dir}/genomics/sarscov2/genome/proteome.fasta" transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf" test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed" @@ -109,20 +110,28 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + krona_taxonomy = "${test_data_dir}/genomics/sarscov2/metagenome/krona_taxonomy.tab" + } } 'homo_sapiens' { 'genome' { + genome_elfasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elfasta" genome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta" genome_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta.fai" genome_dict = "${test_data_dir}/genomics/homo_sapiens/genome/genome.dict" genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3" genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf" genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list" + genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.multi_intervals.bed" genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes" genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed" genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" genome_bed_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz" genome_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz.tbi" + genome_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elsites" transcriptome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/transcriptome.fasta" genome2_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome2.fasta" genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz" @@ -136,6 +145,7 @@ params { genome_21_multi_interval_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz.tbi" genome_21_chromosomes_dir = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/chromosomes.tar.gz" + dbsnp_146_hg38_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.elsites" dbsnp_146_hg38_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz" dbsnp_146_hg38_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi" gnomad_r2_1_1_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1.vcf.gz" @@ -172,16 +182,16 @@ params { vcfanno_toml = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml" } 'pangenome' { - pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" - pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" - pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" - pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" - pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" - pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" - pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" + pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" + pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" + pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" + pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" + pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" + pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" 'odgi' { - pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" - pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" + pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" + pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" } } 'illumina' { @@ -202,138 +212,140 @@ params { test_paired_end_hla = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.bam" test_paired_end_hla_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam" test_paired_end_hla_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam.bai" - test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" - test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" - test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" - test2_paired_end_markduplicates_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam" - test2_paired_end_markduplicates_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam.bai" - test2_paired_end_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam" - test2_paired_end_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai" - test2_paired_end_umi_consensus_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_consensus.bam" - test2_paired_end_umi_converted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_converted.bam" - test2_paired_end_umi_grouped_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_grouped.bam" - test2_paired_end_umi_histogram_txt = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_histogram.txt" - test2_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_unsorted.bam" - test2_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.unsorted_tagged.bam" + test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" + test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" + test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" + test2_paired_end_markduplicates_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam" + test2_paired_end_markduplicates_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam.bai" + test2_paired_end_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam" + test2_paired_end_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai" + test2_paired_end_umi_consensus_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_consensus.bam" + test2_paired_end_umi_converted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_converted.bam" + test2_paired_end_umi_grouped_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_grouped.bam" + test2_paired_end_umi_histogram_txt = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_histogram.txt" + test2_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_unsorted.bam" + test2_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.unsorted_tagged.bam" - mitochon_standin_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam" - mitochon_standin_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai" + mitochon_standin_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam" + mitochon_standin_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai" - test_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram" - test_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai" - test_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram" - test_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram.crai" - test_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram" - test_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai" + test_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram" + test_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai" + test_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram" + test_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram.crai" + test_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram" + test_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai" - test2_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram" - test2_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram.crai" - test2_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram" - test2_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram.crai" - test2_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram" - test2_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai" + test2_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram" + test2_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram.crai" + test2_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram" + test2_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram.crai" + test2_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram" + test2_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai" - test_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz" - test_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" - test_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz" - test_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz" - test2_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz" - test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" - test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" - test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" - test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_1.fastq.gz" - test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_2.fastq.gz" + test_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz" + test_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" + test_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz" + test_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz" + test2_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz" + test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" + test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" + test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" + test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz" + test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz" - test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" - test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" - test_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.pileups.table" - test2_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.pileups.table" + test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" + test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" + test_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.pileups.table" + test2_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.pileups.table" - test_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz" - test_pon_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_pon_genomicsdb.tar.gz" + test_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz" + test_pon_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_pon_genomicsdb.tar.gz" - test2_haplotc_ann_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz" - test2_haplotc_ann_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi" + test2_haplotc_ann_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz" + test2_haplotc_ann_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi" - test2_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal" - test2_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal.idx" - test2_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.tranches" - test2_allele_specific_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal" - test2_allele_specific_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal.idx" - test2_allele_specific_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.tranches" + test2_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal" + test2_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal.idx" + test2_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.tranches" + test2_allele_specific_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal" + test2_allele_specific_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal.idx" + test2_allele_specific_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.tranches" - test_test2_paired_mutect2_calls_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz" - test_test2_paired_mutect2_calls_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi" - test_test2_paired_mutect2_calls_vcf_gz_stats = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats" - test_test2_paired_mutect2_calls_f1r2_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.f1r2.tar.gz" - test_test2_paired_mutect2_calls_artifact_prior_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz" - test_test2_paired_segmentation_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table" - test_test2_paired_contamination_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.contamination.table" + test_test2_paired_mutect2_calls_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz" + test_test2_paired_mutect2_calls_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi" + test_test2_paired_mutect2_calls_vcf_gz_stats = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats" + test_test2_paired_mutect2_calls_f1r2_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.f1r2.tar.gz" + test_test2_paired_mutect2_calls_artifact_prior_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz" + test_test2_paired_segmentation_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table" + test_test2_paired_contamination_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.contamination.table" - test_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf" - test_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz" - test_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi" - test_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx" + test_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf" + test_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz" + test_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi" + test_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx" - test2_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf" - test2_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz" - test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi" - test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx" + test2_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf" + test2_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz" + test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi" + test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx" - test_genome21_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz" - test_genome21_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz.tbi" + test_genome21_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz" + test_genome21_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz.tbi" - test_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test.mpileup.gz" - test2_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test2.mpileup.gz" + test_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test.mpileup.gz" + test2_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test2.mpileup.gz" - test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak" - test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak" + test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak" + test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak" - test_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak" - test2_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak" + test_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak" + test2_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak" - test_10x_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" - test_10x_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" + test_10x_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" + test_10x_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" - test_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test.yak" - test2_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test2.yak" + test_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test.yak" + test2_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test2.yak" - cutandrun_bedgraph_test_1 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_h3k27me3_test_1.bedGraph" - cutandrun_bedgraph_test_2 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_igg_test_1.bedGraph" + cutandrun_bedgraph_test_1 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_h3k27me3_test_1.bedGraph" + cutandrun_bedgraph_test_2 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_igg_test_1.bedGraph" - test_rnaseq_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf" - test_sv_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz" + test_rnaseq_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf" + test_sv_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz" - test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor" + test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor" } 'pacbio' { - primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" - alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" - alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" - ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" - ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" - ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" - ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" - ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" - ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" - hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" - lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" - refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" - cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" - singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" - aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" - alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" - genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" - genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" - filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" + primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" + alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" + alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" + ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" + ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" + ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" + ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" + ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" + ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" + hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" + lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" + refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" + cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" + singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" + aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" + alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" + genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" + genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" + filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" } } 'bacteroides_fragilis' { 'genome' { genome_fna_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz" + genome_gbff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz" genome_paf = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf" genome_mapping_potential_arg = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.mapping.potential.ARG" + genome_gff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gff.gz" } 'illumina' { @@ -383,31 +395,31 @@ params { } 'generic' { 'csv' { - test_csv = "${test_data_dir}/generic/csv/test.csv" + test_csv = "${test_data_dir}/generic/csv/test.csv" } 'notebooks' { - rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" - ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" - ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" + rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" + ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" + ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" } 'tsv' { - test_tsv = "${test_data_dir}/generic/tsv/test.tsv" + test_tsv = "${test_data_dir}/generic/tsv/test.tsv" } 'txt' { - hello = "${test_data_dir}/generic/txt/hello.txt" + hello = "${test_data_dir}/generic/txt/hello.txt" } 'cnn' { - reference = "${test_data_dir}/generic/cnn/reference.cnn" + reference = "${test_data_dir}/generic/cnn/reference.cnn" } 'cooler'{ - test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" - test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" - test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" - test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" - test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" - hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" - test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" - test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" + test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" + test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" + test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" + test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" + test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" + hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" + test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" + test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" } } diff --git a/tests/modules/amplify/predict/main.nf b/tests/modules/amplify/predict/main.nf new file mode 100644 index 00000000..05db4cdb --- /dev/null +++ b/tests/modules/amplify/predict/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRODIGAL } from '../../../modules/prodigal/main.nf' addParams( options: [:] ) +include { AMPLIFY_PREDICT } from '../../../../modules/amplify/predict/main.nf' addParams( options: [:] ) + +workflow amplify_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) + ] + model_dir = [] + + PRODIGAL ( input, "gff" ) + AMPLIFY_PREDICT ( PRODIGAL.out.amino_acid_fasta, model_dir) +} diff --git a/tests/modules/snapaligner/paired/nextflow.config b/tests/modules/amplify/predict/nextflow.config similarity index 100% rename from tests/modules/snapaligner/paired/nextflow.config rename to tests/modules/amplify/predict/nextflow.config diff --git a/tests/modules/amplify/predict/test.yml b/tests/modules/amplify/predict/test.yml new file mode 100644 index 00000000..3bc92889 --- /dev/null +++ b/tests/modules/amplify/predict/test.yml @@ -0,0 +1,9 @@ +- name: amplify predict amplify_predict + command: nextflow run tests/modules/amplify/predict -entry amplify_predict -c tests/config/nextflow.config + tags: + - amplify/predict + - amplify + files: + - path: output/amplify/test.tsv + md5sum: 1951084ce1d410028be86754997e5852 + - path: output/amplify/versions.yml diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/main.nf b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..d7289acc --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR as UNTAR1 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR2 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR3 } from '../../../../modules/untar/main.nf' +include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../modules/antismash/antismashlitedownloaddatabases/main.nf' + +workflow test_antismash_antismashlitedownloaddatabases { + input1 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + input2 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + input3 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + + UNTAR1 ( input1 ) + UNTAR2 ( input2 ) + UNTAR3 ( input3 ) + + ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config new file mode 100644 index 00000000..06a716aa --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml new file mode 100644 index 00000000..b4a964a0 --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -0,0 +1,16 @@ +- name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases + command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config + tags: + - antismash/antismashlitedownloaddatabases + - antismash + files: + - path: output/antismash/versions.yml + md5sum: 24859c67023abab99de295d3675a24b6 + - path: output/antismash/antismash_db + - path: output/antismash/antismash_db/clusterblast + - path: output/antismash/antismash_db/clustercompare + - path: output/antismash/antismash_db/pfam + - path: output/antismash/antismash_db/resfam + - path: output/antismash/antismash_db/tigrfam + - path: output/antismash/antismash_dir + - path: output/antismash/antismash_dir/detection/hmm_detection/data/bgc_seeds.hmm diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index eb0bed01..e5c15c32 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -2,13 +2,29 @@ nextflow.enable.dsl = 2 -include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf' -workflow test_bamtools_split { +workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_SINGLE ( input ) } + +workflow test_bamtools_split_multiple { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] + ] + + BAMTOOLS_SPLIT_MULTIPLE ( input ) +} + diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 4f52e9ce..af639b43 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,10 +1,23 @@ -- name: bamtools split test_bamtools_split - command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config +- name: bamtools split test_bamtools_split_single_input + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - - bamtools/split - bamtools + - bamtools/split files: - - path: output/bamtools/test.paired_end.sorted.REF_chr22.bam + - path: output/bamtools/test.REF_chr22.bam md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07 - - path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam + - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb + - path: output/bamtools/versions.yml + +- name: bamtools split test_bamtools_split_multiple + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config + tags: + - bamtools + - bamtools/split + files: + - path: output/bamtools/test.REF_chr22.bam + md5sum: 585675bea34c48ebe9db06a561d4b4fa + - path: output/bamtools/test.REF_unmapped.bam + md5sum: 16ad644c87b9471f3026bc87c98b4963 + - path: output/bamtools/versions.yml diff --git a/tests/modules/bclconvert/main.nf b/tests/modules/bclconvert/main.nf new file mode 100644 index 00000000..e8a78e4f --- /dev/null +++ b/tests/modules/bclconvert/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCLCONVERT } from '../../../modules/bclconvert/main.nf' + +process STUB_BCLCONVERT_INPUT { + output: + path "SampleSheet.csv" ,emit: samplesheet + path "DDMMYY_SERIAL_FLOWCELL" ,emit: run_dir + + stub: + """ + mkdir DDMMYY_SERIAL_FLOWCELL + echo "SampleSheet" > SampleSheet.csv + """ +} + +workflow test_bclconvert { + STUB_BCLCONVERT_INPUT () + BCLCONVERT (STUB_BCLCONVERT_INPUT.out.samplesheet, STUB_BCLCONVERT_INPUT.out.run_dir) +} diff --git a/tests/modules/snapaligner/single/nextflow.config b/tests/modules/bclconvert/nextflow.config similarity index 100% rename from tests/modules/snapaligner/single/nextflow.config rename to tests/modules/bclconvert/nextflow.config diff --git a/tests/modules/bclconvert/test.yml b/tests/modules/bclconvert/test.yml new file mode 100644 index 00000000..65e71a59 --- /dev/null +++ b/tests/modules/bclconvert/test.yml @@ -0,0 +1,52 @@ +- name: bclconvert test_bclconvert + command: nextflow run tests/modules/bclconvert -entry test_bclconvert -c tests/config/nextflow.config -stub-run + tags: + - bclconvert + files: + - path: output/bclconvert/InterOp/InterOp.bin + md5sum: d3dea0bb4ab1c8754af324f40b001481 + - path: output/bclconvert/Logs/Errors.log + md5sum: 334645f09074b2597a692e395b716a9c + - path: output/bclconvert/Logs/FastqComplete.txt + md5sum: a4c4c6ce2d0de67d3b7ac7d1fcb512e4 + - path: output/bclconvert/Logs/Info.log + md5sum: d238822d379f2277cac950ca986cb660 + - path: output/bclconvert/Logs/Warnings.log + md5sum: aeefd2d631817e170f88f25ecaaf4664 + - path: output/bclconvert/Reports/Adapter_Metrics.csv + md5sum: af62e9c7b44940cfd8ea11064a1f42ae + - path: output/bclconvert/Reports/Demultiplex_Stats.csv + md5sum: d11313931fcaabb5ce159462ad3dd1da + - path: output/bclconvert/Reports/IndexMetricsOut.bin + md5sum: 6bcee11c8145e3b1059ceaa91d2f5be7 + - path: output/bclconvert/Reports/Index_Hopping_Counts.csv + md5sum: 697e40e0c0d48b4bd25f138ef60b0bde + - path: output/bclconvert/Reports/Quality_Metrics.csv + md5sum: 3902fd38f6b01f1ce0f0e8724238f8f2 + - path: output/bclconvert/Reports/RunInfo.xml + md5sum: 5bef7c7e76360231b0c4afdfc915fd44 + - path: output/bclconvert/Reports/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/Reports/Top_Unknown_Barcodes.csv + md5sum: 39a5e7f6d21c12d6051afdc8261b6330 + - path: output/bclconvert/Reports/fastq_list.csv + md5sum: 32c51ab10e013fd547928de57361ffcb + - path: output/bclconvert/sample1_S1_L001_R1_001.fastq.gz + md5sum: 9b831a39755935333f86f167527a094d + - path: output/bclconvert/sample1_S1_L001_R2_001.fastq.gz + md5sum: 082f4f767b7619f409ca7e752ef482bf + - path: output/bclconvert/sample1_S1_L002_R1_001.fastq.gz + md5sum: 837764c89db93dfb53cd663c4f26f3d7 + - path: output/bclconvert/sample1_S1_L002_R2_001.fastq.gz + md5sum: 1a42cf6ba0bb8fc7770f278e6d1ab676 + - path: output/bclconvert/sample2_S2_L001_R1_001.fastq.gz + md5sum: 475bc426b7cc48d0551d40e31457dc78 + - path: output/bclconvert/sample2_S2_L001_R2_001.fastq.gz + md5sum: f670ccd7d9352e0e67fe1c1232429d94 + - path: output/bclconvert/sample2_S2_L002_R1_001.fastq.gz + md5sum: ebd5ff6fa5603e7d704b5a10598de58c + - path: output/bclconvert/sample2_S2_L002_R2_001.fastq.gz + md5sum: 2f83b460f52620d2548c7ef8845b31d7 + - path: output/stub/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/versions.yml diff --git a/tests/modules/bowtie2/align/main.nf b/tests/modules/bowtie2/align/main.nf index 2d3945e5..f91394ff 100644 --- a/tests/modules/bowtie2/align/main.nf +++ b/tests/modules/bowtie2/align/main.nf @@ -32,4 +32,4 @@ workflow test_bowtie2_align_paired_end { BOWTIE2_BUILD ( fasta ) BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) -} +} \ No newline at end of file diff --git a/tests/modules/bowtie2/align/nextflow.config b/tests/modules/bowtie2/align/nextflow.config index 8730f1c4..b4640de7 100644 --- a/tests/modules/bowtie2/align/nextflow.config +++ b/tests/modules/bowtie2/align/nextflow.config @@ -1,5 +1,16 @@ +params { + force_large_index = false +} + process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - +} + +if (params.force_large_index) { + process { + withName: BOWTIE2_BUILD { + ext.args = '--large-index' + } + } } diff --git a/tests/modules/bowtie2/align/test.yml b/tests/modules/bowtie2/align/test.yml index 95d48b88..ea9aa72a 100644 --- a/tests/modules/bowtie2/align/test.yml +++ b/tests/modules/bowtie2/align/test.yml @@ -39,3 +39,45 @@ md5sum: 52be6950579598a990570fbcf5372184 - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 md5sum: e3b4ef343dea4dd571642010a7d09597 + +- name: bowtie2 align single-end large-index + command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/bowtie2/genome.3.bt2l + md5sum: 8952b3e0b1ce9a7a5916f2e147180853 + - path: ./output/bowtie2/bowtie2/genome.2.bt2l + md5sum: 22c284084784a0720989595e0c9461fd + - path: ./output/bowtie2/bowtie2/genome.1.bt2l + md5sum: 07d811cd4e350d56267183d2ac7023a5 + - path: ./output/bowtie2/bowtie2/genome.4.bt2l + md5sum: c25be5f8b0378abf7a58c8a880b87626 + - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2l + md5sum: fda48e35925fb24d1c0785f021981e25 + - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2l + md5sum: 802c26d32b970e1b105032b7ce7348b4 + +- name: bowtie2 align paired-end large-index + command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/bowtie2/genome.3.bt2l + md5sum: 8952b3e0b1ce9a7a5916f2e147180853 + - path: ./output/bowtie2/bowtie2/genome.2.bt2l + md5sum: 22c284084784a0720989595e0c9461fd + - path: ./output/bowtie2/bowtie2/genome.1.bt2l + md5sum: 07d811cd4e350d56267183d2ac7023a5 + - path: ./output/bowtie2/bowtie2/genome.4.bt2l + md5sum: c25be5f8b0378abf7a58c8a880b87626 + - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2l + md5sum: fda48e35925fb24d1c0785f021981e25 + - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2l + md5sum: 802c26d32b970e1b105032b7ce7348b4 diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf new file mode 100644 index 00000000..598e148a --- /dev/null +++ b/tests/modules/busco/main.nf @@ -0,0 +1,404 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BUSCO } from '../../../modules/busco/main.nf' + +workflow test_busco_genome_single_fasta { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + ['bacteria_odb10', 'bacteroidetes_odb10'], // Launch with 'auto' to use --auto-lineage, and specified lineages // 'auto' removed from test due to memory issues + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpyz_hi62i/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/versions.yml + + Former Output tree -w 'auto': + /tmp/tmp846crjv2/busco/ + ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json + ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidales_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.json + ├── short_summary.specific.bacteroidales_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-auto-busco -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/ + │ ├── genome.fna/ + │ │ ├── auto_lineage/ + │ │ │ ├── run_archaea_odb10/ + │ │ │ ├── run_bacteria_odb10/ + │ │ │ └── run_eukaryota_odb10/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ ├── metaeuk_out.log + │ │ │ ├── prodigal_err.log + │ │ │ ├── prodigal_out.log + │ │ │ ├── sepp_err.log + │ │ │ └── sepp_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10 -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/genome.fna/auto_lineage/run_bacteria_odb10/ [recursive, not followed] + │ │ └── run_bacteroidales_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-auto-busco.batch_summary.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco.batch_summary.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/versions.yml + */ + +} + +workflow test_busco_genome_multi_fasta { + + input = [ + [ id:'test' ], // meta map + [ + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) + ] + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpk19byek7/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fasta.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.json + ├── short_summary.specific.bacteria_odb10.genome.fasta.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/versions.yml + */ + +} + +workflow test_busco_eukaryote_metaeuk { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpeq4dsir5/busco/ + ├── short_summary.specific.eukaryota_odb10.genome.fasta.json -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.json + ├── short_summary.specific.eukaryota_odb10.genome.fasta.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.txt + ├── test-eukaryota_odb10-busco -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ └── metaeuk_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── metaeuk_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/versions.yml + */ + +} + +workflow test_busco_eukaryote_augustus { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp2xqaygjj/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco/ + │ ├── genome.fasta/ + │ │ ├── blast_db/ + │ │ │ ├── genome.fasta.ndb + │ │ │ ├── genome.fasta.nhr + │ │ │ ├── genome.fasta.nin + │ │ │ ├── genome.fasta.not + │ │ │ ├── genome.fasta.nsq + │ │ │ ├── genome.fasta.ntf + │ │ │ └── genome.fasta.nto + │ │ ├── logs/ + │ │ │ ├── makeblastdb_err.log + │ │ │ ├── makeblastdb_out.log + │ │ │ ├── tblastn_err.log + │ │ │ └── tblastn_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── augustus_output/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ └── hmmer_output/ + │ └── logs/ + │ └── busco.log + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/versions.yml + */ + +} + +workflow test_busco_protein { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpzwd5dn56/busco/ + ├── short_summary.specific.bacteria_odb10.proteome.fasta.json -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.json + ├── short_summary.specific.bacteria_odb10.proteome.fasta.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco/ + │ ├── logs/ + │ │ └── busco.log + │ └── proteome.fasta/ + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ └── hmmsearch_out.log + │ └── run_bacteria_odb10/ + │ ├── busco_sequences/ + │ ├── full_table.tsv + │ ├── hmmer_output/ + │ ├── missing_busco_list.tsv + │ ├── short_summary.json + │ └── short_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/versions.yml + */ +} +workflow test_busco_transcriptome { + + input = [ + [ id:'test' ], // meta map + file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpitjyvo9g/busco/ + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + ├── test-bacteria_odb10-busco -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco/ + │ ├── logs/ + │ │ └── busco.log + │ └── test1.contigs.fa/ + │ ├── blast_db/ + │ │ ├── test1.contigs.fa.ndb + │ │ ├── test1.contigs.fa.nhr + │ │ ├── test1.contigs.fa.nin + │ │ ├── test1.contigs.fa.not + │ │ ├── test1.contigs.fa.nsq + │ │ ├── test1.contigs.fa.ntf + │ │ └── test1.contigs.fa.nto + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ ├── hmmsearch_out.log + │ │ ├── makeblastdb_err.log + │ │ ├── makeblastdb_out.log + │ │ ├── tblastn_err.log + │ │ └── tblastn_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ ├── short_summary.txt + │ │ └── single_copy_proteins.faa + │ └── translated_proteins/ + │ ├── 1024388at2.faa + │ ├── 1054741at2.faa + │ ├── 1093223at2.faa + │ ├── 1151822at2.faa + │ ├── 143460at2.faa + │ ├── 1491686at2.faa + │ ├── 1504821at2.faa + │ ├── 1574817at2.faa + │ ├── 1592033at2.faa + │ ├── 1623045at2.faa + │ ├── 1661836at2.faa + │ ├── 1674344at2.faa + │ ├── 1698718at2.faa + │ ├── 1990650at2.faa + │ ├── 223233at2.faa + │ ├── 402899at2.faa + │ ├── 505485at2.faa + │ ├── 665824at2.faa + │ ├── 776861at2.faa + │ ├── 874197at2.faa + │ ├── 932854at2.faa + │ └── 95696at2.faa + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/versions.yml + */ + +} diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config new file mode 100644 index 00000000..9e8f718f --- /dev/null +++ b/tests/modules/busco/nextflow.config @@ -0,0 +1,28 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: 'test_busco_genome_single_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_genome_multi_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_metaeuk:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_augustus:BUSCO' { + ext.args = '--mode genome --augustus' + } + + withName: 'test_busco_protein:BUSCO' { + ext.args = '--mode proteins' + } + + withName: 'test_busco_transcriptome:BUSCO'{ + ext.args = '--mode transcriptome' + } +} diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml new file mode 100644 index 00000000..43b810ba --- /dev/null +++ b/tests/modules/busco/test.yml @@ -0,0 +1,159 @@ +- name: busco test_busco_genome_single_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: e50690742e9ae6abdd2bf99334ff9e12 + - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt + md5sum: 4c1b2c4317c88398eddc30877ed740d9 + - path: output/busco/versions.yml + md5sum: 8aa830f71587d859df35c6cfab59f35d + +- name: busco test_busco_genome_multi_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 5360dfe83bec1f5741ee115e53e6b517 + - path: output/busco/versions.yml + md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 + +- name: busco test_busco_eukaryote_metaeuk + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: a70806f99ba5706d7353d3353b3f1d2b + - path: output/busco/versions.yml + md5sum: 34a808c257e6db1b0456f3b4372bc477 + +- name: busco test_busco_eukaryote_augustus + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: 660393dd43cd6a093b952d4b8ad41e40 + - path: output/busco/versions.yml + md5sum: 2caac915461410b16a1524ac064cd0df + +- name: busco test_busco_protein + command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f + - path: output/busco/versions.yml + md5sum: d7392261a57960a7e6aea609dce824f5 + +- name: busco test_busco_transcriptome + command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config + tags: + - busco + files: + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 9a176cafe66ac0adca89dc34ad2be13f + - path: output/busco/versions.yml + md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml index 4565151e..fd07db4c 100644 --- a/tests/modules/cnvpytor/callcnvs/test.yml +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -4,10 +4,8 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa - name: cnvpytor callcnvs test_cnvpytor_callcnvs stub command: nextflow run tests/modules/cnvpytor/callcnvs -entry test_cnvpytor_callcnvs -c tests/config/nextflow.config -stub-run @@ -15,6 +13,5 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa diff --git a/tests/modules/cnvpytor/histogram/test.yml b/tests/modules/cnvpytor/histogram/test.yml index 0543fcc3..f67901d4 100644 --- a/tests/modules/cnvpytor/histogram/test.yml +++ b/tests/modules/cnvpytor/histogram/test.yml @@ -5,9 +5,7 @@ - cnvpytor/histogram files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 - name: cnvpytor histogram test_cnvpytor_histogram stub command: nextflow run tests/modules/cnvpytor/histogram -entry test_cnvpytor_histogram -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 diff --git a/tests/modules/cnvpytor/importreaddepth/test.yml b/tests/modules/cnvpytor/importreaddepth/test.yml index b148c38e..a2530c26 100644 --- a/tests/modules/cnvpytor/importreaddepth/test.yml +++ b/tests/modules/cnvpytor/importreaddepth/test.yml @@ -6,7 +6,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth -c tests/config/nextflow.config -stub-run @@ -16,7 +15,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config @@ -26,7 +24,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config -stub-run @@ -36,4 +33,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a diff --git a/tests/modules/cnvpytor/partition/test.yml b/tests/modules/cnvpytor/partition/test.yml index 10232097..e24a1200 100644 --- a/tests/modules/cnvpytor/partition/test.yml +++ b/tests/modules/cnvpytor/partition/test.yml @@ -5,9 +5,7 @@ - cnvpytor/partition files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 - name: cnvpytor partition test_cnvpytor_partition stub command: nextflow run tests/modules/cnvpytor/partition -entry test_cnvpytor_partition -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..3b99c314 --- /dev/null +++ b/tests/modules/cnvpytor/view/main.nf @@ -0,0 +1,42 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_VIEW } from '../../../../modules/cnvpytor/view/main.nf' + +workflow test_cnvpytor_view { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + bin_sizes = "10000 100000" + + CNVPYTOR_VIEW ( input, bin_sizes, [] ) +} + +workflow test_cnvpytor_view_tsvout { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, [], output_suffix ) +} + +workflow test_cnvpytor_view_stub { + + input = [ + [ id:'test'], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] + ] + + bin_sizes = [] + output_suffix = [] + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} diff --git a/tests/modules/cnvpytor/view/nextflow.config b/tests/modules/cnvpytor/view/nextflow.config new file mode 100644 index 00000000..6d2cc1fb --- /dev/null +++ b/tests/modules/cnvpytor/view/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_VIEW { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml new file mode 100644 index 00000000..ea8ab792 --- /dev/null +++ b/tests/modules/cnvpytor/view/test.yml @@ -0,0 +1,27 @@ +- name: cnvpytor view test_cnvpytor_view + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/test_100000.vcf + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view tsv + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_tsvout -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_1000.tsv + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view stub + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_stub -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.vcf + - path: output/cnvpytor/versions.yml diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 87d05bf9..ff669233 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -7,9 +7,22 @@ include { DIAMOND_BLASTP } from '../../../../modules/diamond/blastp/main.nf' workflow test_diamond_blastp { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + out_ext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) +} + +workflow test_diamond_blastp_daa { + + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + out_ext = 'daa' + blast_columns = [] + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 32dfacaa..aff4e1c5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,8 +1,17 @@ -- name: diamond blastp - command: nextflow run ./tests/modules/diamond/blastp -entry test_diamond_blastp -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastp/nextflow.config +- name: diamond blastp test_diamond_blastp + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - - diamond - diamond/blastp + - diamond files: - - path: ./output/diamond/test.diamond_blastp.txt - md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + - path: output/diamond/test.diamond_blastp.txt + - path: output/diamond/versions.yml + +- name: diamond blastp test_diamond_blastp_daa + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config + tags: + - diamond/blastp + - diamond + files: + - path: output/diamond/test.diamond_blastp.daa + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 77eb08ea..8316aa91 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -7,9 +7,22 @@ include { DIAMOND_BLASTX } from '../../../../modules/diamond/blastx/main.nf' workflow test_diamond_blastx { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + out_ext = 'tfdfdt' // Nonsense file extension to check default case. + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) +} + +workflow test_diamond_blastx_daa { + + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + out_ext = 'daa' + blast_columns = [] + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index fe7c6938..b2b6149f 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -1,8 +1,18 @@ -- name: diamond blastx - command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config +- name: diamond blastx test_diamond_blastx + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config tags: - diamond - diamond/blastx files: - - path: ./output/diamond/test.diamond_blastx.txt - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/diamond/test.diamond_blastx.txt + - path: output/diamond/versions.yml + +- name: diamond blastx test_diamond_blastx_daa + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastx + files: + - path: output/diamond/test.diamond_blastx.daa + md5sum: 0df4a833408416f32981415873facc11 + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/makedb/main.nf b/tests/modules/diamond/makedb/main.nf index 70982ae9..d309de6d 100644 --- a/tests/modules/diamond/makedb/main.nf +++ b/tests/modules/diamond/makedb/main.nf @@ -6,7 +6,7 @@ include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' workflow test_diamond_makedb { - input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] DIAMOND_MAKEDB ( input ) } diff --git a/tests/modules/diamond/makedb/test.yml b/tests/modules/diamond/makedb/test.yml index c8f2d79e..cdddf735 100644 --- a/tests/modules/diamond/makedb/test.yml +++ b/tests/modules/diamond/makedb/test.yml @@ -1,8 +1,9 @@ - name: diamond makedb test_diamond_makedb - command: nextflow run ./tests/modules/diamond/makedb -entry test_diamond_makedb -c ./tests/config/nextflow.config -c ./tests/modules/diamond/makedb/nextflow.config + command: nextflow run tests/modules/diamond/makedb -entry test_diamond_makedb -c tests/config/nextflow.config tags: - - diamond - diamond/makedb + - diamond files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/proteome.fasta.dmnd + md5sum: fc28c50b202dd7a7c5451cddff2ba1f4 + - path: output/diamond/versions.yml diff --git a/tests/modules/elprep/filter/main.nf b/tests/modules/elprep/filter/main.nf new file mode 100644 index 00000000..0a8d43ca --- /dev/null +++ b/tests/modules/elprep/filter/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_FILTER } from '../../../../modules/elprep/filter/main.nf' + +workflow test_elprep_filter { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + reference_elfasta = file(params.test_data['homo_sapiens']['genome']['genome_elfasta'], checkIfExists: true) + known_sites_elsites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_elsites'], checkIfExists: true) + target_regions_bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + ELPREP_FILTER ( input, true, true, [], [], reference_elfasta, known_sites_elsites, target_regions_bed, [], [], true, true) +} diff --git a/tests/modules/elprep/filter/nextflow.config b/tests/modules/elprep/filter/nextflow.config new file mode 100644 index 00000000..d53a3d2d --- /dev/null +++ b/tests/modules/elprep/filter/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: ELPREP_FILTER { + ext.args = "--mark-duplicates " + } +} diff --git a/tests/modules/elprep/filter/test.yml b/tests/modules/elprep/filter/test.yml new file mode 100644 index 00000000..922d7a9b --- /dev/null +++ b/tests/modules/elprep/filter/test.yml @@ -0,0 +1,13 @@ +- name: elprep filter test_elprep_filter + command: nextflow run tests/modules/elprep/filter -entry test_elprep_filter -c tests/config/nextflow.config + tags: + - elprep + - elprep/filter + files: + - path: output/elprep/test.activity_profile.igv + - path: output/elprep/test.assembly_regions.igv + - path: output/elprep/output/test.bam + - path: output/elprep/test.g.vcf.gz + - path: output/elprep/test.metrics.txt + - path: output/elprep/test.recall + - path: output/elprep/versions.yml diff --git a/tests/modules/elprep/merge/main.nf b/tests/modules/elprep/merge/main.nf new file mode 100644 index 00000000..b4a40ce3 --- /dev/null +++ b/tests/modules/elprep/merge/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' +include { ELPREP_MERGE } from '../../../../modules/elprep/merge/main.nf' + +workflow test_elprep_merge { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) + ELPREP_MERGE ( ELPREP_SPLIT.out.bam ) +} diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config new file mode 100644 index 00000000..4e4570f4 --- /dev/null +++ b/tests/modules/elprep/merge/nextflow.config @@ -0,0 +1,5 @@ +process { + withName : ELPREP_MERGE { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } +} diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml new file mode 100644 index 00000000..ad2ecfef --- /dev/null +++ b/tests/modules/elprep/merge/test.yml @@ -0,0 +1,8 @@ +- name: elprep merge test_elprep_merge + command: nextflow run tests/modules/elprep/merge -entry test_elprep_merge -c tests/config/nextflow.config + tags: + - elprep + - elprep/merge + files: + - path: output/elprep/output/test.bam + - path: output/elprep/versions.yml diff --git a/tests/modules/elprep/split/main.nf b/tests/modules/elprep/split/main.nf new file mode 100644 index 00000000..d5a111de --- /dev/null +++ b/tests/modules/elprep/split/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' + +workflow test_elprep_split { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) +} diff --git a/tests/modules/elprep/split/nextflow.config b/tests/modules/elprep/split/nextflow.config new file mode 100644 index 00000000..a3ae0169 --- /dev/null +++ b/tests/modules/elprep/split/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName : ELPREP_SPLIT { + ext.args = "--contig-group-size 1 --output-type bam" + } + +} diff --git a/tests/modules/elprep/split/test.yml b/tests/modules/elprep/split/test.yml new file mode 100644 index 00000000..2de3f99b --- /dev/null +++ b/tests/modules/elprep/split/test.yml @@ -0,0 +1,10 @@ +- name: elprep split test_elprep_split + command: nextflow run tests/modules/elprep/split -entry test_elprep_split -c tests/config/nextflow.config + tags: + - elprep + - elprep/split + files: + - path: output/elprep/output/splits/test-group00001.bam + - path: output/elprep/output/splits/test-unmapped.bam + - path: output/elprep/output/test-spread.bam + - path: output/elprep/versions.yml diff --git a/tests/modules/ensemblvep/main.nf b/tests/modules/ensemblvep/main.nf index 223847c7..30d19957 100644 --- a/tests/modules/ensemblvep/main.nf +++ b/tests/modules/ensemblvep/main.nf @@ -10,5 +10,5 @@ workflow test_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/modules/gamma/main.nf b/tests/modules/gamma/main.nf new file mode 100644 index 00000000..f9477706 --- /dev/null +++ b/tests/modules/gamma/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GAMMA } from '../../../modules/gamma/main.nf' + +workflow test_gamma { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + + GAMMA ( input, db ) +} diff --git a/tests/modules/gamma/nextflow.config b/tests/modules/gamma/nextflow.config new file mode 100644 index 00000000..bbbf4de0 --- /dev/null +++ b/tests/modules/gamma/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + ext.args = '--fasta' + +} diff --git a/tests/modules/gamma/test.yml b/tests/modules/gamma/test.yml new file mode 100644 index 00000000..1b493b49 --- /dev/null +++ b/tests/modules/gamma/test.yml @@ -0,0 +1,13 @@ +- name: gamma test_gamma + command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config + tags: + - gamma + files: + - path: output/gamma/test.fasta + md5sum: df37b48466181311e0a679f3c5878484 + - path: output/gamma/test.gamma + md5sum: 3256708fa517a65ed01d99e0e3c762ae + - path: output/gamma/test.psl + md5sum: 162a2757ed3b167ae1e0cdb24213f940 + - path: output/gamma/versions.yml + md5sum: 3fefb5b46c94993362243c5f9a472057 diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 8a38c129..d0949a52 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -14,3 +14,14 @@ workflow test_gatk4_mergebamalignment { GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } + +workflow test_gatk4_mergebamalignment_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) +} diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index b1bb32b2..01d9bf46 100644 --- a/tests/modules/gatk4/mergebamalignment/test.yml +++ b/tests/modules/gatk4/mergebamalignment/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.bam md5sum: e6f1b343700b7ccb94e81ae127433988 - path: output/gatk4/versions.yml + +- name: gatk4 mergebamalignment test_gatk4_mergebamalignment_stubs + command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mergebamalignment + files: + - path: output/gatk4/test.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 0b4339f0..fa229eff 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -118,3 +118,25 @@ workflow test_gatk4_mutect2_mitochondria { GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) } + +workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) + ], + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) + ], + [] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + + GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) +} diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 3cefce09..27fb40b9 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -69,3 +69,15 @@ md5sum: fc6ea14ca2da346babe78161beea28c9 - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml + +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mutect2 + files: + - path: output/gatk4/test.f1r2.tar.gz + - path: output/gatk4/test.vcf.gz + - path: output/gatk4/test.vcf.gz.stats + - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index ab5dddee..5b14d471 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -11,3 +11,11 @@ workflow test_gatk4_revertsam { GATK4_REVERTSAM ( input ) } + +workflow test_gatk4_revertsam_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + GATK4_REVERTSAM ( input ) +} diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 2ebdb685..fd26d06f 100644 --- a/tests/modules/gatk4/revertsam/test.yml +++ b/tests/modules/gatk4/revertsam/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.reverted.bam md5sum: f783a88deb45c3a2c20ca12cbe1c5652 - path: output/gatk4/versions.yml + +- name: gatk4 revertsam test_gatk4_revertsam_stubs + command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/revertsam + files: + - path: output/gatk4/test.reverted.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index 26a8ce2d..757b080f 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -19,3 +19,11 @@ workflow test_gatk4_samtofastq_paired_end { GATK4_SAMTOFASTQ ( input ) } + +workflow test_gatk4_samtofastq_paired_end_stubs { + input = [ [ id:'test', single_end: true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + ] + + GATK4_SAMTOFASTQ ( input ) +} diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index eb25f33b..bab7fc7a 100644 --- a/tests/modules/gatk4/samtofastq/test.yml +++ b/tests/modules/gatk4/samtofastq/test.yml @@ -19,3 +19,13 @@ - path: output/gatk4/test_2.fastq.gz md5sum: 613bf64c023609e1c62ad6ce9e4be8d7 - path: output/gatk4/versions.yml + +- name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs + command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/samtofastq + files: + - path: output/gatk4/test_1.fastq.gz + - path: output/gatk4/test_2.fastq.gz + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/splitncigarreads/main.nf b/tests/modules/gatk4/splitncigarreads/main.nf index 7e5b7c9a..31e45cec 100644 --- a/tests/modules/gatk4/splitncigarreads/main.nf +++ b/tests/modules/gatk4/splitncigarreads/main.nf @@ -6,7 +6,23 @@ include { GATK4_SPLITNCIGARREADS } from '../../../../modules/gatk4/splitncigarre workflow test_gatk4_splitncigarreads { input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [], + [] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_SPLITNCIGARREADS ( input, fasta, fai, dict ) +} + +workflow test_gatk4_splitncigarreads_intervals { + input = [ [ id:'test' ], // 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), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/gatk4/splitncigarreads/test.yml b/tests/modules/gatk4/splitncigarreads/test.yml index c38064e2..d9a58901 100644 --- a/tests/modules/gatk4/splitncigarreads/test.yml +++ b/tests/modules/gatk4/splitncigarreads/test.yml @@ -5,5 +5,14 @@ - gatk4/splitncigarreads files: - path: output/gatk4/test.bam - md5sum: ceed15c0bd64ff5c38d3816905933b0b + md5sum: 436d8e31285c6b588bdd1c7f1d07f6f2 + - path: output/gatk4/versions.yml +- name: gatk4 splitncigarreads test_gatk4_splitncigarreads_intervals + command: nextflow run tests/modules/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads_intervals -c tests/config/nextflow.config + tags: + - gatk4 + - gatk4/splitncigarreads + files: + - path: output/gatk4/test.bam + md5sum: cd56e3225950f519fd47164cca60a0bb - path: output/gatk4/versions.yml diff --git a/tests/modules/happy/happy/main.nf b/tests/modules/happy/happy/main.nf new file mode 100644 index 00000000..515a657b --- /dev/null +++ b/tests/modules/happy/happy/main.nf @@ -0,0 +1,39 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_HAPPY } from '../../../../modules/happy/happy/main.nf' + +workflow test_happy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_HAPPY ( input, fasta ) +} + +workflow test_happy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_HAPPY ( input, fasta ) +} diff --git a/tests/modules/happy/happy/nextflow.config b/tests/modules/happy/happy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/happy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/happy/test.yml b/tests/modules/happy/happy/test.yml new file mode 100644 index 00000000..89a1f012 --- /dev/null +++ b/tests/modules/happy/happy/test.yml @@ -0,0 +1,27 @@ +- name: happy happy test_happy_vcf + command: nextflow run tests/modules/happy/happy -entry test_happy_vcf -c tests/config/nextflow.config + tags: + - happy + - happy/happy + files: + - path: output/happy/test.extended.csv + md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 + - path: output/happy/test.runinfo.json + - path: output/happy/test.summary.csv + md5sum: f8aa5d36d3c48dede2f607fd565894ad + - path: output/happy/versions.yml + md5sum: 82243bf6dbdc71aa63211ee2a89f47f2 + +- name: happy happy test_happy_gvcf + command: nextflow run tests/modules/happy/happy -entry test_happy_gvcf -c tests/config/nextflow.config + tags: + - happy + - happy/happy + files: + - path: output/happy/test.extended.csv + md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 + - path: output/happy/test.runinfo.json + - path: output/happy/test.summary.csv + md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 + - path: output/happy/versions.yml + md5sum: 551fa216952d6f5de78e6e453b92aaab diff --git a/tests/modules/happy/prepy/main.nf b/tests/modules/happy/prepy/main.nf new file mode 100644 index 00000000..0b511104 --- /dev/null +++ b/tests/modules/happy/prepy/main.nf @@ -0,0 +1,37 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_PREPY } from '../../../../modules/happy/prepy/main.nf' + +workflow test_happy_prepy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} + +workflow test_happy_prepy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} diff --git a/tests/modules/happy/prepy/nextflow.config b/tests/modules/happy/prepy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/prepy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/happy/prepy/test.yml b/tests/modules/happy/prepy/test.yml new file mode 100644 index 00000000..a0a45c38 --- /dev/null +++ b/tests/modules/happy/prepy/test.yml @@ -0,0 +1,19 @@ +- name: happy prepy test_happy_prepy_vcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_vcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 814d20f1f29f23a3d21012748a5d6393 + +- name: happy prepy test_happy_prepy_gvcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_gvcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 970a54de46e68ef6d5228a26eaa4c8e7 diff --git a/tests/modules/kaiju/kaiju2table/main.nf b/tests/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..b7169ba5 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf' +include { KAIJU_KAIJU2TABLE } from '../../../../modules/kaiju/kaiju2table/main.nf' + +workflow test_kaiju_kaiju_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ] + taxon_rank = "species" + + ch_db = UNTAR ( db ) + KAIJU_KAIJU ( input, ch_db.untar.map{ it[1] } ) + KAIJU_KAIJU2TABLE ( KAIJU_KAIJU.out.results, ch_db.untar.map{ it[1] }, taxon_rank ) +} diff --git a/tests/modules/kaiju/kaiju2table/nextflow.config b/tests/modules/kaiju/kaiju2table/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/kaiju/kaiju2table/test.yml b/tests/modules/kaiju/kaiju2table/test.yml new file mode 100644 index 00000000..47d99c89 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/test.yml @@ -0,0 +1,9 @@ +- name: kaiju kaiju2table test_kaiju_kaiju_single_end + command: nextflow run tests/modules/kaiju/kaiju2table -entry test_kaiju_kaiju_single_end -c tests/config/nextflow.config + tags: + - kaiju + - kaiju/kaiju2table + files: + - path: output/kaiju/test.txt + md5sum: 0d9f8fd36fcf2888296ae12632c5f0a8 + - path: output/kaiju/versions.yml diff --git a/tests/modules/kraken2/kraken2/main.nf b/tests/modules/kraken2/kraken2/main.nf index 94f4db95..4a3593e4 100644 --- a/tests/modules/kraken2/kraken2/main.nf +++ b/tests/modules/kraken2/kraken2/main.nf @@ -12,7 +12,7 @@ workflow test_kraken2_kraken2_single_end { db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] } ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) } workflow test_kraken2_kraken2_paired_end { @@ -23,5 +23,15 @@ workflow test_kraken2_kraken2_paired_end { db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] } ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) +} + +workflow test_kraken2_kraken2_classifyreads { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, true ) } diff --git a/tests/modules/kraken2/kraken2/test.yml b/tests/modules/kraken2/kraken2/test.yml index 1ec413bf..af1e6e0d 100644 --- a/tests/modules/kraken2/kraken2/test.yml +++ b/tests/modules/kraken2/kraken2/test.yml @@ -1,29 +1,43 @@ -- name: kraken2 kraken2 single-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_single_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 6e3ad947ac8dee841a89216071c181cc + - path: output/untar/versions.yml -- name: kraken2 kraken2 paired-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_paired_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified_1.fastq.gz - should_exist: true - path: output/kraken2/test.classified_2.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_1.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_2.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified_1.fastq.gz + - path: output/kraken2/test.unclassified_2.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 604482fe7a4519f890fae9c8beb1bd6e + - path: output/untar/versions.yml + +- name: kraken2 kraken2 test_kraken2_kraken2_classifyreads + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_classifyreads -c tests/config/nextflow.config + tags: + - kraken2 + - kraken2/kraken2 + files: + - path: output/kraken2/test.kraken2.classifiedreads.txt + md5sum: e7a90531f0d8d777316515c36fe4cae0 + - path: output/kraken2/test.kraken2.report.txt + md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/versions.yml + md5sum: 3488c304259e83c5bea573403293fce9 + - path: output/untar/versions.yml diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index a23e6fcb..7b39ee82 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,15 +2,27 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -workflow test_krona_ktimporttaxonomy { +workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) +} + +workflow test_krona_ktimporttaxonomy_report { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) + ] + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) + + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 8730f1c4..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,4 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: KRONA_KTIMPORTTAXONOMY_READS { + ext.args = '-t 3' + } + + withName: KRONA_KTIMPORTTAXONOMY_REPORT { + ext.args = '-m 3 -t 5' + } + } diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b7748980..ffcb5669 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,9 +1,23 @@ -- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy - command: nextflow run ./tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktimporttaxonomy/nextflow.config +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html contains: - "DOCTYPE html PUBLIC" + - path: output/krona/versions.yml + md5sum: 660a8c151191bf4c63bd96db2c7fe503 + +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttaxonomy + files: + - path: output/krona/taxonomy.krona.html + contains: + - "DOCTYPE html PUBLIC" + - path: output/krona/versions.yml + md5sum: 8a593c16bb2d4132638fb0fc342fe2b7 diff --git a/tests/modules/krona/ktimporttext/main.nf b/tests/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..3d288b7b --- /dev/null +++ b/tests/modules/krona/ktimporttext/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTIMPORTTEXT } from '../../../../modules/krona/ktimporttext/main.nf' + +workflow test_krona_ktimporttext_multi { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/ktimporttext.txt', checkIfExists: true), // krona default test file + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true), //Kraken2 report file + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/kaiju_out4krona.txt', checkIfExists: true) // Kaiju output 4 krona + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} + +workflow test_krona_ktimporttext_single { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('http://krona.sourceforge.net/examples/text.txt', checkIfExists: true) // krona default test file + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} diff --git a/tests/modules/krona/ktimporttext/nextflow.config b/tests/modules/krona/ktimporttext/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/krona/ktimporttext/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/krona/ktimporttext/test.yml b/tests/modules/krona/ktimporttext/test.yml new file mode 100644 index 00000000..93ae12da --- /dev/null +++ b/tests/modules/krona/ktimporttext/test.yml @@ -0,0 +1,19 @@ +- name: krona ktimporttext test_krona_ktimporttext_multi + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_multi -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" + +- name: krona ktimporttext test_krona_ktimporttext_single + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_single -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" diff --git a/tests/modules/krona/ktupdatetaxonomy/main.nf b/tests/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..d2d18f31 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTUPDATETAXONOMY } from '../../../../modules/krona/ktupdatetaxonomy/main.nf' + +workflow test_krona_ktupdatetaxonomy { + KRONA_KTUPDATETAXONOMY ( ) +} diff --git a/tests/modules/krona/ktupdatetaxonomy/nextflow.config b/tests/modules/krona/ktupdatetaxonomy/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/krona/ktupdatetaxonomy/test.yml b/tests/modules/krona/ktupdatetaxonomy/test.yml new file mode 100644 index 00000000..b50fe8f2 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/test.yml @@ -0,0 +1,7 @@ +- name: krona ktupdatetaxonomy test_krona_ktupdatetaxonomy + command: nextflow run ./tests/modules/krona/ktupdatetaxonomy -entry test_krona_ktupdatetaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktupdatetaxonomy/nextflow.config + tags: + - krona + - krona/ktupdatetaxonomy + files: + - path: output/krona/taxonomy/taxonomy.tab diff --git a/tests/modules/md5sum/main.nf b/tests/modules/md5sum/main.nf new file mode 100644 index 00000000..f90642b6 --- /dev/null +++ b/tests/modules/md5sum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MD5SUM } from '../../../modules/md5sum/main.nf' + +workflow test_md5sum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MD5SUM ( input ) +} diff --git a/tests/modules/md5sum/nextflow.config b/tests/modules/md5sum/nextflow.config new file mode 100644 index 00000000..0293c16f --- /dev/null +++ b/tests/modules/md5sum/nextflow.config @@ -0,0 +1,3 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } +} diff --git a/tests/modules/md5sum/test.yml b/tests/modules/md5sum/test.yml new file mode 100644 index 00000000..1e6517a7 --- /dev/null +++ b/tests/modules/md5sum/test.yml @@ -0,0 +1,8 @@ +- name: md5sum test_md5sum + command: nextflow run tests/modules/md5sum -entry test_md5sum -c tests/config/nextflow.config + tags: + - md5sum + files: + - path: output/md5sum/test.paired_end.bam.md5 + md5sum: 1163095be8fdfb2acb3cc6c027389c4b + - path: output/md5sum/versions.yml diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf new file mode 100644 index 00000000..3c9a64c7 --- /dev/null +++ b/tests/modules/meryl/count/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' + +workflow test_meryl_count_single_end { + + input = [ + [ id:'test' , single_end: true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) +} + +workflow test_meryl_count_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) + ] + ] + + MERYL_COUNT ( input ) +} diff --git a/tests/modules/meryl/count/nextflow.config b/tests/modules/meryl/count/nextflow.config new file mode 100644 index 00000000..6d899c50 --- /dev/null +++ b/tests/modules/meryl/count/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + +} diff --git a/tests/modules/meryl/count/test.yml b/tests/modules/meryl/count/test.yml new file mode 100644 index 00000000..6291a62f --- /dev/null +++ b/tests/modules/meryl/count/test.yml @@ -0,0 +1,17 @@ +- name: meryl count test_meryl_count_single_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 5fe537d873925ccbcc4edf0983e9eda0 + +- name: meryl count test_meryl_count_paired_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_paired_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 4961f13cfb60ba8764ed666e70dbf12c diff --git a/tests/modules/minimap2/align/main.nf b/tests/modules/minimap2/align/main.nf index e507d3e5..ee6c0838 100644 --- a/tests/modules/minimap2/align/main.nf +++ b/tests/modules/minimap2/align/main.nf @@ -9,8 +9,11 @@ workflow test_minimap2_align_single_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam) } workflow test_minimap2_align_paired_end { @@ -19,6 +22,9 @@ workflow test_minimap2_align_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam ) } diff --git a/tests/modules/minimap2/align/test.yml b/tests/modules/minimap2/align/test.yml index 73dd73e2..c392e313 100644 --- a/tests/modules/minimap2/align/test.yml +++ b/tests/modules/minimap2/align/test.yml @@ -1,17 +1,17 @@ -- name: minimap2 align single-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_single_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_single_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 70e8cf299ee3ecd33e629d10c1f588ce + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml -- name: minimap2 align paired-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_paired_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28 + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml diff --git a/tests/modules/motus/downloaddb/main.nf b/tests/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..f7680ca9 --- /dev/null +++ b/tests/modules/motus/downloaddb/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf' + +workflow test_motus_downloaddb { + + input = file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py') + + MOTUS_DOWNLOADDB ( input ) +} diff --git a/tests/modules/motus/downloaddb/nextflow.config b/tests/modules/motus/downloaddb/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/motus/downloaddb/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml new file mode 100644 index 00000000..e61f937f --- /dev/null +++ b/tests/modules/motus/downloaddb/test.yml @@ -0,0 +1,7 @@ +- name: motus downloaddb test_motus_downloaddb + command: nextflow run tests/modules/motus/downloaddb -entry test_motus_downloaddb -c tests/config/nextflow.config + tags: + - motus + - motus/downloaddb + files: + - path: output/motus/db_mOTU/db_mOTU_versions diff --git a/tests/modules/picard/addorreplacereadgroups/test.yml b/tests/modules/picard/addorreplacereadgroups/test.yml index aa1536bb..6ee81737 100644 --- a/tests/modules/picard/addorreplacereadgroups/test.yml +++ b/tests/modules/picard/addorreplacereadgroups/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 7b82f3461c2d80fc6a10385e78c9427f - path: output/picard/versions.yml - md5sum: 8a2d176295e1343146ea433c79bb517f diff --git a/tests/modules/picard/cleansam/test.yml b/tests/modules/picard/cleansam/test.yml index 3b235d07..08dcd84d 100644 --- a/tests/modules/picard/cleansam/test.yml +++ b/tests/modules/picard/cleansam/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: a48f8e77a1480445efc57570c3a38a68 - path: output/picard/versions.yml - md5sum: e6457d7c6de51bf6f4b577eda65e57ac diff --git a/tests/modules/picard/collecthsmetrics/main.nf b/tests/modules/picard/collecthsmetrics/main.nf index 2e8727b5..a28eb174 100644 --- a/tests/modules/picard/collecthsmetrics/main.nf +++ b/tests/modules/picard/collecthsmetrics/main.nf @@ -7,7 +7,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../../modules/picard/collecthsme workflow test_picard_collecthsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/picard/collecthsmetrics/test.yml b/tests/modules/picard/collecthsmetrics/test.yml index 9232d508..9aa14f15 100644 --- a/tests/modules/picard/collecthsmetrics/test.yml +++ b/tests/modules/picard/collecthsmetrics/test.yml @@ -5,4 +5,4 @@ - picard/collecthsmetrics files: # The file can't be md5'd consistently - - path: output/picard/test_collecthsmetrics.txt + - path: output/picard/test.CollectHsMetrics.coverage_metrics diff --git a/tests/modules/picard/collectwgsmetrics/main.nf b/tests/modules/picard/collectwgsmetrics/main.nf index 1d75a2bd..eddf5603 100644 --- a/tests/modules/picard/collectwgsmetrics/main.nf +++ b/tests/modules/picard/collectwgsmetrics/main.nf @@ -6,8 +6,7 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../../modules/picard/collectwgs workflow test_picard_collectwgsmetrics { input = [ [ 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) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) diff --git a/tests/modules/picard/createsequencedictionary/test.yml b/tests/modules/picard/createsequencedictionary/test.yml index 2a43be41..59f2dd44 100644 --- a/tests/modules/picard/createsequencedictionary/test.yml +++ b/tests/modules/picard/createsequencedictionary/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.dict contains: ["SN:MT192765.1"] - path: output/picard/versions.yml - md5sum: b3d8c7ea65b8a6d3237b153d13fe2014 diff --git a/tests/modules/picard/fixmateinformation/test.yml b/tests/modules/picard/fixmateinformation/test.yml index f12f823b..f2f9c491 100644 --- a/tests/modules/picard/fixmateinformation/test.yml +++ b/tests/modules/picard/fixmateinformation/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 746102e8c242c0ef42e045c49d320030 - path: output/picard/versions.yml - md5sum: 4329ba7cdca8f4f6018dfd5c019ba2eb diff --git a/tests/modules/picard/liftovervcf/nextflow.config b/tests/modules/picard/liftovervcf/nextflow.config index e1581bb9..f69fc351 100644 --- a/tests/modules/picard/liftovervcf/nextflow.config +++ b/tests/modules/picard/liftovervcf/nextflow.config @@ -1,5 +1,5 @@ process { - ext.args = "WARN_ON_MISSING_CONTIG=true" + ext.args = "--WARN_ON_MISSING_CONTIG true" publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } diff --git a/tests/modules/picard/markduplicates/nextflow.config b/tests/modules/picard/markduplicates/nextflow.config index 9178c5b1..40d46110 100644 --- a/tests/modules/picard/markduplicates/nextflow.config +++ b/tests/modules/picard/markduplicates/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_MARKDUPLICATES_UNSORTED { - ext.args = 'ASSUME_SORT_ORDER=queryname' + ext.args = '--ASSUME_SORT_ORDER queryname' } } diff --git a/tests/modules/rsem/calculateexpression/test.yml b/tests/modules/rsem/calculateexpression/test.yml index f19c3398..b0251de9 100644 --- a/tests/modules/rsem/calculateexpression/test.yml +++ b/tests/modules/rsem/calculateexpression/test.yml @@ -42,7 +42,7 @@ - path: output/rsem/rsem/genome.transcripts.fa md5sum: 050c521a2719c2ae48267c1e65218f29 - path: output/rsem/rsem/genomeParameters.txt - md5sum: 2fe3a030e1706c3e8cd4df3818e6dd2f + md5sum: df5a456e3242520cc36e0083a6a7d9dd - path: output/rsem/rsem/sjdbInfo.txt md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 - path: output/rsem/rsem/sjdbList.fromGTF.out.tab @@ -63,4 +63,4 @@ - path: output/rsem/test.stat/test.theta md5sum: de2e4490c98cc5383a86ae8225fd0a28 - path: output/rsem/test.transcript.bam - md5sum: 7846491086c478858419667d60f18edd + md5sum: ed681d39f5700ffc74d6321525330d93 diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 213c7a2d..4f9472e5 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,14 +1,15 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - samtools/bam2fq - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: d733e66d29a4b366bf9df8c42f845256 + - path: output/samtools/versions.yml + md5sum: 4973eac1b6a8f090d5fcd4456d65a894 - name: samtools bam2fq test_samtools_bam2fq_withsplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - samtools/bam2fq - samtools @@ -21,3 +22,5 @@ md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml + md5sum: e92d21bbcda2fed7cb438d95c51edff0 diff --git a/tests/modules/samtools/bamtocram/main.nf b/tests/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b1743310 --- /dev/null +++ b/tests/modules/samtools/bamtocram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_BAMTOCRAM } from '../../../../modules/samtools/bamtocram/main.nf' + +workflow test_samtools_bamtocram { + + input = [ [ 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)] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + SAMTOOLS_BAMTOCRAM ( input, fasta, fai ) +} \ No newline at end of file diff --git a/tests/modules/samtools/bamtocram/nextflow.config b/tests/modules/samtools/bamtocram/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/bamtocram/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/bamtocram/test.yml b/tests/modules/samtools/bamtocram/test.yml new file mode 100644 index 00000000..3cb82902 --- /dev/null +++ b/tests/modules/samtools/bamtocram/test.yml @@ -0,0 +1,9 @@ +- name: samtools bamtocram test_samtools_bamtocram + command: nextflow run ./tests/modules/samtools/bamtocram -entry test_samtools_bamtocram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bamtocram/nextflow.config + tags: + - samtools/bamtocram + - samtools + files: + - path: output/samtools/test.cram + - path: output/samtools/test.cram.crai + - path: output/samtools/versions.yml diff --git a/tests/modules/samtools/collatefastq/main.nf b/tests/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..928742ac --- /dev/null +++ b/tests/modules/samtools/collatefastq/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_COLLATEFASTQ } from '../../../../modules/samtools/collatefastq/main.nf' + +workflow test_samtools_collatefastq { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SAMTOOLS_COLLATEFASTQ ( input ) +} diff --git a/tests/modules/samtools/collatefastq/nextflow.config b/tests/modules/samtools/collatefastq/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/collatefastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/collatefastq/test.yml b/tests/modules/samtools/collatefastq/test.yml new file mode 100644 index 00000000..2b001885 --- /dev/null +++ b/tests/modules/samtools/collatefastq/test.yml @@ -0,0 +1,14 @@ +- name: samtools fastq test_samtools_collatefastq + command: nextflow run ./tests/modules/samtools/collatefastq -entry test_samtools_collatefastq -c ./tests/config/nextflow.config -c ./tests/modules/samtools/collatefastq/nextflow.config + tags: + - samtools + - samtools/collatefastq + files: + - path: output/samtools/test_1.fq.gz + md5sum: 829732de4e937edca90f27b07e5b501a + - path: output/samtools/test_2.fq.gz + md5sum: ef27d3809e495620fd93df894280c03a + - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 8ee27ef8..0e3f597e 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -6,7 +6,8 @@ include { SAMTOOLS_VIEW } from '../../../../modules/samtools/view/main.nf' workflow test_samtools_view { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] ] SAMTOOLS_VIEW ( input, [] ) @@ -14,10 +15,19 @@ workflow test_samtools_view { workflow test_samtools_view_cram { input = [ [ id: 'test' ], // 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) + 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) ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) SAMTOOLS_VIEW ( input, fasta ) } + +workflow test_samtools_view_stubs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] + ] + + SAMTOOLS_VIEW ( input, [] ) +} diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 1287d455..f3ad4552 100644 --- a/tests/modules/samtools/view/test.yml +++ b/tests/modules/samtools/view/test.yml @@ -14,3 +14,11 @@ - samtools files: - path: output/samtools/test.cram + +- name: samtools view test_samtools_view_stubs + command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view_stubs -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run + tags: + - samtools/view + - samtools + files: + - path: output/samtools/test.bam diff --git a/tests/modules/shasum/main.nf b/tests/modules/shasum/main.nf new file mode 100644 index 00000000..817ea6f0 --- /dev/null +++ b/tests/modules/shasum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHASUM } from '../../../modules/shasum/main.nf' + +workflow test_shasum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SHASUM ( input ) +} diff --git a/tests/modules/shasum/nextflow.config b/tests/modules/shasum/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shasum/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/shasum/test.yml b/tests/modules/shasum/test.yml new file mode 100644 index 00000000..6778d156 --- /dev/null +++ b/tests/modules/shasum/test.yml @@ -0,0 +1,8 @@ +- name: shasum test_shasum + command: nextflow run tests/modules/shasum -entry test_shasum -c tests/config/nextflow.config + tags: + - shasum + files: + - path: output/shasum/test.paired_end.bam.sha256 + md5sum: 138a19e100f09fc975ea1b717da9b6dd + - path: output/shasum/versions.yml diff --git a/tests/modules/shigatyper/main.nf b/tests/modules/shigatyper/main.nf new file mode 100644 index 00000000..eb4df084 --- /dev/null +++ b/tests/modules/shigatyper/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHIGATYPER } from '../../../modules/shigatyper/main.nf' + +workflow test_shigatyper_pe { + + input = [ + [ id:'test', single_end:false, is_ont: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) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_se { + + input = [ + [ id:'test', single_end:true, is_ont:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_ont { + + input = [ + [ id:'test', single_end:true, is_ont:true ], // meta map + [ file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} diff --git a/tests/modules/shigatyper/nextflow.config b/tests/modules/shigatyper/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shigatyper/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/shigatyper/test.yml b/tests/modules/shigatyper/test.yml new file mode 100644 index 00000000..9dda573b --- /dev/null +++ b/tests/modules/shigatyper/test.yml @@ -0,0 +1,29 @@ +- name: shigatyper test_shigatyper_pe + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_pe -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: d8ca45ed88dfba9bc570c01e4b49773b + +- name: shigatyper test_shigatyper_se + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_se -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 8bbf165da5a5df3b7771a33aad197eec + +- name: shigatyper test_shigatyper_ont + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_ont -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 0da333e1178e9e7e84a9116ad5a5ff71 diff --git a/tests/modules/slimfastq/main.nf b/tests/modules/slimfastq/main.nf new file mode 100644 index 00000000..40d44285 --- /dev/null +++ b/tests/modules/slimfastq/main.nf @@ -0,0 +1,46 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SLIMFASTQ } from '../../../modules/slimfastq/main.nf' + +workflow test_slimfastq_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_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)] + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_nanopore { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_pacbio { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['homo_sapiens']['pacbio']['ccs_fq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} diff --git a/tests/modules/slimfastq/nextflow.config b/tests/modules/slimfastq/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/slimfastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/slimfastq/test.yml b/tests/modules/slimfastq/test.yml new file mode 100644 index 00000000..f0d8b446 --- /dev/null +++ b/tests/modules/slimfastq/test.yml @@ -0,0 +1,41 @@ +- name: slimfastq test_slimfastq_single_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_single_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/versions.yml + md5sum: f52351f5c9e6259af02745c8eae5c780 + +- name: slimfastq test_slimfastq_paired_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_paired_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test_1.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/test_2.sfq + md5sum: 0d2c60b52a39f7c2cb7843e848d90afd + - path: output/slimfastq/versions.yml + md5sum: 6239853705877651a4851c4cb6d62da4 + +- name: slimfastq test_slimfastq_nanopore + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_nanopore -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: e17f14d64d3a75356b03ff2f9e8881f7 + - path: output/slimfastq/versions.yml + md5sum: 33153f1103482a2bd35cb2f4c337c5e8 + +- name: slimfastq test_slimfastq_pacbio + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_pacbio -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 9e8389e47e6ddf8c25e92412dd628339 + - path: output/slimfastq/versions.yml + md5sum: 1982789c3d5c7de37c0a9351e4ae63f7 diff --git a/tests/modules/snapaligner/align/main.nf b/tests/modules/snapaligner/align/main.nf new file mode 100644 index 00000000..4f5943fe --- /dev/null +++ b/tests/modules/snapaligner/align/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/align/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/align/main.nf' + +workflow test_snapaligner_single { + + input = [ + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_SINGLE ( input, SNAPALIGNER_INDEX.out.index ) +} + +workflow test_snapaligner_paired { + + 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)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_PAIRED ( input, SNAPALIGNER_INDEX.out.index ) +} diff --git a/tests/modules/snapaligner/align/nextflow.config b/tests/modules/snapaligner/align/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/snapaligner/align/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/snapaligner/align/test.yml b/tests/modules/snapaligner/align/test.yml new file mode 100644 index 00000000..4e4fae61 --- /dev/null +++ b/tests/modules/snapaligner/align/test.yml @@ -0,0 +1,19 @@ +- name: snapaligner align test_snapaligner_single + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_single -c tests/config/nextflow.config + tags: + - snapaligner/align + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: 5d95594e4ef1ee23ce56e6a7cb64f0f2 + - path: output/snapaligner/versions.yml + +- name: snapaligner align test_snapaligner_paired + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_paired -c tests/config/nextflow.config + tags: + - snapaligner/align + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: a1405da5876f15dbe8a81516b94c2a15 + - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/paired/main.nf b/tests/modules/snapaligner/paired/main.nf deleted file mode 100644 index b25ca8c2..00000000 --- a/tests/modules/snapaligner/paired/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' -include { SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/paired/main.nf' - -workflow test_snapaligner_paired { - - 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)] - ] - - SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) - SNAPALIGNER_PAIRED ( input, SNAPALIGNER_INDEX.out.index ) -} diff --git a/tests/modules/snapaligner/paired/test.yml b/tests/modules/snapaligner/paired/test.yml deleted file mode 100644 index 7df1e02b..00000000 --- a/tests/modules/snapaligner/paired/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: snapaligner paired test_snapaligner_paired - command: nextflow run tests/modules/snapaligner/paired -entry test_snapaligner_paired -c tests/config/nextflow.config - tags: - - snapaligner - - snapaligner/paired - files: - - path: output/snapaligner/test.bam - md5sum: 2ac92e9539fa246dd6db52b5de56fca5 - - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/single/main.nf b/tests/modules/snapaligner/single/main.nf deleted file mode 100644 index 616e517a..00000000 --- a/tests/modules/snapaligner/single/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' -include { SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/single/main.nf' - -workflow test_snapaligner_single { - - input = [ - [ id:'test', single_end:false ], // meta map - [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] - ] - - SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) - SNAPALIGNER_SINGLE ( input, SNAPALIGNER_INDEX.out.index ) -} diff --git a/tests/modules/snapaligner/single/test.yml b/tests/modules/snapaligner/single/test.yml deleted file mode 100644 index bbcbba1f..00000000 --- a/tests/modules/snapaligner/single/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: snapaligner single test_snapaligner_single - command: nextflow run tests/modules/snapaligner/single -entry test_snapaligner_single -c tests/config/nextflow.config - tags: - - snapaligner/single - - snapaligner - files: - - path: output/snapaligner/test.bam - md5sum: 696f7ea8e1aa5f9d7dafb9d0134fe25d - - path: output/snapaligner/versions.yml diff --git a/tests/modules/srst2/srst2/main.nf b/tests/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..7d51937b --- /dev/null +++ b/tests/modules/srst2/srst2/main.nf @@ -0,0 +1,53 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SRST2_SRST2 } from '../../../../modules/srst2/srst2/main.nf' + +workflow test_srst2_srst2_exit { + + input = [ + [ id:'test', single_end:false, db:"test"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], +// [("")] + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_mlst { + + input = [ + [ id:'test', single_end:false, db:"mlst"], // meta map + [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_1.fastq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_2.fastq.gz", checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/MLST_DB.fas') + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_paired_end { + + input = [ + [ id:'test', single_end:false, db:"gene"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_single_end { + + input = [ + [ id:'test', single_end:true, db:"gene" ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} diff --git a/tests/modules/srst2/srst2/nextflow.config b/tests/modules/srst2/srst2/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/srst2/srst2/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml new file mode 100644 index 00000000..f7621f4f --- /dev/null +++ b/tests/modules/srst2/srst2/test.yml @@ -0,0 +1,51 @@ +- name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_exit -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + exit_code: 1 + +- name: srst2 srst2 test_srst2_srst2_mlst + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_mlst -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__SRR9067271.MLST_DB.pileup + contains: + - "dnaJ-1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" + - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam + - path: output/srst2/test__mlst__MLST_DB__results.txt + md5sum: ec1b1f69933401d67c57f64cad11a098 + - path: output/srst2/versions.yml + md5sum: a0c256a2fd3636069710b8ef22ee5ea7 + +- name: srst2 srst2 test_srst2_srst2_paired_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_paired_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: 099aa6cacec5524b311f606debdfb3a9 + - path: output/srst2/test__test1.resFinder_20180221_srst2.pileup + md5sum: 64b512ff495b828c456405ec7b676ad1 + - path: output/srst2/test__test1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml + md5sum: b446a70f1a2b4f60757829bcd744a214 + +- name: srst2 srst2 test_srst2_srst2_single_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_single_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt + md5sum: d0762ef8c38afd0e0a34cce52ed1a3db + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: b8850c6644406d8b131e471ecc3f9013 + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.pileup + md5sum: 5f6279dc8124aa762a9dfe3d7a871277 + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml + md5sum: 790fe00493c6634d17801a930073218b diff --git a/tests/modules/stranger/main.nf b/tests/modules/stranger/main.nf index bc4bd3ce..4a930c19 100644 --- a/tests/modules/stranger/main.nf +++ b/tests/modules/stranger/main.nf @@ -5,15 +5,26 @@ nextflow.enable.dsl = 2 include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf' include { STRANGER } from '../../../modules/stranger/main.nf' + +input = [ [ id:'test', gender:'male' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + ] +fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) +variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) + + workflow test_stranger { - - input = [ [ id:'test', gender:'male' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) - EXPANSIONHUNTER ( input, fasta, variant_catalog ) - STRANGER ( EXPANSIONHUNTER.out.vcf ) + STRANGER ( EXPANSIONHUNTER.out.vcf, variant_catalog ) +} + +workflow test_stranger_without_optional_variant_catalog { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) +} + +workflow test_stranger_without_optional_variant_catalog_stubs { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) } diff --git a/tests/modules/stranger/test.yml b/tests/modules/stranger/test.yml index 821928e8..bf922c86 100644 --- a/tests/modules/stranger/test.yml +++ b/tests/modules/stranger/test.yml @@ -8,6 +8,30 @@ - path: output/expansionhunter/versions.yml md5sum: f3962a6eecfddf9682414c0f605a885a - path: output/stranger/test.vcf.gz - md5sum: bbe15159195681d5c18596d3ad85c78f + md5sum: 68b0ca1319851134ffa8793a4704dc11 - path: output/stranger/versions.yml md5sum: 5ec35fd835fb1be50bc3e7c004310fc0 + +- name: stranger test_stranger_without_optional_variant_catalog + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76 + - path: output/expansionhunter/versions.yml + md5sum: c95af9e6d8cd9bd2ce1090ca4e7a6020 + - path: output/stranger/test.vcf.gz + md5sum: bbe15159195681d5c18596d3ad85c78f + - path: output/stranger/versions.yml + md5sum: 8558542a007e90ea5dcdceed3f12585d + +- name: stranger test_stranger_without_optional_variant_catalog_stubs + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config -stub-run + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + - path: output/expansionhunter/versions.yml + - path: output/stranger/test.vcf.gz + - path: output/stranger/versions.yml diff --git a/tests/modules/stringtie/merge/main.nf b/tests/modules/stringtie/merge/main.nf index 7851e755..3fe32902 100644 --- a/tests/modules/stringtie/merge/main.nf +++ b/tests/modules/stringtie/merge/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' -include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' /* * Test with forward strandedness @@ -15,8 +15,8 @@ workflow test_stringtie_forward_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } @@ -35,8 +35,8 @@ workflow test_stringtie_reverse_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } diff --git a/tests/modules/stringtie/merge/test.yml b/tests/modules/stringtie/merge/test.yml index 392a1d7c..fca66447 100644 --- a/tests/modules/stringtie/merge/test.yml +++ b/tests/modules/stringtie/merge/test.yml @@ -5,7 +5,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: 9fab7049ef2eafdea246fc787d1def40 + md5sum: d959eb2fab0db48ded7275e0a2e83c05 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -17,11 +17,10 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 9708811bcefe0f6384293d6f419f3250 + md5sum: 8bcd8e2730ed3337e2730186dbc184f3 - path: output/stringtie/test.transcripts.gtf - md5sum: 0e42709bfe30c2c7f2574ba664f5fa9f + md5sum: a914bd55b68a4b5f607738b17861e362 - name: stringtie merge test_stringtie_reverse_merge command: nextflow run ./tests/modules/stringtie/merge -entry test_stringtie_reverse_merge -c ./tests/config/nextflow.config -c ./tests/modules/stringtie/merge/nextflow.config @@ -30,7 +29,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: afc461bb3cbc368f268a7a45c1b54497 + md5sum: 6da479298d73d5b3216d4e1576a2bdf4 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -42,8 +41,7 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 94b85145d60ab1b80a7f0f6cf08418b0 + md5sum: f289f41b3ba1b9f0aa05d14408f1a5da - path: output/stringtie/test.transcripts.gtf - md5sum: 3196e3d50fd461aae6408e0a70acae68 + md5sum: 9dcdc9577c0fdbb25089eda210267546 diff --git a/tests/modules/stringtie/stringtie/main.nf b/tests/modules/stringtie/stringtie/main.nf index ae6abe67..463e4b98 100644 --- a/tests/modules/stringtie/stringtie/main.nf +++ b/tests/modules/stringtie/stringtie/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' // // Test with forward strandedness // @@ -13,7 +13,7 @@ workflow test_stringtie_forward { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } // @@ -26,5 +26,5 @@ workflow test_stringtie_reverse { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } diff --git a/tests/modules/stringtie/stringtie/test.yml b/tests/modules/stringtie/stringtie/test.yml index 732b9fd1..2815ba81 100644 --- a/tests/modules/stringtie/stringtie/test.yml +++ b/tests/modules/stringtie/stringtie/test.yml @@ -8,7 +8,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7d8bce7f2a922e367cedccae7267c22e - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 6b4cf69bc03f3f69890f972a0e8b7471 - path: ./output/stringtie/test.ballgown/i_data.ctab @@ -30,7 +29,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7385b870b955dae2c2ab78a70cf05cce - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 879b6696029d19c4737b562e9d149218 - path: ./output/stringtie/test.ballgown/i_data.ctab diff --git a/tests/modules/tabix/bgzip/main.nf b/tests/modules/tabix/bgzip/main.nf index 4d349890..4e326d64 100644 --- a/tests/modules/tabix/bgzip/main.nf +++ b/tests/modules/tabix/bgzip/main.nf @@ -4,10 +4,18 @@ nextflow.enable.dsl = 2 include { TABIX_BGZIP } from '../../../../modules/tabix/bgzip/main.nf' -workflow test_tabix_bgzip { +workflow test_tabix_bgzip_compress { input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] ] TABIX_BGZIP ( input ) } + +workflow test_tabix_bgzip_decompress { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['test_bed_gz'], checkIfExists: true) ] + ] + + TABIX_BGZIP ( input ) +} diff --git a/tests/modules/tabix/bgzip/test.yml b/tests/modules/tabix/bgzip/test.yml index 19357655..72819c90 100644 --- a/tests/modules/tabix/bgzip/test.yml +++ b/tests/modules/tabix/bgzip/test.yml @@ -1,8 +1,16 @@ -- name: tabix bgzip - command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config +- name: tabix bgzip compress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_compress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config tags: - tabix - tabix/bgzip files: - path: ./output/tabix/test.vcf.gz md5sum: fc178eb342a91dc0d1d568601ad8f8e2 +- name: tabix bgzip decompress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_decompress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config + tags: + - tabix + - tabix/bgzip + files: + - path: ./output/tabix/test.bed + md5sum: fe4053cf4de3aebbdfc3be2efb125a74 diff --git a/tests/modules/tabix/tabix/main.nf b/tests/modules/tabix/tabix/main.nf index 993ee812..da26f4d7 100644 --- a/tests/modules/tabix/tabix/main.nf +++ b/tests/modules/tabix/tabix/main.nf @@ -2,9 +2,10 @@ nextflow.enable.dsl = 2 -include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_VCF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_TBI } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_CSI } from '../../../../modules/tabix/tabix/main.nf' workflow test_tabix_tabix_bed { input = [ [ id:'B.bed' ], // meta map @@ -22,10 +23,18 @@ workflow test_tabix_tabix_gff { TABIX_GFF ( input ) } -workflow test_tabix_tabix_vcf { +workflow test_tabix_tabix_vcf_tbi { input = [ [ id:'test.vcf' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] ] - TABIX_VCF ( input ) + TABIX_VCF_TBI ( input ) +} + +workflow test_tabix_tabix_vcf_csi { + input = [ [ id:'test.vcf' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + ] + + TABIX_VCF_CSI ( input ) } diff --git a/tests/modules/tabix/tabix/nextflow.config b/tests/modules/tabix/tabix/nextflow.config index aa97a873..139e0865 100644 --- a/tests/modules/tabix/tabix/nextflow.config +++ b/tests/modules/tabix/tabix/nextflow.config @@ -10,8 +10,12 @@ process { ext.args = '-p gff' } - withName: TABIX_VCF { + withName: TABIX_VCF_TBI { ext.args = '-p vcf' } + withName: TABIX_VCF_CSI { + ext.args = '-p vcf --csi' + } + } diff --git a/tests/modules/tabix/tabix/test.yml b/tests/modules/tabix/tabix/test.yml index 46be28dd..6d168ef5 100644 --- a/tests/modules/tabix/tabix/test.yml +++ b/tests/modules/tabix/tabix/test.yml @@ -15,10 +15,18 @@ - path: ./output/tabix/genome.gff3.gz.tbi md5sum: f79a67d95a98076e04fbe0455d825926 - name: tabix tabix vcf - command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_tbi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config tags: - tabix - tabix/tabix files: - path: output/tabix/test.vcf.gz.tbi md5sum: 36e11bf96ed0af4a92caa91a68612d64 +- name: tabix tabix vcf csi + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_csi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + tags: + - tabix + - tabix/tabix + files: + - path: output/tabix/test.vcf.gz.csi + md5sum: 5f930522d2b9dcdba2807b7da4dfa3fd diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 168d21c5..40ea5b4d 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -9,6 +9,7 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: bdce14ae8292bf3deb81f6f255baf859 - name: tiddit sv no ref command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config @@ -21,3 +22,4 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: 3d0e83a8199b2bdb81cfe3e6b12bf64b diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf new file mode 100644 index 00000000..e29490f3 --- /dev/null +++ b/tests/modules/vardictjava/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' + +workflow test_vardictjava { + + bam_input_ch = Channel.value([ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ]) + + reference = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + VARDICTJAVA ( bam_input_ch, reference ) +} diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/vardictjava/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml new file mode 100644 index 00000000..8cb29c4e --- /dev/null +++ b/tests/modules/vardictjava/test.yml @@ -0,0 +1,9 @@ +- name: vardictjava test_vardictjava + command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config + tags: + - vardictjava + files: + - path: output/vardictjava/test.vcf.gz + md5sum: 3f1f227afc532bddeb58f16fd3013fc8 + - path: output/vardictjava/versions.yml + md5sum: 9b62c431a4f2680412b61c7071bdb1cd diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf similarity index 69% rename from tests/subworkflows/nf-core/annotation_ensemblvep/main.nf rename to tests/subworkflows/nf-core/annotation/ensemblvep/main.nf index 0f00c62e..2c599671 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main' +include { ANNOTATION_ENSEMBLVEP } from '../../../../../subworkflows/nf-core/annotation/ensemblvep/main' workflow annotation_ensemblvep { input = [ @@ -10,5 +10,5 @@ workflow annotation_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config rename to tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config index 4e8d2990..806adb58 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_VEP.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/test.yml b/tests/subworkflows/nf-core/annotation/ensemblvep/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_ensemblvep/test.yml rename to tests/subworkflows/nf-core/annotation/ensemblvep/test.yml diff --git a/tests/subworkflows/nf-core/annotation_snpeff/main.nf b/tests/subworkflows/nf-core/annotation/snpeff/main.nf similarity index 74% rename from tests/subworkflows/nf-core/annotation_snpeff/main.nf rename to tests/subworkflows/nf-core/annotation/snpeff/main.nf index c80197ee..bb56b46b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/main.nf +++ b/tests/subworkflows/nf-core/annotation/snpeff/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main' +include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation/snpeff/main' workflow annotation_snpeff { input = [ diff --git a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_snpeff/nextflow.config rename to tests/subworkflows/nf-core/annotation/snpeff/nextflow.config index be76cb4a..31fd635b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_snpEff.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_snpeff/test.yml b/tests/subworkflows/nf-core/annotation/snpeff/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_snpeff/test.yml rename to tests/subworkflows/nf-core/annotation/snpeff/test.yml diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..a3e2ed62 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/main' addParams([:]) + +workflow test_bam_qc_picard_wgs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + BAM_QC_PICARD ( input, fasta, fasta_fai, [], [] ) +} + +workflow test_bam_qc_picard_targetted { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + + BAM_QC_PICARD ( input, fasta, fasta_fai, bait, target ) +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml new file mode 100644 index 00000000..7b0a6c2b --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -0,0 +1,33 @@ +- name: bam qc picard wgs + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_wgs -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collectwgsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectWgsMetrics.coverage_metrics + +- name: bam qc picard targetted + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_targetted -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collecthsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectHsMetrics.coverage_metrics