Preparing an Alternative Splicing Annotation for psichomics

Nuno Saraiva Agostinho

2019-03-27


Creating custom alternative splicing annotation

psichomics quantifies alternative splicing based on alternative splicing event annotations from MISO, SUPPA, VAST-TOOLS and rMATS. New alternative splicing annotation may be prepared and used in psichomics by parsing alternative splicing events from those tools. Please contact me if you would like to see support for other tools.

This tutorial will guide you on how to parse alternative splicing events from different tools. To do so, start by loading the following packages:

library(psichomics)
library(plyr)

SUPPA annotation

SUPPA generates alternative splicing events based on a transcript annotation. Start by running SUPPA’s generateEvents script with a transcript file (GTF format) for all event types, if desired. See SUPPA’s page for more information.

The resulting output will include a directory containing tab-delimited files with alternative splicing events (one file for each event type). Hand the path of this directory to the function parseSuppaAnnotation(), prepare the annotation using prepareAnnotationFromEvents() and save the output to a RDS file:

## 
## Retrieving SUPPA annotation...
## 
## Parsing SUPPA annotation...
## 
## Sorting coordinates...
## 
## A3SS SUPPA
## 
## A5SS SUPPA
## 
## AFE SUPPA
## 
## ALE SUPPA
## 
## MXE SUPPA
## 
## Joining events per event type...
## 
## A3SS
## 
## A5SS
## 
## AFE
## 
## ALE
## 
## MXE
## 
## RI
## 
## SE
## 
## Cleaning the annotation...

rMATS annotation

Just like SUPPA, rMATS also allows to generate alternative splicing events based on a transcript annotation, although two BAM or FASTQ files are required to generate alternative splicing events. Read rMATS’s page for more information.

The resulting output of rMATS is then handed out to the function parseMatsAnnotation():

## 
## Retrieving rMATS annotation...
## 
## Parsing rMATS annotation...
## 
## Sorting coordinates...
## 
## A3SS MATS
## 
## A5SS MATS
## 
## AFE MATS
## 
## ALE MATS
## 
## MXE MATS
## 
## Joining events per event type...
## 
## A3SS
## 
## A5SS
## 
## AFE
## 
## ALE
## 
## MXE
## 
## RI
## 
## SE
## 
## Cleaning the annotation...

MISO annotation

Simply retrieve MISO’s alternative splicing annotation and give the path to the downloaded folder as input.

## 
## Retrieving MISO annotation...
## 
## Parsing MISO annotation...
## 
## Sorting coordinates...
## 
## A3SS MISO
## 
## A5SS MISO
## 
## AFE MISO
## 
## ALE MISO
## 
## MXE MISO
## 
## TandemUTR MISO
## 
## Joining events per event type...
## 
## A3SS
## 
## A5SS
## 
## AFE
## 
## ALE
## 
## MXE
## 
## RI
## 
## SE
## 
## TandemUTR
## 
## Cleaning the annotation...

VAST-TOOLS annotation

Simply retrieve VAST-TOOLS’s alternative splicing annotation and give the path to the downloaded folder as input. Note that, however, complex events (i.e. alternative coordinates for the exon ends) are not yet parseable.

## 
## Retrieving VAST-TOOLS annotation...
## 
## Parsing VAST-TOOLS annotation...
## 
## ALT3
## 
## ALT5
## 
## COMBI
## 
## IR
## 
## MERGE3m
## 
## MIC
## 
## EXSK
## 
## MULTI
## 
## Sorting coordinates...
## 
## A3SS VAST-TOOLS
## 
## A5SS VAST-TOOLS
## 
## Joining events per event type...
## 
## A3SS
## 
## A5SS
## 
## RI
## 
## SE
## 
## Cleaning the annotation...

Combining annotation from different sources

To combine the annotation from different sources, provide the parsed annotations of interest simultaneously to the function prepareAnnotationFromEvents:

## 
## Retrieving SUPPA annotation...
## 
## Parsing SUPPA annotation...
## 
## Retrieving MISO annotation...
## 
## Parsing MISO annotation...
## 
## Retrieving rMATS annotation...
## 
## Parsing rMATS annotation...
## 
## Retrieving VAST-TOOLS annotation...
## 
## Parsing VAST-TOOLS annotation...
## 
## ALT3
## 
## ALT5
## 
## COMBI
## 
## IR
## 
## MERGE3m
## 
## MIC
## 
## EXSK
## 
## MULTI
## 
## Sorting coordinates...
## 
## A3SS MATS
## 
## A3SS MISO
## 
## A3SS SUPPA
## 
## A3SS VAST-TOOLS
## 
## A5SS MATS
## 
## A5SS MISO
## 
## A5SS SUPPA
## 
## A5SS VAST-TOOLS
## 
## AFE MATS
## 
## AFE MISO
## 
## AFE SUPPA
## 
## ALE MATS
## 
## ALE MISO
## 
## ALE SUPPA
## 
## MXE MATS
## 
## MXE MISO
## 
## MXE SUPPA
## 
## TandemUTR MISO
## 
## Joining events per event type...
## 
## A3SS
## 
## A5SS
## 
## AFE
## 
## ALE
## 
## MXE
## 
## RI
## 
## SE
## 
## TandemUTR
## 
## Cleaning the annotation...

Quantifying alternative splicing using the custom annotation

The created alternative splicing annotation can be used in psichomics for alternative splicing quantification. To do so, when using the GUI version of psichomics, be sure to select the Load annotation from file… option, click the button that appears below and select the recently created RDS file.

Otherwise, if you are using the CLI version, perform the following steps:

annot <- readRDS(annotFile) # "file" is the path to the annotation file
junctionQuant <- readFile("ex_junctionQuant.RDS") # example set

psi <- quantifySplicing(annot, junctionQuant, 
                        c("SE", "MXE", "A3SS", "A5SS", "AFE", "ALE"))
##   |                                        |   0% 
  |========                                |  20% 
  |================                        |  40% 
  |========================                |  60% 
  |================================        |  80% 
  |========================================| 100% 
psi # may have 0 rows because of the small junction quantification set
##                                              Normal 1  Normal 2 Normal 3
## SE_1_+_23385660_23385840_23385851_23395032_ 0.7777778 0.4444444      0.6
##                                             Cancer 1  Cancer 2  Cancer 3
## SE_1_+_23385660_23385840_23385851_23395032_      0.4 0.4285714 0.5555556

Feedback

All feedback on the program, documentation and associated material (including this tutorial) is welcome. Please send any suggestions and comments to:

Nuno Saraiva-Agostinho (nunoagostinho@medicina.ulisboa.pt)

Disease Transcriptomics Lab, Instituto de Medicina Molecular (Portugal)