filterGtfOverlap {GeneStructureTools} | R Documentation

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

### Description

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

### Usage

    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

    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])

[Package GeneStructureTools version 1.14.0 Index]