# Spliced vs. unspliced ratios for transcripts in RNA-seq data

Is there a computational tool for measuring what percentage of RNA is spliced in an RNAseq experiment?

I'm not particularly interested in complicated analyses that give ratios for all possible alternative splicing variations. I'd rather have a binary classification. For example: (RNA1 = 35% spliced, 65% unspliced)

We're very early in the exploratory stage, so a specific hypothesis is still forming. But we're interested in the sequence content of lncRNAs, many of which are poorly spliced. So we want to get a sense for how prevalent unspliced version of these transcript are.

Because this is currently exploratory, estimations and noise are fairly acceptable. A very basic approach might be to calculate the ratio of reads that map to exon-to-exon junctions, verses those that map from exon-to-intro junctions.

A more advanced approach I'm also considering is Salmon.

• Did you ever settle on something? I have the same question as you. – kmace Mar 9 '18 at 0:26
• We ended up using aligning with STAR then quantifying with salmon. We gave salmon all known splice variants, including the unspliced annotation. Then we summed all spliced isoforms to get "spliced vs. unspliced". This pipeline was easy, accurate, and we were really satisfied with the result. – Jessime Kirk Mar 9 '18 at 3:14

I don't know about tools, but i've used the following python code to calculate the ratio of reads that overlap the 5' or 3' ends of introns or that are spliced. We sum these across all introns in a gene set (we actaully use this for iCLIP analysis to see if RNA binding proteins bind pre-mRNA or spliced RNA).

import pysam
from collections import Counter
from CGAT import GTF, IOTools

def calculateSplicingIndex(bamfile, gtffile, outfile):

bamfile = pysam.AlignmentFile(bamfile)

counts = Counter()

for transcript in GTF.transcript_iterator(
GTF.iterator(IOTools.openFile(gtffile))):

introns = GTF.toIntronIntervals(transcript)

for intron in introns:
reference=transcript[0].contig,
start=intron[0], end=intron[1])

starts, ends = zip(*blocks)
if intron[0] in ends and intron[1] in starts:
counts["Exon_Exon"] += 1
else:
counts["spliced_uncounted"] += 1
elif (read.reference_start <= intron[0] - 3
and read.reference_end >= intron[0] + 3):
if transcript[0].strand == "+":
counts["Exon_Intron"] += 1
else:
counts["Intron_Exon"] += 1
elif (read.reference_start <= intron[1] - 3
and read.reference_end >= intron[1] + 3):
if transcript[0].strand == "+":
counts["Intron_Exon"] += 1
else:
counts["Exon_Intron"] += 1
else:
counts["unspliced_uncounted"] += 1

"Exon_Intron",
"Intron_Exon",
"spliced_uncounted",
"unspliced_uncounted"]

with IOTools.openFile(outfile, "w") as outf: