learnMarkersByPositiveProportionDifference: Identify Markers by Largest Difference of Detection Rate in...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/learn-methods.R

Description

This function computes the detection rate of each feature in each cluster. For each cluster, it ranks all the features by decreasing difference between the detection rate in the target cluster, and the detection rate in all other clusters. The function can limit results up to n markers for each cluster.

Usage

1
2
3
learnMarkersByPositiveProportionDifference(se, cluster.col,
  assay.type = "counts", threshold = 0, n = Inf, min.diff = 0.1,
  min.prop = 0.1, diff.method = c("min", "mean", "median", "max"))

Arguments

se

An object of class inheriting from "SummarizedExperiment".

cluster.col

Name of a column in colData(se) that contains a factor indicating cluster membership for each column (i.e. sample) in se.

assay.type

A string specifying which assay values to use, e.g., "counts" or "logcounts".

threshold

Value above which the marker is considered detected.

n

Maximal number of markers allowed for each signature.

min.diff

Minimal difference in detection rate between the target cluster and the summarized detection rate in any other cluster (in the range 0-1). See argument diff.method.

min.prop

Minimal proportion of samples in the target cluster where the combined set of markers is detected.

diff.method

Method to contrast the detection rate in the target cluster to that of all other clusters. See Details section.

Details

diff.method controls how the detection rate in all clusters other than the target one are summarized before comparison with the detection in the target cluster. It is possible to rank features using the minimal ("min"), "mean", "median", or maximal ("max") difference between the detection rate in the target cluster and those of all other clusters.

Value

A collection of signatures as a "Sets" object.

Author(s)

Kevin Rue-Albrecht

See Also

learnSignatures.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Example data ----
library(SummarizedExperiment)
nsamples <- 100
u <- matrix(rpois(20000, 1), ncol=nsamples)
rownames(u) <- paste0("Gene", sprintf("%03d", seq_len(nrow(u))))
colnames(u) <- paste0("Cell", sprintf("%03d", seq_len(ncol(u))))
se <- SummarizedExperiment(assays=list(counts=u))

colData(se)[, "cluster"] <- factor(sample(head(LETTERS, 3), ncol(se), replace=TRUE))

# Example usage ----

baseset <- learnMarkersByPositiveProportionDifference(se, cluster.col="cluster")

relations(baseset)

kevinrue/Hancock documentation built on May 16, 2020, 8:06 p.m.