Skip to content

cnr-ibba/nf-modules

Repository files navigation

cnr-ibba/nf-modules

Nextflow run with conda run with docker run with singularity GitHub Actions Coda Linting

A repository for hosting custom Nextflow DSL2 modules not hosted in nf-core/modules with 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.10)

  2. List the available modules:

    $ nf-core modules --git-remote https://github.com/cnr-ibba/nf-modules.git list remote
    
                                               ,--./,-.
               ___     __   __   __   ___     /,-._.--~\
         |\ | |__  __ /  ` /  \ |__) |__         }  {
         | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                               `._,._,'
    
         nf-core/tools version 2.11.dev0 - https://nf-co.re
    
    
    
     INFO     Modules available from https://github.com/cnr-ibba/nf-modules.git (master):
    
     ┏━━━━━━━━━━━━━━━━━━━━┓
     ┃ Module Name        ┃
     ┡━━━━━━━━━━━━━━━━━━━━┩
     │ bamaddrg           │
     │ bamtools/coverage  │
     │ freebayes/chunk    │
     │ freebayes/multi    │
     │ freebayes/single   │
     │ freebayes/splitbam │
     │ seqkit/rmdup       │
     └────────────────────┘
    
  3. Install the module in your pipeline directory:

    $ nf-core modules --git-remote https://github.com/cnr-ibba/nf-modules.git install freebayes/splitbam
    
                                              ,--./,-.
              ___     __   __   __   ___     /,-._.--~\
        |\ | |__  __ /  ` /  \ |__) |__         }  {
        | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                              `._,._,'
    
        nf-core/tools version 2.11.dev0 - https://nf-co.re
    
    
    INFO     Installing 'freebayes/splitbam'
    INFO     Use the following statement to include this module:
    
      include { FREEBAYES_SPLITBAM } from '../modules/cnr-ibba/freebayes/splitbam/main'
    
  4. Import the module in your Nextflow script (fix the path accordingly your project):

    #!/usr/bin/env nextflow
    
    nextflow.enable.dsl = 2
    
    include { FREEBAYES_SPLITBAM } from './modules/cnr-ibba/freebayes/splitbam/main'
  5. Remove the module from the pipeline repository if required:

    $ nf-core modules --git-remote https://github.com/cnr-ibba/nf-modules.git remove freebayes/splitbam
    
                                              ,--./,-.
              ___     __   __   __   ___     /,-._.--~\
        |\ | |__  __ /  ` /  \ |__) |__         }  {
        | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                              `._,._,'
    
        nf-core/tools version 2.11.dev0 - https://nf-co.re
    
    
    INFO     Removed files for 'freebayes/splitbam' and its dependencies 'freebayes/splitbam'.
  6. Check that a locally installed nf-core module is up-to-date compared to the one hosted in this repo:

    $ nf-core modules --git-remote https://github.com/cnr-ibba/nf-modules.git lint freebayes/splitbam
    
                                               ,--./,-.
               ___     __   __   __   ___     /,-._.--~\
         |\ | |__  __ /  ` /  \ |__) |__         }  {
         | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                               `._,._,'
    
         nf-core/tools version 2.11.dev0 - https://nf-co.re
    
    
    
     INFO     Linting pipeline: '.'
     INFO     Linting module: 'freebayes/splitbam'
     INFO     Found 6 inputs in modules/cnr-ibba/freebayes/splitbam/main.nf
     INFO     Found 3 outputs in modules/cnr-ibba/freebayes/splitbam/main.nf
    
    
     ╭─ [!] 4 Module Test Warnings ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
     │                     ╷                                              ╷                                                                                      │
     │ Module name         │ File path                                    │ Test message                                                                         │
     │╶────────────────────┼──────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────╴│
     │ freebayes/splitbam  │ modules/cnr-ibba/freebayes/splitbam/main.nf  │ Conda update: bioconda::freebayes 1.3.6 -> 1.3.7                                     │
     │ freebayes/splitbam  │ modules/cnr-ibba/freebayes/splitbam/main.nf  │ Unable to connect to container registry, code:  403, url:                            │
     │                     │                                              │ https://www.docker.com/bunop/freebayes:v0.1                                          │
     │ freebayes/splitbam  │ modules/cnr-ibba/freebayes/splitbam/main.nf  │ Container versions do not match                                                      │
     │ freebayes/splitbam  │ modules/cnr-ibba/freebayes/splitbam/meta.yml │ meta is present as an output in meta.yml but not in main.nf                          │
     │                     ╵                                              ╵                                                                                      │
     ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
     ╭───────────────────────╮
     │ LINT RESULTS SUMMARY  │
     ├───────────────────────┤
     │ [✔]  44 Tests Passed  │
     │ [!]   4 Test Warnings │
     │ [✗]   0 Tests Failed  │
     ╰───────────────────────╯

Adding new modules

If you wish to contribute a new module, cosider to contribute to the original nf-core/modules instead. Please see the documentation on the nf-core website.

Acknowledgment

This pipeline uses code and infrastructure developed and maintained by the nf-core community, reused here under the MIT license.

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. In addition, references of tools and data used in this pipeline are as follows:

Releases

No releases published

Packages

No packages published