addIntronInTranscript: Add a retained intron to the transcripts it is skipped by

Description Usage Arguments Value Author(s) See Also Examples

View source: R/IntronRetention.R

Description

Add a retained intron to the transcripts it is skipped by

Usage

1
2
addIntronInTranscript(flankingExons, exons, whippetDataSet = NULL,
  match = "exact", glueExons = TRUE)

Arguments

flankingExons

data.frame generataed by findIntronContainingTranscripts()

exons

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

whippetDataSet

whippetDataSet generated from readWhippetDataSet()

match

what type of match replacement should be done? exact: exact matches to the intron only retain: keep non-exact intron match coordinates in spliced sets, and retain them in retained sets replace: replace non-exact intron match coordinates with event coordinates in spliced sets, and retain in retained sets

glueExons

Join together exons that are not seperated by introns?

Value

GRanges with transcripts containing retained introns

Author(s)

Beth Signal

See Also

Other whippet splicing isoform creation: findExonContainingTranscripts, findIntronContainingTranscripts, findJunctionPairs, replaceJunction, skipExonInTranscript

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
whippetFiles <- system.file("extdata","whippet/",
package = "GeneStructureTools")
wds <- readWhippetDataSet(whippetFiles)
wds <- filterWhippetEvents(wds)

gtf <- rtracklayer::import(system.file("extdata","example_gtf.gtf",
package = "GeneStructureTools"))
exons <- gtf[gtf$type=="exon"]
g <- BSgenome.Mmusculus.UCSC.mm10::BSgenome.Mmusculus.UCSC.mm10

wds.intronRetention <- filterWhippetEvents(wds, eventTypes="RI")
exons.intronRetention <- findIntronContainingTranscripts(wds.intronRetention, exons)
IntronRetentionTranscripts <- addIntronInTranscript(exons.intronRetention, exons,
whippetDataSet=wds.intronRetention)

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

IntronRetentionTranscripts <-
addIntronInTranscript(exons.intronRetention, exons, match="retain")

GeneStructureTools documentation built on Nov. 8, 2020, 6:04 p.m.