wilcoxauc: Fast Wilcoxon rank sum test and auROC

Description Usage Arguments Value Examples

View source: R/wilcoxauc.R

Description

Computes auROC and Wilcoxon p-value based on Gaussian approximation. Inputs can be

For detailed examples, consult the presto vignette.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
wilcoxauc(X, ...)

## S3 method for class 'seurat'
wilcoxauc(X, ...)

## S3 method for class 'Seurat'
wilcoxauc(X, group_by = NULL, assay = "data",
  groups_use = NULL, seurat_assay = "RNA", ...)

## S3 method for class 'SingleCellExperiment'
wilcoxauc(X, group_by = NULL,
  assay = NULL, groups_use = NULL, ...)

## Default S3 method:
wilcoxauc(X, y, groups_use = NULL, verbose = TRUE,
  ...)

Arguments

X

A feature-by-sample matrix, Seurat object, or SingleCellExperiment object

...

input specific parameters.

group_by

(Seurat & SCE) name of groups variable ('e.g. Cluster').

assay

(Seurat & SCE) name of feature matrix slot (e.g. 'data' or 'logcounts').

groups_use

(optional) which groups from y vector to test.

seurat_assay

(Seurat) name of Seurat Assay (e.g. 'RNA').

y

vector of group labels.

verbose

boolean, TRUE for warnings and messages.

Value

table with the following columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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'))
}

immunogenomics/presto documentation built on July 24, 2020, 11:47 p.m.