Run your first pipeline

With Nextflow and your software dependency manager installed, you are ready to run your first nf-core pipeline. It is ideal for, verifying your environment is correctly configured, learning how nf-core pipelines work, and testing your installation.

nf-core/demo

nf-core/demo is a lightweight demonstration pipeline designed to introduce running nf-core pipelines. It performs basic quality control and processing on sequencing data, showcasing the structure and best practices followed by all nf-core pipelines.

The [nf-core/demo] pipeline runs three processes:

  1. Read QC (FastQC)
    • Quality control checks on raw sequencing reads
  2. Adapter and quality trimming (seqtk trim)
    • Removes adapter sequences and low-quality bases
  3. QC report aggregation (MultiQC)
    • Combines QC metrics into a single interactive report

It is purposefully lightweight and should run within a few minutes on most systems.

Quick start

The following sections cover common operations for getting started with nf-core/demo.

Use test data

To run nf-core/demo with test data:

  1. Run nf-core/demo with the built-in test profile and a profile to manage software dependencies:

    nextflow run nf-core/demo -profile test,docker --outdir results
    Tip

    Common configure software dependencies and compute environments include:

    • docker: Uses Docker containers
    • singularity: Uses Singularity containers
    • conda: Uses Conda environments

    Combine profiles with commas: -profile test,docker

  2. Once complete, view your results/ directory:

    results/
    ├── fastqc/          # Raw FastQC reports for each sample
    ├── fq/              # Trimmed FastQ files
    ├── multiqc/         # Aggregated QC report
    │   └── multiqc_report.html
    └── pipeline_info/   # Execution logs and metadata

Use your own data

To run nf-core/demo with your own sequencing data:

  1. Create samplesheet.csv with the following contents:

    ColumnDescription
    sampleUnique sample identifier
    fastq_1Path to gzipped first-read FastQ file
    fastq_2Path to gzipped second-read FastQ file (leave empty for single-end)

    Example:

    sample,fastq_1,fastq_2
    SAMPLE1,</path/to/sample1_R1.fastq.gz>,</path/to/sample1_R2.fastq.gz>
    SAMPLE2,</path/to/sample2_R1.fastq.gz>,
  2. Run nf-core/demo with your samplesheet.csv as input:

    nextflow run nf-core/demo \
      -profile <docker> \
      --input samplesheet.csv \
      --outdir results

    Replace <docker> with your preferred software dependency and compute environment manager.

Use parameter files

To run nf-core/demo with a parameters file:

  1. Create params.json with the following contents:

    params {
      input = 'samplesheet.csv' // This requires the samplesheet.csv created above
      outdir = 'results'
    }
  2. Run nf-core/demo with you params.json file:

    nextflow run nf-core/demo \
      -profile <docker> \
      -params-file params.json

    Replace <docker> with your preferred software dependency and compute environment manager.

    Tip

    Parameter files make it easier to rerun pipelines with the same settings and keep track of your analysis configurations.

Resume interrupted runs

To resume an interrupted run, add the -resume flag:

nextflow run nf-core/demo \
  -profile docker \
  --input samplesheet.csv \
  --outdir results \
  -resume

Only steps with changed inputs will re-execute, saving time and computational resources.

Version control

To specify a pipeline version, add the -r option with a version, revision, or commit ID:

nextflow run nf-core/demo \
  -r 1.0.2 \
  -profile docker \
  --input samplesheet.csv \
  --outdir results
Tip

Version information is automatically recorded in pipeline reports. Check available releases on GitHub.

Next steps

Now that you’ve successfully run your first nf-core pipeline:

  • Browse the nf-core pipeline catalog to find workflows for your research area
  • Learn to adjust resource requirements and parameters for your infrastructure
  • Join the nf-core Slack community