getCumulPercentProfiles: For gene sets, obtain the cumulative percentage of genes with...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getCumulPercentProfiles.R

Description

For different sets of genes defined in genesets, calculate the cumulative percentage of genes that have at least one single-point annotation when the distance from the gene borders increases.

Usage

1
getCumulPercentProfiles(extMat, genesets = NULL)

Arguments

extMat

A list with 4 matrices named upS, upAS, dnS and dnAS. Typically obtained with the extendPointPresence function

genesets

a list of gene sets (character vectors) for which cumulative percentages should be obtained

Value

a data frame with columns:

Author(s)

Pascal GP Martin

See Also

extendPointPresence

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Get the TES of all genes:
  tes <- getTES(Genegr)
## Get their (presence/absence) coverage around (+/-50bp) genes (with 3 bins/gene):
  tescov <- annotationCoverageAroundFeatures(annot = tes,
                                             features = Genegr,
                                             sidedist = 50,
                                             usePercent = TRUE,
                                             nbins = 3)
## For each gene, find the closest TES and extend its presence to subsequent positions:
  extTEScov <- extendPointPresence(tescov, sidedist=50)
## Identify genes with a TES at less than 6bp from their TES, on any strand
  require(GenomicRanges)
  Dist2TES <- mcols(distanceToNearest(tes, ignore.strand = TRUE))$distance
  CloseTES <- names(Genegr)[Dist2TES<6]
  NotCloseTES <- names(Genegr)[Dist2TES>=6] #Also get the complementary set
## Calculate the cumulative percentage as the distance increases:
  CP <- getCumulPercentProfiles(extTEScov,
                                list("All" = names(Genegr),
                                     "CloseTES" = CloseTES,
                                     "FarTES" = NotCloseTES))

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