findIntronContainingTranscripts: Given the location of a whole retained intron, find...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/IntronRetention.R

Description

Given the location of a whole retained intron, find transcripts which splice out this intron

Usage

1
findIntronContainingTranscripts(input, exons, match = "exact")

Arguments

input

whippetDataSet generated from readWhippetDataSet() or a Granges of intron coordinates

exons

GRanges object made from a GTF with ONLY exon annotations (no gene, transcript, CDS etc.)

match

what type of matching to perform? exact = only exons which bound the intron exactly, introns = any exon pairs which overlap the intron, all = any exon pairs AND single exons which overlap the intron

Value

data.frame with all flanking exon pairs

Author(s)

Beth Signal

See Also

Other whippet splicing isoform creation: addIntronInTranscript(), alterTranscriptStartEnds(), findExonContainingTranscripts(), findJunctionPairs(), replaceJunction(), skipExonInTranscript()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
gtf <- rtracklayer::import(system.file("extdata", "gencode.vM25.small.gtf", package = "GeneStructureTools"))
exons <- gtf[gtf$type == "exon"]
g <- BSgenome.Mmusculus.UCSC.mm10::BSgenome.Mmusculus.UCSC.mm10

whippetFiles <- system.file("extdata", "whippet_small/",
    package = "GeneStructureTools"
)
wds <- readWhippetDataSet(whippetFiles)

wds.intronRetention <- filterWhippetEvents(wds, eventTypes = "RI")
exons.intronRetention <- findIntronContainingTranscripts(input = wds.intronRetention, exons)

exonsFromGRanges <- exons[exons$transcript_id == "ENSMUST00000040372.13" &
    exons$exon_number %in% c(2, 3)]
intronFromGRanges <- exonsFromGRanges[1]
GenomicRanges::start(intronFromGRanges) <-
    GenomicRanges::end(exonsFromGRanges[exonsFromGRanges$exon_number == 2])
GenomicRanges::end(intronFromGRanges) <-
    GenomicRanges::start(exonsFromGRanges[exonsFromGRanges$exon_number == 3])
exons.intronRetention <- findIntronContainingTranscripts(intronFromGRanges, exons)

betsig/GeneStructureTools documentation built on March 31, 2021, 4:43 a.m.