Description Usage Arguments Value See Also Examples
View source: R/ranges_helpers.R
Will extend the leaders or transcripts upstream (5' end) by extension.
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.
1 2 3 4 5 6 | extendLeaders(
grl,
extension = 1000L,
cds = NULL,
is.circular = all(isCircular(grl) %in% TRUE)
)
|
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 |
is.circular |
logical, default FALSE if not any is: all(isCircular(grl) Where grl is the ranges checked. If TRUE, allow ranges to extend below position 1 on chromosome. Since circular genomes can have negative coordinates. |
an extended GRangeslist
Other ExtendGenomicRanges:
asTX()
,
coveragePerTiling()
,
extendTrailers()
,
reduceKeepAttr()
,
tile1()
,
txSeqsFromFa()
,
windowPerGroup()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(GenomicFeatures)
samplefile <- system.file("extdata", "hg19_knownGene_sample.sqlite",
package = "GenomicFeatures")
txdb <- loadDb(samplefile)
fiveUTRs <- fiveUTRsByTranscript(txdb, use.names = TRUE) # <- extract only 5' leaders
tx <- exonsBy(txdb, by = "tx", use.names = TRUE)
cds <- cdsBy(txdb,"tx",use.names = TRUE)
## extend leaders upstream 1000
extendLeaders(fiveUTRs, extension = 1000)
## now try(extend upstream 1000, add all 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)
## Circular genome (allow negative coordinates)
circular_fives <- fiveUTRs
isCircular(circular_fives) <- rep(TRUE, length(isCircular(circular_fives)))
extendLeaders(circular_fives, extension = 32672841L)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.