R/plots-interactive.R
iplot.Rd
It is informative to look at the individual log fold changes of the genes within a gene set to explore the degree to which they (1) are coherent with respect to each other; and (2) see how the compare to the background distribution of log fold changes of the entire transcriptome.
You can visualize this behavior via a type = "density"
plot, or a
type = "boxplot". It is also common to plot either the individual log fold changes
value = "logFC"or t-statistics
value = "t"`.
A SparrowResult()
object
the name of the geneset to plot
A string indicating the column name for the value of the
gene-level metadata to plot. Default is "logFC"
. Anoter often used choice
might also be "t"
, to plot t-statistics (if they're in the result). But
this can be any numeric column found in the data.frame returned by
geneSet(x, y, j)
. If this is a named string (vector), then the value in
names(value)
will be used on the axis when plotted.
plot the distributions as a "density"
plot or "boxplot"
.
the tools to display in the rbokeh plot
A title to display. If not specified, the gene set name
will be used, otherwise you can pass in a custom title, or NULL
will disable the title altogether.
Draws a legend to map point color to meaning. There are three levels a point (gene level statistic) can be color as, "notsig", "psig", and "sig". "notsig" implies that the FDR >= 10%, "psig" means that FDR <= 10%, but the logFC is "unremarkable" (< 1), and "sig" means that both the FDR <= 10% and the logFC >= 1
If you have genesets with duplicate names in x
(only possible with a GeneSetDb
object), provide the name of the
collection here to disambiguate (default: NULL
).
the name of this element that is used in shiny callbacks.
Defaults to "mggenes"
.
the width and height of the output plotly plot
a ggplot theme, like the thing returned from
ggplot2::theme_bw()
, for instance.
used to define the upper and lower quantiles to max out the individual gene statistics in the selected geneset.
pass through parameters to internal boxplot/density/gsea plotting functions
the ploty plot object
mgr <- exampleSparrowResult()
iplot(mgr, "BURTON_ADIPOGENESIS_PEAK_AT_2HR",
value = c("t-statistic" = "t"),
type = "density")
iplot(mgr, "BURTON_ADIPOGENESIS_PEAK_AT_2HR",
value = c("log2FC" = "logFC"),
type = "boxplot")
iplot(mgr, "BURTON_ADIPOGENESIS_PEAK_AT_2HR",
value = c("-statistic" = "t"),
type = "gsea")
#> Loading required namespace: fgsea