plotAnansi | R Documentation |
plotAnansi
generates a standard dissociation plot from the output of
getAnansi()
in the table format. It provides a convenient way to
visually assess relevant results from the anansi analysis.
plotAnansi(x, ...)
plotAnansi(x, ...)
## S4 method for signature 'data.frame'
plotAnansi(
x,
association.type = NULL,
model.var = NULL,
signif.threshold = NULL,
colour_by = NULL,
color_by = colour_by,
fill_by = "group",
size_by = NULL,
shape_by = NULL,
y_position = "right",
x_lab = "cor",
y_lab = ""
)
x |
a |
... |
additional arguments |
association.type |
|
model.var |
|
signif.threshold |
|
colour_by |
|
color_by |
|
fill_by |
|
size_by |
|
shape_by |
|
y_position |
|
x_lab |
|
y_lab |
|
plotAnansi
provides a standardised method to visualise the results
of anansi by means of a differential association plot. The input for this
function should be generated from getAnansi()
or
anansi()
, with return.format = "table"
A ggplot2 object.
getAnansi()
anansi()
# Import libraries
library(mia)
library(TreeSummarizedExperiment)
library(MultiAssayExperiment)
web <- randomWeb(n_samples = 100)
mae <- as(web, "MultiAssayExperiment")
# Perform anansi analysis
out <- getAnansi(mae,
tableY = "y", tableX = "x",
formula = ~group_ab
)
# Select significant interactions
out <- out[out$full_p.values < 0.05, ]
# Visualise disjointed associations filled by group
plotAnansi(out,
association.type = "disjointed",
model.var = "group_ab",
signif.threshold = 0.05,
fill_by = "group"
)
# Visualise full associations filled by group
plotAnansi(out,
association.type = "full",
signif.threshold = 0.05,
fill_by = "group"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.