plotAnnot {CAGEr} | R Documentation |
Plot maping statistics of an object containing mapping statistics in counts as percentages in stacked barplots.
plotAnnot(x, scope, title, group = "default", facet = NULL, normalise = TRUE) ## S4 method for signature 'data.frame' plotAnnot(x, scope, title, group = "default", facet = NULL, normalise = TRUE) ## S4 method for signature 'DataFrame' plotAnnot(x, scope, title, group = "default", facet = NULL, normalise = TRUE) ## S4 method for signature 'CAGEexp' plotAnnot(x, scope, title, group = "default", facet = NULL, normalise = TRUE)
x |
An object from which can be extracted a table with columns named
|
scope |
The name of a “scope”, that defines which data is plotted
and how it is normalised, or a function implementing that scope.
See |
title |
The title of the plot. |
group |
A factor to group the samples, or the name of a |
facet |
A factor or the name of a |
normalise |
Whether to normalise or not. Default: TRUE. |
Stacked barplots with error bars inspired from http://stackoverflow.com/questions/10417003/stacked-barplot-with-errorbars-using-ggplot2. See http://www.biomedcentral.com/1471-2164/14/665/figure/F1 for example.
Returns invisibly a ggplot2
object of class c("gg", "ggplot")
.
Charles Plessy
mapStats()
for a list of scopes.
Other CAGEr annotation functions: annotateCTSS
,
ranges2annot
, ranges2genes
,
ranges2names
Other CAGEr plot functions: hanabiPlot
,
plotCorrelation
,
plotExpressionProfiles
,
plotInterquantileWidth
,
plotReverseCumulatives
p <- plotAnnot(exampleCAGEexp, 'counts', 'Here is the title') print(p) p + ggplot2::theme_bw() ggplot2::theme_set(ggplot2::theme_bw()) ; p plotAnnot(exampleCAGEexp, 'counts', 'Same, non-normalised', normalise = FALSE) exampleCAGEexp$myGroups <- c("A", "A", "B", "B", "C") plotAnnot(exampleCAGEexp, 'counts', group = "myGroups") plotAnnot(exampleCAGEexp, CAGEr:::msScope_counts , group = "myGroups")