Skip to content

EPIC RNA sequencing analysis pipeline for generating count matrices, QC metrics, and differential gene expression calls.

License

Notifications You must be signed in to change notification settings

epicrispr-biotechnologies/epic-rnaseq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epic-rnaseq

epic-rnaseq

GitHub Actions CI Status GitHub Actions Linting StatusAWS CICite with Zenodonf-test

Nextflow run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on TwitterFollow on MastodonWatch on YouTube

Introduction

epic-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 and FASTQ files as input, performs quality control (QC), trimming and (pseudo-)alignment, and produces a gene expression matrix, extensive QC report, and a differential expression analysis report.

  1. Merge re-sequenced FastQ files (cat)
  2. Auto-infer strandedness by subsampling and pseudoalignment (fq, Salmon)
  3. Read QC (FastQC)
  4. UMI extraction (UMI-tools)
  5. Adapter and quality trimming (Trim Galore!)
  6. Removal of genome contaminants (BBSplit)
  7. Removal of ribosomal RNA (SortMeRNA)
  8. Choice of multiple alignment and quantification routes:
    1. STAR -> Salmon
    2. STAR -> RSEM
    3. HiSAT2 -> NO QUANTIFICATION
  9. Sort and index alignments (SAMtools)
  10. UMI-based deduplication (UMI-tools)
  11. Duplicate read marking (picard MarkDuplicates)
  12. Transcript assembly and quantification (StringTie)
  13. Create bigWig coverage files (BEDTools, bedGraphToBigWig)
  14. Extensive quality control:
    1. RSeQC
    2. Qualimap
    3. dupRadar
    4. Preseq
    5. DESeq2
    6. Kraken2 -> Bracken on unaligned sequences; optional
  15. Pseudoalignment and quantification (Salmon or 'Kallisto'; optional)
  16. Present QC for raw read, alignment, gene biotype, sample similarity, and strand-specificity checks (MultiQC, R)
  17. Perform differential expression analysis via DESeq2

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 rnaseq when 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 hisat2 due 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 test before 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,condition
LS-R-1,RNAseq_1M_LS-R-1_R1_001.fastq.gz,RNAseq_1M_LS-R-1_R2_001.fastq.gz,auto,CONTROL
LS-R-2,RNAseq_1M_LS-R-2_R1_001.fastq.gz,RNAseq_1M_LS-R-2_R2_001.fastq.gz,auto,CONTROL
LS-R-6,RNAseq_1M_LS-R-6_R1_001.fastq.gz,RNAseq_1M_LS-R-6_R2_001.fastq.gz,auto,EPI321
LS-R-7,RNAseq_1M_LS-R-7_R1_001.fastq.gz,RNAseq_1M_LS-R-7_R2_001.fastq.gz,auto,EPI321

condition column must only contain values from the following list of conditions (case sensitive):

  • CONTROL
  • EPI321
  • 3-MONTH
  • 6-MONTH
  • UD
  • D2
  • D7
  • UNTREATED
  • STOP

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.

Warning: Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

Now, you can run the pipeline.

Example run:

nextflow run https://github.com/epicrispr-biotechnologies/epic-rnaseq \
    --user tborrman \
    --study JIRA_XXXX_study \
    --input samplesheet.csv \
    --outdir output_data/ \
    --fasta reference.fa \
    --gtf reference.gtf \
    --star_index star_index \
    --salmon_index salmon_index \
    --l2fc 1 \
    --padj 0.05 \
    -bucket-dir intermediate_data/ \
    -profile awsbatch,docker \
    -latest

Pipeline arguments:

  • user: Username for user invoking a run of the pipeline. string
  • study: Study name specifiying JIRA ticket and description of contrast for differential expression analysis. string
  • input: Path to comma-separated file containing information about the samples in the experiment. string
  • outdir: The output directory where the results will be saved. string
  • fasta: Path to FASTA genome file. string
  • gtf: Path to GTF annotation file. string
  • star_index: Path to directory or tar.gz archive for pre-built STAR index (optional). string
  • salmon_index: Path to directory or tar.gz archive for pre-built Salmon index (optional). string
  • l2fc: Log2 fold change threshold for differential expression analysis (default = 1). float
  • padj: Adjusted p-value threshold for differential expression analysis (default = 0.05). float

Nextflow run options:

  • bucket-dir: Remote bucket where intermediate result files are stored.
  • profile: Choose a configuration profile.
  • latest: Pull latest changes before run

Note: all file and directory paths can either be local or AWS s3 paths

Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

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 as part of the nf-core/bytesize series.

You can find numerous talks on the nf-core events page from various topics including writing pipelines/modules in Nextflow DSL2, using nf-core tooling, running nf-core pipelines as well as more generic content like contributing to Github. Please check them out!

Credits

These scripts were originally written for use at the National Genomics Infrastructure, part of SciLifeLab in Stockholm, Sweden, by Phil Ewels (@ewels) and Rickard Hammarén (@Hammarn).

The pipeline was re-written in Nextflow DSL2 and is primarily maintained by Harshil Patel (@drpatelh) from Seqera Labs, Spain.

The pipeline workflow diagram was initially designed by Sarah Guinchard (@G-Sarah) and James Fellows Yates (@jfy133), further modifications where made by Harshil Patel (@drpatelh) and Maxime Garcia (@maxulysse).

Many thanks to other who have helped out along the way too, including (but not limited to):

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #rnaseq channel (you can join with this invite).

Citations

If you use nf-core/rnaseq for your analysis, please cite it using the following doi: 10.5281/zenodo.1400710

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.

About

EPIC RNA sequencing analysis pipeline for generating count matrices, QC metrics, and differential gene expression calls.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nextflow 93.6%
  • Python 2.5%
  • R 2.4%
  • Other 1.5%