plotAnnot | R Documentation |
Extracts processing and alignment statistics from a CAGEr object and plots them as counts or percentages in stacked barplots.
plotAnnot(
x,
scope,
title,
group = "sampleLabels",
facet = NULL,
normalise = TRUE
)
## S4 method for signature 'data.frame'
plotAnnot(
x,
scope,
title,
group = "sampleLabels",
facet = NULL,
normalise = TRUE
)
## S4 method for signature 'DataFrame'
plotAnnot(
x,
scope,
title,
group = "sampleLabels",
facet = NULL,
normalise = TRUE
)
## S4 method for signature 'CAGEexp'
plotAnnot(
x,
scope,
title,
group = "sampleLabels",
facet = NULL,
normalise = TRUE
)
## S4 method for signature 'GRangesList'
plotAnnot(
x,
scope,
title,
group = "sampleLabels",
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: |
When given a CAGEexp
object or its column data, what will be counted is
the number of CAGE tags. When given cluster objects (CTSS
,
TagClusters
or ConsensusClusters
) wrapped as
a GenomicRanges::GRangesList
, what will be counted is the number of
clusters.
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 a ggplot2::ggplot
object.
Charles Plessy
mapStats
for a list of scopes.
Other CAGEr annotation functions:
annotateCTSS()
,
ranges2annot()
,
ranges2genes()
,
ranges2names()
Other CAGEr plot functions:
TSSlogo()
,
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 <- factor(c("A", "A", "B", "B", "C"))
plotAnnot(exampleCAGEexp, 'counts', group = "myGroups")
plotAnnot(exampleCAGEexp, 'counts', group = ~myGroups)
plotAnnot(exampleCAGEexp, 'counts', group = ~sampleLabels + myGroups)
plotAnnot(exampleCAGEexp, CAGEr:::msScope_counts , group = "myGroups")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.