extendLeaders {ORFik} | R Documentation |
Will extend the leaders or transcripts upstream (5' end) by extension.
Remember the extension is general not relative, that means splicing
will not be taken into account.
Requires the grl
to be sorted beforehand,
use sortPerGroup
to get sorted grl.
extendLeaders(grl, extension = 1000L, cds = NULL)
grl |
usually a |
extension |
an integer, how much to extend upstream (5' end). Eiter single value that will apply for all, or same as length of grl which will give 1 update value per grl object. Or a GRangesList where start / stops by strand are the positions to use as new starts. |
cds |
a |
an extended GRangeslist
Other ExtendGenomicRanges:
asTX()
,
coveragePerTiling()
,
extendTrailers()
,
reduceKeepAttr()
,
tile1()
,
txSeqsFromFa()
,
windowPerGroup()
library(GenomicFeatures) samplefile <- system.file("extdata", "hg19_knownGene_sample.sqlite", package = "GenomicFeatures") txdb <- loadDb(samplefile) fiveUTRs <- fiveUTRsByTranscript(txdb) # <- extract only 5' leaders tx <- exonsBy(txdb, by = "tx", use.names = TRUE) cds <- cdsBy(txdb,"tx",use.names = TRUE) ## now try(extend upstream 1000, downstream 1st cds exons): extendLeaders(fiveUTRs, extension = 1000, cds) ## when extending transcripts, don't include cds' of course, ## since they are already there extendLeaders(tx, extension = 1000)