Pipelines / Transcriptomics

bioxflow/rnaseq v1.0.0

Bulk RNA-seq, quantified twice

From FASTQ files to differential expression. Every sample is quantified by two independent methods, Salmon and STAR, and the pipeline tells you where they disagree before you interpret a single gene.

Why two quantifications

Most RNA-seq pipelines ask you to trust one tool. Salmon and STAR share no code and use different evidence: Salmon maps reads to transcripts and resolves ambiguity statistically, STAR aligns reads to the genome and counts those that fall in one gene. When both give the same gene counts, the result does not depend on the method. When they do not, something about the sample or the annotation needs a look, and the pipeline says so.

Scatter plots of Salmon gene counts against STAR gene counts for six test samples; most genes lie on the diagonal
Concordance plot from the bundled test run. Each point is a gene.

What it does

  1. 01

    Read QC and trimming

    FastQC on the raw reads, then fastp with automatic adapter detection.

  2. 02

    Quantification, route 1: Salmon

    Selective alignment to a decoy-aware transcriptome index, with sequence and GC bias correction. The genome is added as decoy so reads from unannotated regions are not forced onto transcripts.

  3. 03

    Quantification, route 2: STAR

    Two-pass spliced alignment to the genome with ENCODE long-RNA settings and per-gene read counts. Sorted, indexed BAM files are kept for genome browsers.

  4. 04

    Concordance gate

    The two gene-count vectors are compared for every sample: rank correlation, share of genes within 2-fold, and whether both methods infer the same library strandedness. Samples that fail are marked REVIEW.

  5. 05

    Differential expression

    tximport gene-level summaries with transcript-length offsets, DESeq2 Wald tests with Benjamini-Hochberg correction, apeglm-shrunken fold changes, optional batch term and custom contrasts.

  6. 06

    Report

    One MultiQC page with the concordance table, PCA, sample distances, volcano plots and all tool statistics, plus plain TSV tables.

Quick start

You need Nextflow 25.04 or newer and Docker, Singularity or conda. Run the bundled test data first; it takes about five minutes.

nextflow run bioxflow/rnaseq -profile test,docker

Then your own data, with a samplesheet that lists each sample and its condition:

sample,fastq_1,fastq_2,condition
ctrl_1,ctrl_1_R1.fastq.gz,ctrl_1_R2.fastq.gz,control
ctrl_2,ctrl_2_R1.fastq.gz,ctrl_2_R2.fastq.gz,control
ctrl_3,ctrl_3_R1.fastq.gz,ctrl_3_R2.fastq.gz,control
drug_1,drug_1_R1.fastq.gz,drug_1_R2.fastq.gz,treated
drug_2,drug_2_R1.fastq.gz,drug_2_R2.fastq.gz,treated
drug_3,drug_3_R1.fastq.gz,drug_3_R2.fastq.gz,treated
nextflow run bioxflow/rnaseq -profile docker \
    --input samplesheet.csv \
    --fasta genome.fa.gz --gtf genes.gtf.gz \
    --outdir results

On a laptop with about 16 GB of memory add -profile laptopto run Salmon only; STAR needs about 32 GB for a human genome. Full instructions are in theusage guide and theoutput guide.

Tested against a known answer

The repository includes a read simulator that produces RNA-seq data for which the true count of every gene and the true set of differential genes are known, and a script that scores the pipeline against that truth. These are the measured results on the whole yeast genome: 6,531 genes, two conditions with three replicates each, about 500,000 read pairs per sample, 980 genes made truly differential.

Quantification

Salmon gene counts vs truth, Spearman0.974 – 0.977
STAR gene counts vs truth, Spearman0.922 – 0.925
Salmon vs STAR concordance, Spearman0.916 – 0.922
Fold change vs truth, Pearson r (shrunken)0.920

Differential expression

Truly differential genes tested818
Genes called at adjusted p < 0.05752
True positives728
False positives24
Observed false discovery rate3.2%
Called genes with the wrong direction0

What this does not show

This is a simulation on yeast. It confirms that the pipeline computes the right answer when the answer is known. It has not yet been benchmarked on real human or mouse data against an independent reference, and real libraries have biases a simulator does not model. The full method, numbers and limits are inbenchmark/RESULTS.md, and you can re-run the benchmark yourself with one command.

Pinned tool versions

FastQC 0.12.1fastp 0.24.0Salmon 1.10.3STAR 2.7.11bSAMtools 1.21gffread 0.12.7tximport 1.34.0DESeq2 1.46.0apeglm 1.28.0MultiQC 1.25.1

Released under the MIT License. The repository layout followsnf-core conventions, also MIT licensed; this is an independent Bioxflow pipeline, not an nf-core pipeline. Please cite the tools you use: seeCITATIONS.md.