| removeDuplicateTranscripts {GeneStructureTools} | R Documentation |
Removes Structural duplicates of transcripts in a GRanges object Note that duplicates must have different transcript ids.
removeDuplicateTranscripts(transcripts)
transcripts |
GRanges object with transcript structures in exon form |
GRanges object with unique transcript structures in exon form
Beth Signal
Other gtf manipulation: UTR2UTR53,
addBroadTypes,
exonsToTranscripts,
filterGtfOverlap,
removeSameExon,
reorderExonNumbers
gtf <- rtracklayer::import(system.file("extdata","example_gtf.gtf",
package = "GeneStructureTools"))
exons <- gtf[gtf$type=="exon"]
exons.altName <- exons
exons.altName$transcript_id <- paste(exons.altName$transcript_id, "duplicated", sep="_")
exons.duplicated <- c(exons, exons.altName)
length(exons.duplicated)
exons.deduplicated <- removeDuplicateTranscripts(exons.duplicated)
length(exons.deduplicated)