Giter Site home page Giter Site logo

fbdtemme / nf-validation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nextflow-io/nf-validation

0.0 1.0 0.0 1.86 MB

Params validation plugin for Nextflow pipelines

Home Page: https://nextflow-io.github.io/nf-validation/

License: Apache License 2.0

Shell 0.05% Groovy 99.36% Makefile 0.59%

nf-validation's Introduction

nf-validation

πŸ“š Docs πŸ‘‰πŸ» https://nextflow-io.github.io/nf-validation

A Nextflow plugin to work with validation of pipeline parameters and sample sheets.

Introduction

This Nextflow plugin 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 sheet

Supported sample sheet formats are CSV, TSV, JSON and YAML.

Quick Start

Declare the plugin in your Nextflow pipeline configuration file:

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:

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

Slack channel

There is a dedicated nf-validation Slack channel in the Nextflow Slack workspace.

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):

nf-validation's People

Contributors

nvnieuwk avatar mirpedrol avatar ewels avatar awgymer avatar adamrtalbot avatar mashehu avatar pditommaso avatar koenbossers avatar jorgeaguileraseqera avatar robsyme avatar kevinmenden avatar lukbut avatar ctuni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.