extendPointPresence: Extend the presence value (1) of the closest single-point...

Description Usage Arguments Value Author(s) Examples

View source: R/extendPointPresence.R

Description

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.

Usage

1
extendPointPresence(annotprofiles, sidedist = 2000L)

Arguments

annotprofiles

An RleList similar to the one produced by the annotationCoverageAroundFeatures function.

sidedist

an integer distance (in bp) around borders

Value

a list of 4 matrices with (extended) presence profiles at:

Author(s)

Pascal GP Martin

Examples

 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)

pgpmartin/GeneNeighborhood documentation built on Sept. 2, 2021, 6:37 a.m.