filterGtfOverlap: Filter a GTF overlap to remove exons when exon is annotated...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/OverlapFunctions.R

Description

Filter a GTF overlap to remove exons when exon is annotated as a CDS/UTR

Usage

1
filterGtfOverlap(gtf.from)

Arguments

gtf.from

GRanges object of the GTF produced from an overlap

Value

GRanges object of the GTF with redundant exons removed

Author(s)

Beth Signal

See Also

Other gtf manipulation: UTR2UTR53, addBroadTypes, exonsToTranscripts, removeDuplicateTranscripts, removeSameExon, reorderExonNumbers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gtfFile <- system.file("extdata","example_gtf.gtf",
package = "GeneStructureTools")
gtf <- rtracklayer::import(gtfFile)
overlap <- as.data.frame(GenomicRanges::findOverlaps(gtf[which(gtf$type=="CDS")[1]], gtf))
table(gtf$type[overlap$subjectHits])
overlapFiltered <- filterGtfOverlap(gtf[overlap$subjectHits])
table(overlapFiltered$type[overlap$subjectHits])
overlap <- as.data.frame(GenomicRanges::findOverlaps(gtf[which(
gtf$transcript_type=="retained_intron")[1]],gtf))
table(gtf$type[overlap$subjectHits])
overlapFiltered <- filterGtfOverlap(gtf[overlap$subjectHits])
table(overlapFiltered$type[overlap$subjectHits])

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