Skip to content

CCBR/CCBR_NextflowTemplate

Repository files navigation

Nextflow Template

CCBR template for creating Nextflow pipelines

build

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
    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.

  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 .

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 nektool1 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 instructions2.

Footnotes

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

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