plotCumulPercentProfile: Plot the cumulative proportions obtained from...

Description Usage Arguments Value Author(s) See Also

View source: R/plotCumulPercentProfile.R

Description

Plot the cumulative proportions obtained from getCumulPercentProfiles

Usage

1
plotCumulPercentProfile(cumulprofs, gscolors = NULL, freeY = FALSE)

Arguments

cumulprofs

A data frame with cumulative percentage profiles for different gene sets. As produced by the getCumulPercentProfiles function.

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

Value

A ggplot object

Author(s)

Pascal GP Martin

See Also

getCumulPercentProfiles

#' @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)


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