Rnaseq
RNA sequencing analysis pipeline using STAR, RSEM, HISAT2 or Salmon with gene/isoform counts and extensive quality control.
Install / Use
/learn @nf-core/RnaseqREADME
Introduction
nf-core/rnaseq is a bioinformatics pipeline that can be used to analyse RNA sequencing data obtained from organisms with a reference genome and annotation. It takes a samplesheet with FASTQ files or pre-aligned BAM files as input, performs quality control (QC), trimming and (pseudo-)alignment, and produces a gene expression matrix and extensive QC report.
In case the image above is not loading, please have a look at the static version.
- Merge re-sequenced FastQ files (
cat) - Auto-infer strandedness by subsampling and pseudoalignment (
fq,Salmon) - Read QC (
FastQC) - UMI extraction (
UMI-tools) - Adapter and quality trimming (
Trim Galore!) - Removal of genome contaminants (
BBSplit) - Removal of ribosomal RNA (
SortMeRNA) - Choice of multiple alignment and quantification routes (For
STARthe sentieon implementation can be chosen): - Sort and index alignments (
SAMtools) - UMI-based deduplication (
UMI-tools) - Duplicate read marking (
picard MarkDuplicates) - Transcript assembly and quantification (
StringTie) - Create bigWig coverage files (
BEDTools,bedGraphToBigWig) - Extensive quality control:
- Pseudoalignment and quantification (
Salmonor 'Kallisto'; optional) - Present QC for raw read, alignment, gene biotype, sample similarity, and strand-specificity checks (
MultiQC,R)
Note The SRA download functionality has been removed from the pipeline (
>=3.2) and ported to an independent workflow called nf-core/fetchngs. You can provide--nf_core_pipeline rnaseqwhen running nf-core/fetchngs to download and auto-create a samplesheet containing publicly available samples that can be accepted directly as input by this pipeline.
Warning Quantification isn't performed if using
--aligner hisat2due to the lack of an appropriate option to calculate accurate expression estimates from HISAT2 derived genomic alignments. However, you can use this route if you have a preference for the alignment, QC and other types of downstream analysis compatible with the output of HISAT2.
Usage
[!NOTE] If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with
-profile testbefore running the workflow on actual data.
First, prepare a samplesheet with your input data that looks as follows:
samplesheet.csv:
sample,fastq_1,fastq_2,strandedness,seq_platform
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz,auto,ILLUMINA
CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz,auto,ILLUMINA
CONTROL_REP1,AEG588A1_S1_L004_R1_001.fastq.gz,AEG588A1_S1_L004_R2_001.fastq.gz,auto,ILLUMINA
Each row represents a fastq file (single-end) or a pair of fastq files (paired end). Rows with the same sample identifier are considered technical replicates and merged automatically. The strandedness refers to the library preparation and will be automatically inferred if set to auto. The seq_platform column is optional; for a single platform across all samples, use the --seq_platform parameter instead.
The pipeline supports a two-step reprocessing workflow using BAM files from previous runs. Run initially with --save_align_intermeds to generate a samplesheet with BAM paths, then reprocess using --skip_alignment for efficient downstream analysis without repeating expensive alignment steps. This feature is designed specifically for pipeline-generated BAMs.
[!WARNING] Please provide pipeline parameters via the CLI or Nextflow
-params-fileoption. Custom config files including those provided by the-cNextflow option can be used to provide any configuration except for parameters; see docs.
Now, you can run the pipeline using:
nextflow run nf-core/rnaseq \
--input <SAMPLESHEET> \
--outdir <OUTDIR> \
--gtf <GTF> \
--fasta <GENOME FASTA> \
-profile <docker/singularity/.../institute>
For more details and further functionality, please refer to the usage documentation and the parameter documentation.
Pipeline output
To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.
This pipeline quantifies RNA-sequenced reads relative to genes/transcripts in the genome and normalizes the resulting data. It does not compare the samples statistically in order to assign significance in the form of FDR or P-values. For downstream analyses, the output files from this pipeline can be analysed directly in statistical environments like R, Julia or via the nf-core/differentialabundance pipeline.
Online videos
A short talk about the history, current status and functionality on offer in this pipeline was given by Harshil Patel (@drpatelh) on [8th February 2022](https://nf-co.re/events/2022/bytesize-32-nf-core-
