SPLINTER provides tools to analyze alternative splicing sites, interpret outcomes based on sequence information, select and design primers for site validiation and give visual representation of the event to guide downstream experiments.

Loading the package

To load the r Biocpkg("SPLINTER") package:


Initializing the genome for transcript selection

In this example, we will be utilizing the mm9 genome for mouse. You will need to install the appropriate package (eg. r Biocpkg("BSgenome.Mmusculus.UCSC.mm9")) for the genome that you will be using.

bsgenome <- BSgenome.Mmusculus.UCSC.mm9

We begin with full set of available transcripts to screen from, and read it into a \Rclass{TxDb} object. One source of this (best option to ensure compatibility) would be the GTF file that you have used for alternative splicing analysis. For other sources of data, please refer to r Biocpkg("GenomicFeatures")).

We then extract the coding sequences (CDS), and transcripts in general (coding and non-coding) (exons) from this object.

txdb <- makeTxDbFromGFF(file=gtf_file,chrominfo = Seqinfo(genome="mm9"))

# txdb generation can take quite long, you can save the object and load it the next time
# saveDb(txdb,file="txdb_hg19.sqlite")
# txdb<-loadDb(file="txdb_hg19.sqlite")

# extract CDS and exon information from TxDb object

Reading in the splicing analysis file

The output file from MATS is used here, but essentially all that is needed are coordinates of the exons (target and flanking) involved in the splicing processt to be studied. For the case of exon skipping, this will include the upstream, target and downstream exons. More output types will be supported in the future.


The following types of alternative splicing events are accepted:

Type of alternative splicing event | Definition ------------- | ------------- SE | Skipped exon RI | Retained intron MXE | Mutually exclusive exon A5SS | Alternative 5' splice site A3SS | Alternative 3' splice site

splice_data <-extractSpliceEvents(data=mats_file, filetype='mats', splicetype=typeofAS)

Additional annotation

r Biocpkg("SPLINTER") assumes that the main identifier is ENSEMBL, however gene symbols can be added.


# (Optional) Sorting the dataframe, if you have supporting statistical information


Analyzing a specific gene

Inspecting a single gene in more detail (single record)

Once we have defined the events, we will pick 1 event to analyze.

pp<-which(grepl(single_id,splice_data$data$Symbol)) # Prmt5 has 1 record

splice_data$data[pp,c(1:6)] # show all records


Finding relevant transcripts from the ENSEMBL database

To reduce search complexity, we define the valid transcripts and coding sequences with regards to our gene of interest. We find that Prmt5 has 7 transcripts, 2 of which are coding sequences.

valid_tx <- findTX(id=single_record$ID,tx=theexons,db=txdb)

valid_cds<- findTX(id=single_record$ID,tx=thecds,db=txdb)

Constructing the region of interest (ROI)

The makeROI function will create a list containing GRanges objects for the splicing event. This will help identify and construct relevant outputs later.

This list contains the following information:


Type of alternative splicing | Type 1 representation | Type 2 representation (annotated only) ------------------- | ------------------------ | ------------------------- SE | isoform with event exon included | isoform with the exon skipped RI | isoform with normal exon boundaries | isoform with the intron retained MXE | isoform defined 1st (leftmost) in input | isoform defined 2nd in input A5SS | isoform with longer exon | isoform with shorter exon A3SS | isoform with longer exon | isoform with shorter exon

roi <- makeROI(single_record,type="SE")

Finding transcripts that contain the ROI

At this juncture, we look for transcripts are compatible with the ROI. Compatibility is defined as having the exact cassette (matching upstream, target, downstream) exons. In the case of intron retention, this would just be the 2 exons flanking the intron.

We notice here that Prmt5 only has 1 compatible transcript involved in the event ROI, out of 7 transcripts (or 2 coding transcripts). There are no Type 2 transcripts, which means there are no annotated transcripts of Prmt5 containing the alternative event.

compatible_tx<- findCompatibleEvents(valid_tx,roi=roi,verbose=TRUE)

compatible_cds<- findCompatibleEvents(valid_cds,valid_tx,roi=roi,verbose=TRUE)


Simulating alternatively spliced products

Simulating the outcome of exon skipping by removing an exonic region

region_minus_exon <-removeRegion(compatible_cds$hits[[1]],roi)

Simulating the outcome of intron retention by inserting an intronic region

# Not relevant for this Prmt5 skipped exon example
region_plus_exon <-insertRegion(region_minus_exon,roi)

Comparing sequences before and after removal/insertion of a region




Designing primers to inspect splicing regions

Getting the DNA of the region of interest

This function will return the DNA of the ROI, with exons separated by "[]" (Primer3 notation) and the junction marked by jstart.


Using Primer3 to design primers for alternative splicing identification

We have included a helper function to run Primer3 from within R. You will need to define the path to your Primer3 installation. Refer to ?callPrimer3 for more details.

primers<-callPrimer3(seq=aa$seq,sequence_target = aa$jstart,size_range='100-500')

Alternatively, primers can be entered manually with the appropriate headers.


Checking primers coverage

As a confirmation, we can run the primers against the ROI to give the genomic location of the primer coverage.



Predicting PCR results using the primers

getPCRsizes will give you the length of the PCR product produced by the set of primers.


tx_minus_exon <-removeRegion(compatible_tx$hits[[1]],roi)

Selecting sizes relevant to splicing event (subset of getPCRsizes)

While getPCRsizes will return all possible PCR products for a given set of annotation, splitPCRhit will return PCR product sizes that are relevant to the splicing event in question.



Plotting results

# reading in BAM files

# Plotting genomic range, read density and splice changes

# Barplot of PSI values if provided

Session info


Try the SPLINTER package in your browser

Any scripts or data that you put into this service are public.

SPLINTER documentation built on Nov. 8, 2020, 8:13 p.m.