Description Usage Arguments Value Author(s) See Also
View source: R/plotCumulPercentProfile.R
Plot the cumulative proportions obtained from getCumulPercentProfiles
1 | plotCumulPercentProfile(cumulprofs, gscolors = NULL, freeY = FALSE)
|
cumulprofs |
A data frame with cumulative percentage profiles for different gene sets. As produced by the |
gscolors |
Optional named character vector with colors per gene sets |
freeY |
Logical (defaults to FALSE) indicating if y-axis scales for panels/facets should be different |
A ggplot object
Pascal GP Martin
#' @examples ## 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)) ## Plot plotCumulPercentProfile(CP)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.