Description Usage Arguments Value Author(s) Examples
View source: R/extendPointPresence.R
Single-point annotations are annotations that cover only 1 base in the genome.
For example, a gene border such as the TSS or TES.
To study the neighborhood of genes/features in terms of single-point annotation,
we first extract annotation profiles using annotationCoverageAroundFeatures
(with usePercent=TRUE
).
Then we use this function extendPointPresence
which, for each gene/feature,
defines the location of the closest single-point annotation at each border and for each strand
and extends its presence to all subsequent positions.
1 | extendPointPresence(annotprofiles, sidedist = 2000L)
|
annotprofiles |
An RleList similar to the one produced by the |
sidedist |
an integer distance (in bp) around borders |
a list of 4 matrices with (extended) presence profiles at:
upS
: the upstream border on the same strand ("sense")
upAS
: the upstream border on the opposite strand ("antisense")
dnS
: the downstream border on the same strand ("sense")
dnAS
: the downstream border on the opposite strand ("antisense")
Pascal GP Martin
1 2 3 4 5 6 7 8 9 10 | ## Get the TSS of all genes:
tss <- GenomicRanges::promoters(Genegr, upstream = 0, downstream = 1)
## Get their (presence/absence) coverage around (+/-50bp) genes (with 3 bins/gene):
tsscov <- annotationCoverageAroundFeatures(annot = tss,
features = Genegr,
sidedist = 50,
usePercent = TRUE,
nbins = 3)
## For each gene, find the closest TSS and extend its presence to subsequent positions:
extTSScov <- extendPointPresence(tsscov, sidedist=50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.