### Pipeline Configuration Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of a Nextflow configuration file used with paramsSummaryLog. ```groovy --8<-- "examples/paramsSummaryLog/pipeline/nextflow.config" ``` -------------------------------- ### Pipeline Configuration Example for Map Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of a Nextflow configuration file used with paramsSummaryMap. ```groovy --8<-- "examples/paramsSummaryMap/pipeline/nextflow.config" ``` -------------------------------- ### Nextflow Configuration for Basic Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md The Nextflow configuration file used in the basic samplesheetToList() example. ```groovy --8<-- "examples/samplesheetToListBasic/pipeline/nextflow.config" ``` -------------------------------- ### Install Documentation Dependencies Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/contributing/setup.md Install the necessary Python packages for building and serving the project documentation using MkDocs. ```bash pip install mkdocs-material pymdown-extensions pillow cairosvg ``` -------------------------------- ### Summary Map Output Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of the output generated by paramsSummaryMap, returned as a Groovy Map. ```text --8<-- "examples/paramsSummaryMap/log.txt" ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/contributing/setup.md Build and serve the project documentation locally for previewing changes. Requires MkDocs and its dependencies to be installed. ```bash mkdocs serve ``` -------------------------------- ### Summary Log Output Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of the terminal output generated by paramsSummaryLog. ```text --8<-- "examples/paramsSummaryLog/log.txt" ``` -------------------------------- ### Pipeline Main Script Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of how to include the paramsSummaryLog function in your main Nextflow script. ```groovy --8<-- "examples/paramsSummaryLog/pipeline/main.nf" ``` -------------------------------- ### Nextflow Configuration for Meta Map Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md The Nextflow configuration file for the example demonstrating a channel with a meta map. ```groovy --8<-- "examples/samplesheetToListMeta/pipeline/nextflow.config" ``` -------------------------------- ### Full Help Output Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/help_text.md This shows the complete help message generated by `paramsHelp()` when run with the `--help` flag, including all available parameters. ```text --8<-- "examples/paramsHelp/log.txt" ``` -------------------------------- ### Add Example Command to Help Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/configuration/configuration.md Include an example command in the help message, displayed after beforeText. This does not affect the paramsHelp() function output. Defaults to an empty string. ```groovy validation.help.command = "nextflow run main.nf --input samplesheet.csv --outdir output" // default: "" ``` -------------------------------- ### Pipeline Main Script Example for Map Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example of how to include the paramsSummaryMap function in your main Nextflow script. ```groovy --8<-- "examples/paramsSummaryMap/pipeline/main.nf" ``` -------------------------------- ### Pipeline Schema Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example JSON schema file used by paramsSummaryLog for parameter validation. ```json --8<-- "examples/paramsSummaryLog/pipeline/nextflow_schema.json" ``` -------------------------------- ### Channel with meta map using samplesheetToList() Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md This example shows how to use the schema to mark columns as meta fields, resulting in a channel that includes a meta map. ```groovy --8<-- "examples/samplesheetToListMeta/pipeline/main.nf" ``` -------------------------------- ### Specific Parameter Help Output Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/help_text.md This demonstrates the help message for a specific parameter, 'outdir', generated by `paramsHelp()` when invoked with `--help outdir`. ```text --8<-- "examples/paramsHelp/log_outdir.txt" ``` -------------------------------- ### Install Development Plugin Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/contributing/setup.md Install the current development version of the nf-schema plugin into the local Nextflow plugins directory. ```bash make install ``` -------------------------------- ### Pipeline Schema Example for Map Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/summary_log.md Example JSON schema file used by paramsSummaryMap for parameter validation. ```json --8<-- "examples/paramsSummaryMap/pipeline/nextflow_schema.json" ``` -------------------------------- ### Install nf-core Tools Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/nextflow_schema/create_schema.md Install the nf-core command-line tools package using pip or conda. Ensure bioconda channels are configured if using conda. ```bash pip install nf-core ``` ```bash conda install nf-core # (1)! ``` -------------------------------- ### CSV Sample Sheet for Meta Map Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md The CSV sample sheet content used in the example demonstrating a channel with a meta map. ```csv --8<-- "examples/samplesheetToListMeta/samplesheet.csv" ``` -------------------------------- ### Order of fields demonstration with samplesheetToList() Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md This example demonstrates that the order of columns in the sample sheet file does not affect the output. The order is determined by the sample sheet JSON schema. ```groovy --8<-- "examples/samplesheetToListOrder/pipeline/main.nf" ``` -------------------------------- ### Basic samplesheetToList() usage with CSV Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md This example demonstrates the basic usage of samplesheetToList() with a CSV sample sheet. It shows how to create a simple channel from the processed data. ```groovy --8<-- "examples/samplesheetToListBasic/pipeline/main.nf" ``` -------------------------------- ### Example Nextflow Schema Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/nextflow_schema/nextflow_schema_examples.md This snippet displays an example JSON Schema for a Nextflow pipeline configuration file. It is used as a test fixture in the nf-schema package. ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Nextflow Pipeline Schema Example", "description": "A sample JSON schema for a Nextflow pipeline configuration.", "type": "object", "properties": { "input": { "type": "string", "description": "Path to the input data file or directory.", "pattern": "^s3://.*|^gs://.*|^file://.*|^/.*|.*\\.txt|.*\\.csv" }, "output": { "type": "string", "description": "Path for the output results.", "pattern": "^s3://.*|^gs://.*|^file://.*|^/.*" }, "threads": { "type": "integer", "description": "Number of threads to use for the pipeline.", "minimum": 1, "default": 4 }, "email": { "type": "string", "description": "Email address for notifications.", "format": "email" }, "validate": { "type": "boolean", "description": "Whether to perform validation on the output.", "default": true }, "params": { "type": "object", "description": "Additional parameters for the pipeline.", "properties": { "genome": { "type": "string", "description": "Reference genome assembly ID.", "enum": ["hg19", "hg38", "mm10", "mm39"] }, "aligner": { "type": "string", "description": "Sequence alignment tool.", "default": "bwa" } }, "required": ["genome"] } }, "required": [ "input", "output", "params" ] } ``` -------------------------------- ### JSON Schema for Basic Example Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/samplesheets/samplesheetToList.md The JSON schema file used to validate and process the CSV sample sheet in the basic example. ```json --8<-- "examples/samplesheetToListBasic/pipeline/assets/schema_input.json" ``` -------------------------------- ### Example of parameter validation failure Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/validation.md This example shows a deliberate typo in `params.input` which is caught by the validation function, causing Nextflow to exit with an error. It includes the pipeline script, configuration, schema, and expected output log. ```text --8<-- "examples/validateParameters/log.txt" ``` ```groovy --8<-- "examples/validateParameters/pipeline/main.nf" ``` ```groovy --8<-- "examples/validateParameters/pipeline/nextflow.config" ``` ```json --8<-- "examples/validateParameters/pipeline/nextflow_schema.json" ``` -------------------------------- ### Meta Field Configuration in Schema Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/nextflow_schema/sample_sheet_schema_specification.md Configures a field in the sample sheet schema to be treated as a meta value. This example assigns the 'field' value to a meta field named 'id'. ```json { "meta": "id" } ``` -------------------------------- ### Full Help Message (`--helpFull`) Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/parameters/help_text.md Prints all parameters, including deeply nested ones, along with their descriptions. This provides a comprehensive view of all available configuration options. ```bash --reference.fasta [string] The FASTA file --reference.fai [string] The FAI file --reference.aligners.bwa [string] The BWA index --reference.aligners.bowtie [string] The BOWTIE index --type [string] The analysis type (accepted: WES, WGS) --help [boolean, string] Show the help message for all top level parameters. When a parameter is given to `--help`, the full help message of that parameter will be printed. ``` -------------------------------- ### Basic Configuration Syntax Source: https://github.com/nextflow-io/nf-schema/blob/master/docs/configuration/configuration.md Illustrates the two primary syntaxes for setting nf-schema configuration options. ```groovy validation.