Description Usage Arguments Value Author(s) See Also Examples
View source: R/getCumulPercentProfiles.R
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.
1 | getCumulPercentProfiles(extMat, genesets = NULL)
|
extMat |
A list with 4 matrices named upS, upAS, dnS and dnAS.
Typically obtained with the |
genesets |
a list of gene sets (character vectors) for which cumulative percentages should be obtained |
a data frame with columns:
Percent
: cumulative percentage when the distance from the gene borders increases
GeneSet
: Name of the gene sets. Taken from names(genesets)
if not NULL
Position
: Integer giving the genomic position (Negative values for upstream, positive for downstream)
Side
: Character string indicating "Upstream" or "Downstream"
Strand
: Character string indicating "sense" or "antisense"
Pascal GP Martin
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.