Skip to content

Commit 2ab1b97

Browse files
committed
Pre-commit hook for automatic parameters documentation generation
1 parent 7b88929 commit 2ab1b97

File tree

6 files changed

+95
-19
lines changed

6 files changed

+95
-19
lines changed

.github/workflows/linting.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,7 @@ on:
88
types: [published]
99

1010
jobs:
11-
pre-commit:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
15-
16-
- name: Set up Python 3.14
17-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
18-
with:
19-
python-version: "3.14"
20-
21-
- name: Install pre-commit
22-
run: pip install pre-commit
23-
24-
- name: Run pre-commit
25-
run: pre-commit run --all-files
26-
27-
nf-core:
11+
lint:
2812
runs-on: ubuntu-latest
2913
steps:
3014
- name: Check out pipeline code
@@ -47,8 +31,12 @@ jobs:
4731
- name: Install dependencies
4832
run: |
4933
python -m pip install --upgrade pip
34+
pip install pre-commit
5035
pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }}
5136
37+
- name: Run pre-commit
38+
run: pre-commit run --all-files
39+
5240
- name: Run nf-core pipelines lint
5341
if: ${{ github.base_ref != 'master' }}
5442
env:
@@ -77,4 +65,4 @@ jobs:
7765
path: |
7866
lint_log.txt
7967
lint_results.md
80-
PR_number.txt
68+
PR_number.txt

.nf-core.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
lint: {}
1+
lint:
2+
files_unchanged:
3+
- .github/workflows/linting.yml
4+
- docs/README.md
25
nf_core_version: 3.5.2
36
repository_type: pipeline
47
template:

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
repos:
2+
- repo: https://github.com/genomic-medicine-sweden/nf-core-schema-docs
3+
rev: v0.1.0
4+
hooks:
5+
- id: nf-core-schema-docs
26
- repo: https://github.com/pre-commit/mirrors-prettier
37
rev: "v3.1.0"
48
hooks:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Initial release of nf-core/oncorefiner, created with the [nf-core](https://nf-co
1515
- Added annotation for SV vcf file [#4](https://github.com/Clinical-Genomics/oncorefiner/pull/4)
1616
- Added filtering for SV vcf file [#5](https://github.com/Clinical-Genomics/oncorefiner/pull/5)
1717
- Added small test profile. The related test dataset have been added as a branch called oncorefiner under [Clinical-Genomics/test-datasets](https://github.com/Clinical-Genomics/test-datasets/tree/oncorefiner) [#8](https://github.com/Clinical-Genomics/oncorefiner/pull/8)
18+
- Added parameters documentation [#25](https://github.com/Clinical-Genomics/oncorefiner/pull/25)
19+
- Added pre-commit hook for automatic generation of parameters documentation [#25](https://github.com/Clinical-Genomics/oncorefiner/pull/25)
1820

1921
### `Fixed`
2022

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ The nf-core/oncorefiner documentation is split into the following pages:
66
- An overview of how the pipeline works, how to run it and a description of all of the different command-line flags.
77
- [Output](output.md)
88
- An overview of the different results produced by the pipeline and how to interpret them.
9+
- [Parameters](parameters.md)
10+
- An overview of all available parameters for the pipeline.
911

1012
You can find a lot more documentation about installing, configuring and running nf-core pipelines on the website: [https://nf-co.re](https://nf-co.re)

docs/parameters.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# nf-core/oncorefiner pipeline parameters
2+
3+
Customizable post-processing and extension layer built on top of Oncoanalyser that adapts its outputs to clinical and operational needs, adds missing analyses, and ensures flexibility for evolving standards while retaining Oncoanalyser robust core
4+
5+
## Input/output options
6+
7+
Define where the pipeline should find input data and save output data.
8+
9+
| Parameter | Description | Type | Default | Required | Hidden |
10+
|-----------|-----------|-----------|-----------|-----------|-----------|
11+
| `input` | Path to comma-separated file containing information about the samples in the experiment. <details><summary>Help</summary><small>You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row. See [usage docs](https://nf-co.re/oncorefiner/usage#samplesheet-input).</small></details>| `string` | | True | |
12+
| `outdir` | The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. | `string` | | True | |
13+
| `email` | Email address for completion summary. <details><summary>Help</summary><small>Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to specify this on the command line for every run.</small></details>| `string` | | | |
14+
| `multiqc_title` | MultiQC report title. Printed as page header, used for filename if not otherwise specified. | `string` | | | |
15+
16+
## Reference genome options
17+
18+
Reference genome related files and options required for the workflow.
19+
20+
| Parameter | Description | Type | Default | Required | Hidden |
21+
|-----------|-----------|-----------|-----------|-----------|-----------|
22+
| `genome` | Name of iGenomes reference. <details><summary>Help</summary><small>If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. <br><br>See the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details.</small></details>| `string` | | | |
23+
| `fasta` | Path to FASTA genome file. <details><summary>Help</summary><small>This parameter is *mandatory* if `--genome` is not specified. If you don't have a BWA index available this will be generated for you automatically. Combine with `--save_reference` to save BWA index for future runs.</small></details>| `string` | | | |
24+
| `fai` | Path to FASTA genome index file. <details><summary>Help</summary><small>If none provided, will be generated automatically from the FASTA reference</small></details>| `string` | | | |
25+
| `igenomes_ignore` | Do not load the iGenomes reference config. <details><summary>Help</summary><small>Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`.</small></details>| `boolean` | | | True |
26+
| `igenomes_base` | The base path to the igenomes reference files | `string` | s3://ngi-igenomes/igenomes/ | | True |
27+
28+
## Annotation options
29+
30+
Annotation related files and options required for the workflow.
31+
32+
| Parameter | Description | Type | Default | Required | Hidden |
33+
|-----------|-----------|-----------|-----------|-----------|-----------|
34+
| `vep_cache_version` | Specify the version of the VEP cache provided to the `--vep_cache` option. | `integer` | 112 | | |
35+
| `vep_cache` | Path to vep's cache directory. <details><summary>Help</summary><small>If no directory path is passed, vcf files will not be annotated by vep.</small></details>| `string` | | | |
36+
| `vep_plugin_files` | Databases used by both named and custom plugins to annotate variants. <details><summary>Help</summary><small>Path to a file containing the absolute paths to databases and their indices used by VEP's custom and named plugins resources defined within the vcfanno toml file. One line per resource.</small></details>| `string` | | | |
37+
| `vcfanno_extra` | Path to a VCF file containing annotations. <details><summary>Help</summary><small>Can be used to supply case-specific annotations in addition to those provided using --vcfanno_resources</small></details>| `string` | | | |
38+
| `vcfanno_resources` | Path to a file containing the absolute paths to resources defined within the vcfanno toml file. One line per resource. <details><summary>Help</summary><small>If no file is passed, default configurations will be used according to genome build within the context of the pipeline.</small></details>| `string` | | | |
39+
| `vcfanno_toml` | Path to the vcfanno toml file. <details><summary>Help</summary><small>If no toml is passed, default configurations will be used according to genome build within the context of the pipeline.</small></details>| `string` | | | |
40+
| `vcfanno_lua` | Path to the vcfanno lua file. <details><summary>Help</summary><small>Custom operations file (lua). For use when the built-in ops don't supply the needed reduction.</small></details>| `string` | | | |
41+
| `svdb_query_dbs` | Databases used for structural variant annotation in vcf format. <details><summary>Help</summary><small>Path to comma-separated file containing information about the databases used for structural variant annotation.</small></details>| `string` | | | |
42+
43+
## Institutional config options
44+
45+
Parameters used to describe centralised config profiles. These should not be edited.
46+
47+
| Parameter | Description | Type | Default | Required | Hidden |
48+
|-----------|-----------|-----------|-----------|-----------|-----------|
49+
| `custom_config_version` | Git commit id for Institutional configs. | `string` | master | | True |
50+
| `custom_config_base` | Base directory for Institutional configs. <details><summary>Help</summary><small>If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.</small></details>| `string` | https://raw.githubusercontent.com/nf-core/configs/master | | True |
51+
| `config_profile_name` | Institutional config name. | `string` | | | True |
52+
| `config_profile_description` | Institutional config description. | `string` | | | True |
53+
| `config_profile_contact` | Institutional config contact information. | `string` | | | True |
54+
| `config_profile_url` | Institutional config URL link. | `string` | | | True |
55+
56+
## Generic options
57+
58+
Less common options for the pipeline, typically set in a config file.
59+
60+
| Parameter | Description | Type | Default | Required | Hidden |
61+
|-----------|-----------|-----------|-----------|-----------|-----------|
62+
| `version` | Display version and exit. | `boolean` | | | True |
63+
| `publish_dir_mode` | Method used to save pipeline results to output directory. (accepted: `symlink`\|`rellink`\|`link`\|`copy`\|`copyNoFollow`\|`move`) <details><summary>Help</summary><small>The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.</small></details>| `string` | copy | | True |
64+
| `email_on_fail` | Email address for completion summary, only when pipeline fails. <details><summary>Help</summary><small>An email address to send a summary email to when the pipeline is completed - ONLY sent if the pipeline does not exit successfully.</small></details>| `string` | | | True |
65+
| `plaintext_email` | Send plain-text email instead of HTML. | `boolean` | | | True |
66+
| `max_multiqc_email_size` | File size limit when attaching MultiQC reports to summary emails. | `string` | 25.MB | | True |
67+
| `monochrome_logs` | Do not use coloured log outputs. | `boolean` | | | True |
68+
| `hook_url` | Incoming hook URL for messaging service <details><summary>Help</summary><small>Incoming hook URL for messaging service. Currently, MS Teams and Slack are supported.</small></details>| `string` | | | True |
69+
| `multiqc_config` | Custom config file to supply to MultiQC. | `string` | | | True |
70+
| `multiqc_logo` | Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file | `string` | | | True |
71+
| `multiqc_methods_description` | Custom MultiQC yaml file containing HTML including a methods description. | `string` | | | |
72+
| `validate_params` | Boolean whether to validate parameters against the schema at runtime | `boolean` | True | | True |
73+
| `pipelines_testdata_base_path` | Base URL or local path to location of pipeline test dataset files | `string` | https://raw.githubusercontent.com/Clinical-Genomics/test-datasets/refs/heads/oncorefiner/ | | True |
74+
| `trace_report_suffix` | Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss. | `string` | | | True |
75+
| `help` | Display the help message. | `['boolean', 'string']` | | | |
76+
| `help_full` | Display the full detailed help message. | `boolean` | | | |
77+
| `show_hidden` | Display hidden parameters in the help message (only works when --help or --help_full are provided). | `boolean` | | | |

0 commit comments

Comments
 (0)