wilcoxauc.Rd
Computes auROC and Wilcoxon p-value based on Gaussian approximation. Inputs can be
Dense matrix or data.frame
Sparse matrix, such as dgCMatrix
Seurat V3 object
SingleCellExperiment object
For detailed examples, consult the presto vignette.
wilcoxauc(X, ...)
# S3 method for seurat
wilcoxauc(X, ...)
# S3 method for Seurat
wilcoxauc(
X,
group_by = NULL,
assay = "data",
groups_use = NULL,
seurat_assay = "RNA",
...
)
# S3 method for SingleCellExperiment
wilcoxauc(X, group_by = NULL, assay = NULL, groups_use = NULL, ...)
# S3 method for default
wilcoxauc(X, y, groups_use = NULL, verbose = TRUE, ...)
A feature-by-sample matrix, Seurat object, or SingleCellExperiment object
input specific parameters.
(Seurat & SCE) name of groups variable ('e.g. Cluster').
(Seurat & SCE) name of feature matrix slot (e.g. 'data' or 'logcounts').
(optional) which groups from y vector to test.
(Seurat) name of Seurat Assay (e.g. 'RNA').
vector of group labels.
boolean, TRUE for warnings and messages.
table with the following columns:
feature - feature name (e.g. gene name).
group - group name.
avgExpr - mean value of feature in group.
logFC - log fold change between observations in group vs out.
statistic - Wilcoxon rank sum U statistic.
auc - area under the receiver operator curve.
pval - nominal p value.
padj - Benjamini-Hochberg adjusted p value.
pct_in - Percent of observations in the group with non-zero feature value.
pct_out - Percent of observations out of the group with non-zero feature value.
if (FALSE) {
data(exprs)
data(y)
## on a dense matrix
head(wilcoxauc(exprs, y))
## with only some groups
head(wilcoxauc(exprs, y, c('A', 'B')))
## on a sparse matrix
exprs_sparse <- as(exprs, 'dgCMatrix')
head(wilcoxauc(exprs_sparse, y))
## on a Seurat V3 object
if (requireNamespace("Seurat", quietly = TRUE)) {
pkg_version <- packageVersion('Seurat')
if (pkg_version >= "3.0" & pkg_version < "4.0") {
data(object_seurat)
head(wilcoxauc(object_seurat, 'cell_type'))
}
}
## on a SingleCellExperiment object
if (requireNamespace("SingleCellExperiment", quietly = TRUE)) {
data(object_sce)
head(wilcoxauc(object_sce, 'cell_type'))
}
}