getAnansi | R Documentation |
getAnansi
provides a wrapper to execute the anansi pipeline on a
MultiAssayExperiment::MultiAssayExperiment()
object. It applies the functions weaveWeb()
and
anansi()
in the given order.
getAnansi(x, ...)
## S4 method for signature 'MultiAssayExperiment'
getAnansi(
x,
formula,
link = NULL,
tableY = NULL,
tableX = NULL,
...,
force_new = FALSE
)
x |
a |
... |
additional parameters that can be passed to
|
formula |
A formula object. Used to assess differential associations. |
link |
One of the following:
|
tableY , tableX |
|
force_new |
|
This wrapper of anansi()
allows to perform a complete anansi
analysis directly on objects of class
MultiAssayExperiment::MultiAssayExperiment()
. First, the assays from
experiments specified by tableX
and tableY
are passed to AnansiWeb()
to
build an AnansiWeb object. If there are more than one assay in that
experiment, the specific assay can by specified using assay.type1
and
assay.type2
. Next, this object is fed to the main anansi()
function to
compute interactions between the two assays.
If return.format
is "table"
(default), a wide format data.frame
intended to be compatible with ggplot2
, or specialized plotting functions
(See plotAnansi()
). If return.format
is
"list"
, a list with aforementioned table, as well as input and
additional information. If return.format
is "raw"
, a list of
raw output (used for testing purposes).
AnansiWeb()
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
)
# View subset of results
head(out, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.