RNAseq

A Viash + Nextflow RNA-seq pipeline implementing the critical-path processing steps from raw reads to quantification and QC reporting.

What it does

The pipeline processes single-end or paired-end FASTQ files through six steps:

  1. FastQC - raw read quality control

  2. TrimGalore - adapter trimming and quality filtering

  3. STAR genome index - builds a genome index once, shared across all samples

  4. STAR alignment - aligns trimmed reads to the genome, producing both genome and transcriptome BAMs

  5. Salmon quant - transcript-level quantification in alignment mode using the transcriptome BAM

  6. MultiQC - aggregates QC metrics from all tools and samples into a single report

The STAR index build step fans in all samples (runs once), then fans back out so each sample is aligned independently. MultiQC similarly aggregates across all samples and its report is broadcast back to every sample in the output channel.

Prerequisites

  • Viash >= 0.9.4

  • Nextflow

  • Docker (enabled in nextflow.config by default)

Component tools (FastQC, TrimGalore, STAR, Salmon, MultiQC) are resolved from the biobox Viash repository and run inside Docker containers; no manual tool installation is required.

Project structure

rnaseq-new/  
├── _viash.yaml                        # Project config (name, version, source/target dirs, repositories)  
├── nextflow.config                    # Nextflow config (Docker enabled)  
├── src/  
│   ├── gunzip/                        # Local component: decompress gzipped files (used for GTF)  
│   │   ├── config.vsh.yaml  
│   │   └── script.sh  
│   └── workflows/  
│       └── rnaseq/                    # Main workflow  
│           ├── config.vsh.yaml        # Workflow inputs, outputs, and dependencies  
│           ├── main.nf                # Workflow logic (VDSL3/Nextflow)  
│           └── test.nf                # Test workflow using nf-core test datasets  
├── resources_test/  
│   └── samplesheet_test.csv           # Example samplesheet with nf-core test data URLs  
└── target/                            # Generated output from viash build (not committed)  

Building

Build all components and workflows with Viash:

viash ns build --parallel  

This resolves dependencies from the biobox repository and generates Nextflow modules under target/nextflow/.

Running the pipeline

Unlike nf-core pipelines, no custom samplesheet parser is needed. Viash builds this in: every built workflow accepts individual CLI arguments (single sample) or a --param_list file (multiple samples). Column names in the param_list map directly to argument names.

Single sample

nextflow run target/nextflow/workflows/rnaseq/main.nf \  
  --id sample1 \  
  --input_fastq_1 reads_R1.fastq.gz \  
  --input_fastq_2 reads_R2.fastq.gz \  
  --fasta genome.fasta \  
  --gtf annotation.gtf.gz \  
  --transcript_fasta transcriptome.fasta  

Multiple samples via param_list

Put per-sample columns in a CSV; pass shared reference files on the CLI:

nextflow run target/nextflow/workflows/rnaseq/main.nf \  
  --param_list samples.csv \  
  --fasta genome.fasta \  
  --gtf annotation.gtf.gz \  
  --transcript_fasta transcriptome.fasta  

samples.csv:

id,input_fastq_1,input_fastq_2,strandedness  
SRR6357070,path/to/SRR6357070_R1.fastq.gz,path/to/SRR6357070_R2.fastq.gz,reverse  
SRR6357071,path/to/SRR6357071_R1.fastq.gz,,reverse  

The id column becomes the sample identifier. Leave input_fastq_2 empty for single-end samples. Any argument can appear in the CSV; CLI values act as defaults for columns not present. --param_list accepts CSV, JSON, or YAML.

Parameters

ParameterRequiredDescription
--input_fastq_1yesR1 FASTQ (or single-end FASTQ)
--input_fastq_2noR2 FASTQ for paired-end runs
--fastayesReference genome FASTA
--gtfyesGene annotation GTF (plain or gzipped)
--transcript_fastanoTranscript FASTA for Salmon alignment mode
--strandednessnoauto (default), forward, reverse, or unstranded
--genome_sa_index_nbasesnoSTAR index parameter; use 7 for small/test genomes (default: 14)

Running the test workflow

The test workflow pulls reference data and FASTQs directly from the nf-core test-datasets repository:

nextflow run src/workflows/rnaseq/test.nf \  
  -entry test_wf \  
  --rootDir .  

This runs both a paired-end and a single-end sample and asserts that all key outputs (MultiQC report, Salmon output, genome BAM) are produced.

Design notes

Trimming: TrimGalore vs cutadapt

The pipeline uses TrimGalore for adapter trimming. Cutadapt is also available in biobox and could replace it, but TrimGalore is the better default here for three reasons:

  • Auto-detects adapters — no need to specify adapter sequences explicitly

  • Produces trimming reports that MultiQC parses out of the box

  • Handles paired-end read synchronisation automatically

Cutadapt is worth considering if adapter sequences are known upfront and precise control over trimming parameters is needed. Note that cutadapt's output argument is multiple: true in biobox, which requires an explicit output glob pattern in fromState — see the vdsl3 skill for details.

Example param_lists

Both files use nf-core test data URLs and are passed with shared reference files on the CLI.

resources_test/samplesheet_test.csv (CSV):

id,input_fastq_1,input_fastq_2,strandedness  
SRR6357070,https://.../SRR6357070_1.fastq.gz,https://.../SRR6357070_2.fastq.gz,reverse  

resources_test/param_list_test.yaml (YAML):

- id: SRR6357070  
  input_fastq_1: https://.../SRR6357070_1.fastq.gz  
  input_fastq_2: https://.../SRR6357070_2.fastq.gz  
  strandedness: reverse  

Select version

Components

1

Released at

Jul 30, 2026 (19 days ago)

Collaborate Accelerate Succeed

Empower your organization with secure, scalable workflow solutions that simplify development, ensure compliance, and drive innovation.

Viash Hub is a platform developed by Data Intuitive, a Belgian-based bioinformatics company specializing in data workflow development and deployment.