Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/learn-methods.R
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.
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"))
|
se |
An object of class inheriting from " |
cluster.col |
Name of a column in |
assay.type |
A string specifying which assay values to use, e.g., |
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 |
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. |
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.
A collection of signatures as a "Sets
" object.
Kevin Rue-Albrecht
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.