Skip to content

CCBR/CCBR_NextflowTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nextflow Template

CCBR template for creating Nextflow pipelines

build docs

See the website for detailed information, documentation, and examples: https://ccbr.github.io/TOOL_NAME/

Using this template

  1. Create a new repository from this template using either of these options:

    • The GitHub web interface: Click "Use this template" and "Create a new repository", then choose an owner (e.g. CCBR or another organization) and the repository name as the new tool's name.
    • The GitHub command line interface: Replace OWNER/TOOL_NAME with your organization (e.g. CCBR) and the actual tool name.
      gh repo create OWNER/TOOL_NAME \
         --description "One-line description of your tool" \
         --public \
         --template CCBR/CCBR_NextflowTemplate \
         --confirm
  2. Read and follow the contributing guidelines in .github/CONTRIBUTING.md. Be sure to install pre-commit and its hooks before making any commits.

  3. Change all instances of TOOL_NAME and tool_name throughout the repo with the actual tool name. Replace TOOL_NAME with the all-caps version (refers to the GitHub repo name) and tool_name with the lowercase version (refers to the command-line interface). Places include:

    .github/CONTRIBUTING.md
    .github/ISSUE_TEMPLATE/bug_report.yml
    .github/ISSUE_TEMPLATE/config.yml
    .github/workflows/build.yml
    bin/tool_name
    CHANGELOG.md
    CITATION.cff
    README.md
    main.nf
    mkdocs.yml
    nextflow.config
    pyproject.toml
    src/__main__.py
    
  4. Edit pyproject.toml and nextflow.config with correct metadata for your tool. You will likely need to change:

    • author names and emails
    • dependencies
    • project URLs
  5. Write your nextflow workflow.

    • Where possible, reuse existing modules and subworklows from CCBR/nf-modules1. Also consider contributing new modules & subworkflows to that repository!
  6. Write your documentation in docs/ and enable GitHub Pages.

    • In settings, go to General > Pages and select the gh-pages branch. mkdocs will build your site under the gh-pages branch, and GitHub Pages will make it available at https://OWNER.github.io/TOOL_NAME.
  7. Edit the README:

    1. Change the title and description.
    2. Delete the section Using this template.
  8. You can look for instances of TOOL_NAME in case you missed any with grep:

    grep -ir "TOOL_NAME" .

    If your repo is not part of CCBR, you will also want to look for instances of "CCBR" and "CCR Collaborative Bioinformatics Resource" and replace them with your organization.

    grep -ir "CCBR\|CCR" .

For a work-in-progress example of this template in action, see the CHAMPAGNE repo.

Usage

Install the tool in edit mode:

pip3 install -e .

View CLI options:

tool_name --help

Navigate to your project directory and initialize required config files:

tool_name init

Run the example

tool_name run --input "Hello world"

dag

Help & Contributing

Come across a bug? Open an issue and include a minimal reproducible example.

Have a question? Ask it in discussions.

Want to contribute to this project? Check out the contributing guidelines.

References

This repo was originally generated from the CCBR Nextflow Template. The template takes inspiration from nektool2 and the nf-core template. If you plan to contribute your pipeline to nf-core, don't use this template -- instead follow nf-core's instructions3.

Footnotes

  1. See also our reusable modules and subworkflows for CCBR nextflow pipelines: https://github.com/CCBR/nf-modules

  2. nektool https://github.com/beardymcjohnface/nektool

  3. instructions for nf-core pipelines https://nf-co.re/docs/contributing/tutorials/creating_with_nf_core