CCBR template for creating Nextflow pipelines
See the website for detailed information, documentation, and examples: https://ccbr.github.io/TOOL_NAME/
-
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
-
Read and follow the contributing guidelines in
.github/CONTRIBUTING.md
. Be sure to installpre-commit
and its hooks before making any commits. -
Change all instances of
TOOL_NAME
andtool_name
throughout the repo with the actual tool name. ReplaceTOOL_NAME
with the all-caps version (refers to the GitHub repo name) andtool_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
-
Edit
pyproject.toml
andnextflow.config
with correct metadata for your tool. You will likely need to change:- author names and emails
- dependencies
- project URLs
-
Write your nextflow workflow.
- Where possible, reuse existing modules and subworklows from CCBR/nf-modules1. Also consider contributing new modules & subworkflows to that repository!
-
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 thegh-pages
branch, and GitHub Pages will make it available athttps://OWNER.github.io/TOOL_NAME
.
- In settings, go to General > Pages and select the
-
Edit the README:
- Change the title and description.
- Delete the section Using this template.
-
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.
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"
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.
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
-
See also our reusable modules and subworkflows for CCBR nextflow pipelines: https://github.com/CCBR/nf-modules ↩
-
instructions for nf-core pipelines https://nf-co.re/docs/contributing/tutorials/creating_with_nf_core ↩