Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNASeq workflow

A Nextflow pipeline for bioinformatic workflow for RNASeq analysis on human or mouse transcriptomic data. It performs quality control, ribodepletion, alignment on reference genome, and transcript-level quantification.

This repository includes a custom bioinformatic workflow for our lab (LPM IKEM, Prague, Czechia), all parameters are set to work properly on specific data from our lab. Before any usage, please check if it fits your data as well

Table of Contents


Overview

The pipeline takes paired-end FASTQ files and a samplesheet as input and produces:

  • Quality-controlled and trimmed reads
  • Genome-coordinate alignments
  • Transcriptome-coordinate alignments
  • Transcript-level quantifications

Quick Usage

nextflow run main.nf \
  --input samplesheet.csv \
  --outdir results/ 

Requirements

User needs conda environment with Nextflow (>=23.04.0) & Singularity installed. Everything else needed for the pipeline execution can be prepared with the setup_pipeline.sh script.


Software

Tool Version Purpose
Nextflow ≥ 23.04 Workflow manager
FastQC any Read quality assessment
fastp any Read trimming and filtering
SORTMERNA 4.3.7 Ribodepletion
STAR 2.7.11b Spliced Transcripts Alignment to a Reference
SAMTOOLS 1.23.1 Sorting & indexing BAM files
QUALIMAP 2.2.2 Alignment evaluation
SALMON 2.3.4 Transcript-level quantification
MultiQC any QC report aggregation

Reference genomes and databases

File Used by
SortMeRNA db (smr_v4.3_default_db.fasta.gz) SORTMERNA
Homo sapiens genome (GRCh38) (Homo_sapiens.GRCh38.dna_sm.primary_assembly.fa) STAR
Homo sapiens transcripts (GRCh38) (Homo_sapiens.GRCh38.transcripts.fa) SALMON
Homo sapiens annotation (GRCh38) (Homo_sapiens.GRCh38.116.gtf) STAR, SALMON
Mus musculus genome (GRCm39) (Mus_musculus.GRCm39.dna_sm.primary_assembly.fa) STAR
Mus musculus transcripts (GRCm39) (Mus_musculus.GRCm39.transcripts.fa) SALMON
Mus musculus annotation (GRCm39) (Mus_musculus.GRCm39.116.gtf) STAR, SALMON

Installation

1. Clone the repository

git clone https://github.com/xpolak37/RNAseq_workflow.git
cd RNAseq_workflow

2. Install Nextflow & Singularity

conda create --prefix </path/to/your/new/nf-env/> bioconda::nextflow
conda activate </path/to/your/new/nf-env/>
conda install conda-forge::singularity

3. Install pipeline dependencies

Via setup_pipeline.sh script:

bash setup_pipeline.sh

Pipeline Description

flowchart TB
    A["Input samplesheet"] --> B["FastQC on raw reads"]
    A --> C["Fastp quality trimming"] 
    C --> D["SortMeRNA"]
    D --> E["STAR alignment"]
    E --> F["Samtools sorting & indexing"]
    F --> G["Qualimap BAMQC & RNASEQ"]
    E --> H["Salmon quantification"]
    C --> Z["MultiQC"]
    B --> Z["MultiQC"]
    E --> Z["MultiQC"]
    G --> Z["MultiQC"]
    H --> Z["MultiQC"]
Loading

Steps in detail

Quality control (FastQC + fastp)
Raw reads are assessed with FastQC before and after trimming. fastp handles adapter removal, quality-based filtering, polyG/X trimming.

SortMeRNA
Filters out ribosomal RNA reads so quantification focuses on mRNA.

STAR alignment
Splice-aware mapping of reads to the genome; also emits a transcriptome BAM for Salmon.

Samtools sorting & indexing
Coordinate-sorts and indexes the genome BAM so downstream tools can read it efficiently.

Qualimap BAMQC & RNASEQ
Post-alignment QC: mapping quality, coverage, and gene-body / read-distribution metrics.

Salmon quantification
Estimates transcript-level abundances (quant.sf) from the transcriptome BAM, with GC/sequence-bias correction.

MultiQC
Aggregates all QC outputs (FastQC, Fastp, STAR, Qualimap, Salmon) into one interactive report.


Inputs

Samplesheet

A CSV file with three columns — no spaces, no extra headers:

sample,read1,read2
SampleID1,/data/SampleID1_R1.fastq.gz,/data/SampleID1_R2.fastq.gz
SampleID2,/data/SampleID2_R1.fastq.gz,/data/SampleID2_R2.fastq.gz
Column Description
sample Unique sample identifier
read1 Absolute path to forward reads (gzipped FASTQ)
read2 Absolute path to reverse reads (gzipped FASTQ)

Pipeline parameters

Parameter Default Description
--input required Path to samplesheet CSV (sample,fastq_1,fastq_2)
--outdir ${projectDir}/results Output directory
--host human Reference genome name (human / mouse)
--star_index ./host_genomes/ Path to the pre-built STAR genome index directory (generated with setup_pipeline.sh)
--smr_refs ./smr_v4.3_default_db.fasta SortMeRNA rRNA reference FASTA for ribodepletion (downloaded with setup_pipeline.sh)
--fastp_length_required 35 Minimum read length kept after Fastp trimming
--star_sjdb_overhang 150 STAR splice-junction overhang (read length − 1)
--singularity_cache_dir ./singularity_cache Directory for cached Singularity container images
--multiqc_title RNASEQ workflow Title shown in the MultiQC report
--publish_dir_mode copy How results are published to outdir (copy / symlink / …)
--help false Print help message and exit

Outputs

results/
├── fastqc_raw/             # FastQC quality reports on raw reads
├── fastp/                  # Trimmed reads + fastp JSON/HTML reports
├── sortmerna/              # rRNA-depleted reads + SortMeRNA logs
├── star/                   # Genome & transcriptome BAMs + STAR alignment logs
├── salmon/                 # Transcript quantifications (quant.sf) per sample
└── multiqc/                # Aggregated MultiQC report

References

About

Reproducible Nextflow pipeline for bulk RNA-seq preprocessing: QC, adapter trimming, rRNA depletion, STAR alignment, and Salmon quantification, with aggregated MultiQC reporting. Containerized with Singularity.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages