Skip to content

Repository files navigation

ZarnackGroup/majiq_splicing_analysis_pipeline

GitHub Actions CI Status GitHub Actions Linting Status nf-test

Nextflow nf-core template version run with conda run with docker run with singularity

Introduction

ZarnackGroup/majiq_splicing_analysis_pipeline is our in-house pipeline for analyzing alternative splicing events from RNA sequencing data, based on Nextflow and utilizing MAJIQ V3 as the core splicing analysis tool.

flowchart TB
  subgraph MAJIQ_SPLICING_ANALYSIS_PIPELINE
    subgraph required parameters
      v0["--input"]
      v2["--annotation"]
      v1["--contrasts"]
      v3["genome_fasta"]

    end

    subgraph s20["converting inputs"]
          subgraph s100["index bam files"]
               v15([SAMTOOLS_INDEX])
          end
          subgraph s2["annotation format handling"]
               v9([AGAT])
          end
     end
    subgraph s3["splicing analysis"]
      v25([MAJIQ])
      v26([IRFINDER-S])
    end
    subgraph s4["create BigWig"]
      v19([DEEPTOOLS_BAMCOVERAGE])
    end
    subgraph s7["quality control"]
      v32([BAM_RSEQC])
      v22([FASTQC])
    end
    subgraph report
      v63([MULTIQC])
    end
    v2 --> v9
    v0 --> v19
    v0 --> v15
    v0 --> v22
    v0 --> v25
    v0 --> v26
    v0 --> v32
    v9 --> v25
    v9 --> v26
    v9 --> v32
    v1 --> v26
    v1 --> v25
    v3 --> v26
    v15 --> v19
    v15 --> v32
    v19 --> v63
    v32 --> v63
    v22 --> v63
    v15 --> v63
    v9 --> v63
    v25 --> v63
    v26 --> v63
  end

Loading
  1. Index BAM files (SAMTOOLS)
  2. Convert annotation: GXF conversion (AGAT)
  3. Convert annotation: BED conversion (AGAT)
  4. Splicing analysis (MAJIQ)
  5. Intron Retention analysis (IRFINDER)
  6. Coverage track generation (DEEPTOOLS)
  7. Quality control: read & alignment QC (RSeQC)
  8. Quality control: read QC (FastQC)
  9. Reporting (MultiQC)

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.

Below are the minimal steps required to run the pipeline. Full documentation for the pipeline, including usage, all parameters and output files can be found in the docs folder.

Setting up MAJIQ

  1. Obtain a LICENSE – MAJIQ is free for academic use, but you need to visit the homepage.

  2. Add the license key to your Nextflow secrets as MAJIQ_LICENSE.

    nextflow secrets set MAJIQ_LICENSE "$(cat "majiq_license_academic_official.lic")"
  3. Installing MAJIQ – choose your preferred option. Current tests are built for MAJIQ V3 at tag 3.0.6:

    1. Set up with Conda: follow the instructions on the download page.
    2. Set up with Docker: you can find a Dockerfile to build a MAJIQ container in the assets folder of this repository.
    3. Apptainer/Singularity: use the Docker image.
    4. Others: I have not tried anything else yet. If you find a reliable and legal way to set it up, feel free to contribute here.
  4. Configuring the pipeline to use your MAJIQ installation:
    You need to create a .config file where you specify the container or Conda environment for each MAJIQ process. You can find an example in the conf folder – cctb.config.
    For a Conda environment, use "conda" instead of "container".
    Pass the created .config file using the -c option.

Running the pipeline

First, prepare a samplesheet with your input data.

samplesheet.csv:

sample,condition,genome_bam
ERR188383,GBR,PATH/TO/ERR188383.Aligned.out.bam
ERR188428,GBR,PATH/TO/ERR188428.Aligned.out.bam
ERR188454,YRI,PATH/TO/ERR188454.Aligned.out.bam
ERR204916,YRI,PATH/TO/ERR204916.Aligned.out.bam

Each row represents a BAM file.
sample is a unique identifier for each row.
condition is used to group and compare samples.
genome_bam refers to reads aligned against a genome.

contrastsheet.csv:

contrast,treatment,control
YRI-GBR,YRI,GBR

Each row represents a comparison (contrast).
The control column is used as the reference in comparisons, and treatment specifies the other condition.
contrast is an identifier for the comparison.

annotation:
Provide the annotation file used during alignment. It can be in .gtf or .gff3 format.
MAJIQ requires .gff3. If a GTF file is provided, it will be converted using AGAT. .gz are allowed and files will be unzipped.

genome_fasta: Optional input that is required to run IRFinder. .gz are allowed and files will be unzipped.

Now, you can run the pipeline using:

nextflow run ZarnackGroup/majiq_splicing_analysis_pipeline \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.csv \
   --contrasts contrastsheet.csv \
   --annotation annotation.gff3 \
   --genome_fasta reference.fa \
   --outdir <OUTDIR> \
   -c majiq.config

All available parameters can be found in the parameters documentation.

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.

Credits

majiq_splicing_analysis_pipeline was originally written by Felix Haidle.

We thank the following people for their extensive assistance in the development of this pipeline:

  • Be the first!

Contributions and Support

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

Citations

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

Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031.

Aicher JK, Slaff B, Jewell S, Barash Y. MAJIQ V3 offers improvements in accuracy, performance, and usability for splicing analysis from RNA sequencing. bioRxiv. 2024. doi: 10.1101/2024.07.02.601792.

Lorenzi C, Barriere S, Arnold K, et al. IRFinder-S: a comprehensive suite to discover and explore intron retention. Genome Biology. 2021;22:307. doi: 10.1186/s13059-021-02515-8.

Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].

Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

Wang L, Wang S, Li W. RSeQC: quality control of RNA-seq experiments. Bioinformatics. 2012 Aug 15;28(16):2184-2185. doi: 10.1093/bioinformatics/bts356. PubMed PMID: 22743226.

Dainat J. AGAT: Another Gff Analysis Toolkit to handle annotations in any GTF/GFF format (Version v0.7.0). Zenodo. doi: 10.5281/zenodo.3552717.

Ramírez F, Ryan DP, Grüning B, Bhardwaj V, Kilpert F, Richter AS, Heyne S, Dündar F, Manke T. deepTools2: a next generation web server for deep-sequencing data analysis. Nucleic Acids Res. 2016 Jul 8;44(W1):W160-W165. doi: 10.1093/nar/gkw257. PubMed PMID: 27079975.

Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-2079. doi: 10.1093/bioinformatics/btp352. PubMed PMID: 19505943.

Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages