Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextflow-io/nf-validation
Params validation plugin for Nextflow pipelines
https://github.com/nextflow-io/nf-validation
json-schema nextflow plugin samplesheet validation
Last synced: 2 months ago
JSON representation
Params validation plugin for Nextflow pipelines
- Host: GitHub
- URL: https://github.com/nextflow-io/nf-validation
- Owner: nextflow-io
- License: apache-2.0
- Created: 2021-02-18T20:00:05.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T13:36:41.000Z (9 months ago)
- Last Synced: 2024-04-22T13:45:53.933Z (9 months ago)
- Topics: json-schema, nextflow, plugin, samplesheet, validation
- Language: Groovy
- Homepage: https://nextflow-io.github.io/nf-validation/
- Size: 2.93 MB
- Stars: 47
- Watchers: 5
- Forks: 19
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing/setup.md
- License: LICENSE
Awesome Lists containing this project
README
# ![nf-validation](docs/images/nf-validation.svg)
**A Nextflow plugin to work with validation of pipeline parameters and sample sheets.**
> [!IMPORTANT]
> # `nf-validation` has now been renamed to `nf-schema`.
> **The `nf-validation` plugin will not receive any future updates.**
> **Please update your pipelines to use [`nf-schema`](https://github.com/nextflow-io/nf-schema) instead.**
>
> See for details.
>
> This change was necessary to prevent older versions of `nf-core` pipelines from with unpinned plugin references from breaking when updating to the latest version of `nf-validation`.
> **Please pin the version of `nf-schema` in your pipeline's `nextflow.config` file:**
> ```nextflow
> plugins { id '[email protected]' }
> ```## Introduction
This [Nextflow plugin](https://www.nextflow.io/docs/latest/plugins.html#plugins) provides a number of functions that can be included into a Nextflow pipeline script to work with parameter and sample sheet schema. Using these functions you can:
- π Print usage instructions to the terminal (for use with `--help`)
- βοΈ Print log output showing parameters with non-default values
- β Validate supplied parameters against the pipeline schema
- π Validate the contents of supplied sample sheet files
- π οΈ Create a Nextflow channel with a parsed sample sheetSupported sample sheet formats are CSV, TSV and YAML (simple).
## Quick Start
Declare the plugin in your Nextflow pipeline configuration file:
```groovy title="nextflow.config"
plugins {
id 'nf-validation'
}
```This is all that is needed - Nextflow will automatically fetch the plugin code at run time.
> [!NOTE]
> The snippet above will always try to install the latest version, good to make sure
> that the latest bug fixes are included! However, this can cause difficulties if running
> offline. You can pin a specific release using the syntax `[email protected]`You can now include the plugin helper functions into your Nextflow pipeline:
```groovy title="main.nf"
include { validateParameters; paramsHelp; paramsSummaryLog; fromSamplesheet } from 'plugin/nf-validation'// Print help message, supply typical command line usage for the pipeline
if (params.help) {
log.info paramsHelp("nextflow run my_pipeline --input input_file.csv")
exit 0
}// Validate input parameters
validateParameters()// Print summary of supplied parameters
log.info paramsSummaryLog(workflow)// Create a new channel of metadata from a sample sheet
// NB: `input` corresponds to `params.input` and associated sample sheet schema
ch_input = Channel.fromSamplesheet("input")
```## Dependencies
- Java 11 or later
-## Slack channel
There is a dedicated [nf-validation Slack channel](https://nfcore.slack.com/archives/C056RQB10LU) in the [Nextflow Slack workspace](nextflow.slack.com).
## Credits
This plugin was written based on code initially written within the nf-core community,
as part of the nf-core pipeline template.We would like to thank the key contributors who include (but are not limited to):
- JΓΊlia Mir Pedrol ([@mirpedrol](https://github.com/mirpedrol))
- Nicolas Vannieuwkerke ([@nvnieuwk](https://github.com/nvnieuwk))
- Kevin Menden ([@KevinMenden](https://github.com/KevinMenden))
- Phil Ewels ([@ewels](https://github.com/ewels))