cbea | R Documentation |
cbea
is used compute enrichment scores
per sample for pre-defined sets using the CBEA
(Competitive Balances for Enrichment Analysis).
cbea( obj, set, output, distr = NULL, adj = FALSE, n_perm = 100, parametric = TRUE, thresh = 0.05, init = NULL, control = NULL, parallel_backend = NULL, ... ) ## S4 method for signature 'TreeSummarizedExperiment' cbea( obj, set, output, distr = NULL, abund_values, adj = FALSE, n_perm = 100, parametric = TRUE, thresh = 0.05, init = NULL, control = NULL, parallel_backend = NULL, ... ) ## S4 method for signature 'data.frame' cbea( obj, set, taxa_are_rows = FALSE, id_col = NULL, output, distr = NULL, adj = FALSE, n_perm = 100, parametric = TRUE, thresh = 0.05, init = NULL, control = NULL, parallel_backend = NULL, ... ) ## S4 method for signature 'matrix' cbea( obj, set, taxa_are_rows = FALSE, output, distr = NULL, adj = FALSE, n_perm = 100, parametric = TRUE, thresh = 0.05, init = NULL, control = NULL, parallel_backend = NULL, ... )
obj |
The element of class |
set |
|
output |
(String). The form of the output of the model.
Has to be either |
distr |
(String). The choice of distribution for the null. Can be either |
adj |
(Logical). Whether correlation adjustment procedure is utilized. Defaults to FALSE. |
n_perm |
(Numeric). Add bootstrap resamples to both the permuted and unpermuted data set. This might help with stabilizing the distribution fitting procedure, especially if the sample size is low. Defaults to 1. |
parametric |
(Logical). Indicate whether a parametric distribution will be fitted to estimate
z-scores, CDF values, and p-values. Defaults to |
thresh |
(Numeric). Threshold for significant p-values if |
init |
(Named List). Initialization parameters for estimating the null distribution. Default is NULL. |
control |
(Named List). Additional arguments to be passed to
|
parallel_backend |
See documentation |
... |
Additional arguments not used at the moment. |
abund_values |
(Character). Character value for selecting the |
taxa_are_rows |
(Logical). Indicate whether the data frame or matrix has taxa as rows |
id_col |
(Character Vector). Vector of character to indicate metadata
columns to keep (for example, |
This function support different formats of the OTU table, however
for best results please use TreeSummarizedExperiment
.
phyloseq
is supported, however CBEA
will not explicitly import
phyloseq
package and will require users to install them separately.
If use data.frame
or matrix
, users should specify whether taxa are rows using the
taxa_are_rows
option. Additionally, for data.frame
, users can specify
metadata columns to be kept via the id_col
argument.
The output
argument specifies what type of values will be returned in the final matrix.
The options pval
or sig
returns either unadjusted p-values or dummy variables
indicating whether a set is significantly enriched in that sample (based on unadjusted
p-values thresholded at thresh
).
The option raw
returns raw scores computed for each set without any distribution fitting
or inference procedure. Users can use this option to examine the distribution of CBEA scores
under the null.
R
An n
by m
matrix of enrichment scores at
the sample level
data(hmp_gingival) seq <- hmp_gingival$data set <- hmp_gingival$set # n_perm = 10 to reduce runtime mod <- cbea(obj = seq, set = set, output = "zscore", abund_values = "16SrRNA", distr = "norm", parametric = TRUE, adj = TRUE, thresh = 0.05, n_perm = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.