Repository to host tool-specific module files for the Nextflow DSL2 community!
Find a file
Harshil Patel 9d0cad583b
Change syntax from task.ext.suffix to tast.ext.prefix in all modules (#1110)
* Add comment line for consistency

* Remove all functions.nf

* Remove include functions.nf and publishDir options

* Replace options.args3 with task.ext.args3 - 3 modules

* Replace options.args3 with task.ext.args3 - 17 modules

* Replace {task.cpus} with task.cpus

* Replace off on off off off off off off off on off on off on off off off on off off off on on off off off on on off off off off off off off on off off off off on off on on off off off on on on on off off off on off on on off on on off off on on on off on on off on off off off off on off off off on off off on off on off off off on on off on off on off off on off off off on off off off on off off off off on off off off on on on off on on off off on off on on on off on on off on on on off off off off off on on off off on off off off off off on off off on on off on on off on off off off on off off off off on on off on off off on off off on off on off off off off off off off off on on off on off off off.args with

* Add def args = task.ext.args line to all modules in script section

* Replace options.args with args and args_list

* Initialise args2 and args3 properly

* Replace container syntax

* Revert container changes for cellranger/mkref

* Replace getProcessName in all modules

* Replace getSoftwareName in all modules

* Unify modules using VERSION variable

* Replae options.suffix with task.ext.suffix

* Remove NF version restriction for CI

* Bump NF version in README

* Replace task.process.tokenize logic with task.process

* Minor tweaks to unify syntax in tests main.nf

* Add a separate nextflow.config for each module

* Transfer remaining module options to nextflow.config

* Remove addParams from tests main.nf

* Remove TODO statements

* Use -c to import module specific config

* Bump NF version to 21.10.3

* Fix tests for artic/minion

* Fix broken publishDir syntax

* Standardise and fix obvious failing module tests

* Remove kronatools to krona

* Comment out tags in subworkflow test.yml

* Fix failing module tests

* Add consistent indentation to nextflow.config

* Comment out subworklow definitions

* Fix kallistobustools/ref

* Fix rmarkdownnotebook

* Fix jupyternotebook

* Quote task.process

* Add plink2/vcf to pytest_modules.yml

* Remove NF_CORE_MODULES_TEST from pytest CI

* Fix more tests

* Move bacteroides_fragilis to prokaryotes folder

* Fix cooler merge tests

* Fix kallistobustools/count tests

* Fix kallistobustools/ref tests

* Update test_10x_1_fastq_gz file for kallistobustools/count tests

* Fix bcftools/query tests

* Fix delly/call tests

* Fix cooler/zoomify tests

* Fix csvtk/split tests

* Fix gatk4/intervallisttools tests

* Fix gatk4/variantfiltration

* Fix pydamage/filter tests

* Fix test data for unicycler

* Fix gstama/collapse module

* Fix leehom tests

* Fix metaphlan3 tests

* Fix pairtools/select tests

* Update nextflow.config

* Update nextflow.config

* feat: update syntax

* Fix arriba tests

* Fix more failing tests

* Update test syntax

* Remove comments from tests nextflow.config

* Apply suggestions from code review

* Fix kallistobustools/count module

* Update dumpsoftwareversions module

* Update custom/dumpsoftwareversions

* Add args2 to untar module

* Update leftover modules

* Remove last remaining addParams

* Change syntax from task.ext.suffix to tast.ext.prefix

* Change nextflow.config in all tests to use ext.prefix instead of ext.suffix

Co-authored-by: JoseEspinosa <kadomu@gmail.com>
Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
Co-authored-by: MaxUlysse <max.u.garcia@gmail.com>
2021-12-02 12:39:55 +00:00
.github Update all modules to new NF DSL2 syntax (#1099) 2021-11-26 07:58:40 +00:00
docs/images feat: remove social preview image to use GitHub OpenGraph (#461) 2021-04-26 11:59:12 +01:00
modules Change syntax from task.ext.suffix to tast.ext.prefix in all modules (#1110) 2021-12-02 12:39:55 +00:00
subworkflows/nf-core use underscores in anchors and references (#1080) 2021-11-18 18:09:09 +00:00
tests Change syntax from task.ext.suffix to tast.ext.prefix in all modules (#1110) 2021-12-02 12:39:55 +00:00
.editorconfig Update .editorconfig 2020-06-15 16:47:42 +02:00
.gitattributes Fill out repo 2019-07-26 10:19:07 +01:00
.gitignore New module: isoseq3/cluster (#801) 2021-10-07 10:06:02 +01:00
.markdownlint.yml Update .markdownlint.yml 2021-02-17 01:15:21 +01:00
.nf-core.yml Add module: bamaligncleaner (#676) 2021-09-15 10:31:49 +02:00
LICENSE Fill out repo 2019-07-26 10:19:07 +01:00
main.nf feat: Add main.nf (#1077) 2021-11-16 14:49:57 +00:00
README.md Update all modules to new NF DSL2 syntax (#1099) 2021-11-26 07:58:40 +00:00

nf-core/modules

Nextflow run with conda run with docker run with singularity

GitHub Actions Coda Linting Get help on Slack

Follow on Twitter Watch on YouTube

THIS REPOSITORY IS UNDER ACTIVE DEVELOPMENT. SYNTAX, ORGANISATION AND LAYOUT MAY CHANGE WITHOUT NOTICE!

A repository for hosting Nextflow DSL2 module files containing tool-specific process definitions and their associated documentation.

Table of contents

Using existing modules

The module files hosted in this repository define a set of processes for software tools such as fastqc, bwa, samtools etc. This allows you to share and add common functionality across multiple pipelines in a modular fashion.

We have written a helper command in the nf-core/tools package that uses the GitHub API to obtain the relevant information for the module files present in the modules/ directory of this repository. This includes using git commit hashes to track changes for reproducibility purposes, and to download and install all of the relevant module files.

  1. Install the latest version of nf-core/tools (>=2.0)

  2. List the available modules:

    $ nf-core modules list remote
    
                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'
    
    nf-core/tools version 2.0
    
    INFO     Modules available from nf-core/modules (master):                       pipeline_modules.py:164
    
    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
    ┃ Module Name                    ┃
    ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
    │ bandage/image                  │
    │ bcftools/consensus             │
    │ bcftools/filter                │
    │ bcftools/isec                  │
    ..truncated..
    
  3. Install the module in your pipeline directory:

    $ nf-core modules install fastqc
    
                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'
    
    nf-core/tools version 2.0
    
    INFO     Installing fastqc                                                      pipeline_modules.py:213
    INFO     Downloaded 3 files to ./modules/nf-core/modules/fastqc                 pipeline_modules.py:236
    
  4. Import the module in your Nextflow script:

    #!/usr/bin/env nextflow
    
    nextflow.enable.dsl = 2
    
    include { FASTQC } from './modules/nf-core/modules/fastqc/main'
    
  5. Remove the module from the pipeline repository if required:

    $ nf-core modules remove fastqc
    
                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'
    
    nf-core/tools version 2.0
    
    INFO     Removing fastqc                                                        pipeline_modules.py:271
    INFO     Successfully removed fastqc                                            pipeline_modules.py:285
    
  6. Check that a locally installed nf-core module is up-to-date compared to the one hosted in this repo:

    $ nf-core modules lint fastqc
    
                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'
    
    nf-core/tools version 2.0
    
    INFO     Linting pipeline: .                                                    lint.py:104
    INFO     Linting module: fastqc                                                 lint.py:106
    
    ╭─────────────────────────────────────────────────────────────────────────────────╮
    │ [!] 1 Test Warning                                                              │
    ╰─────────────────────────────────────────────────────────────────────────────────╯
    ╭──────────────┬───────────────────────────────┬──────────────────────────────────╮
    │ Module name  │ Test message                  │ File path                        │
    ├──────────────┼───────────────────────────────┼──────────────────────────────────┤
    │ fastqc       │ Local copy of module outdated │ modules/nf-core/modules/fastqc/  │
    ╰──────────────┴────────────────────────────── ┴──────────────────────────────────╯
    ╭──────────────────────╮
    │ LINT RESULTS SUMMARY │
    ├──────────────────────┤
    │ [✔]  15 Tests Passed │
    │ [!]   1 Test Warning │
    │ [✗]   0 Test Failed  │
    ╰──────────────────────╯
    

Adding new modules

If you wish to contribute a new module, please see the documentation on the nf-core website.

Please be kind to our code reviewers and submit one pull request per module :)

Help

For further information or help, don't hesitate to get in touch on Slack #modules channel (you can join with this invite).

Citation

If you use the module files in this repository for your analysis please you can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.