wilcoxExt | R Documentation |
Extends the Pairwise Mann Whitney Wilcoxon Test by combining hierarchical clustering for partition.
wilcoxExt( sce, genecluster, threshold, adj.matrix, p.adjust.method = "none", ncores = NULL, ... )
sce |
A SingleCellExperiment containing assays ( |
genecluster |
which gene cluster result want to be returned.
Usually identified interesting gene cluster pattern by
|
threshold |
a vector with candidate thresholds for raw p-value cut-off. Default is 10^seq(from=-2,to=-0.4,by=0.2). For details please see vignette |
adj.matrix |
an adjacency matrix with 1 indicates cell states allowed to be grouped together, 0 otherwise. |
p.adjust.method |
method for adjusting p-values
(see |
ncores |
A cluster object created by |
... |
additional arguments to pass to |
A matrix grouping factor partition and
the significant cut-off threshold
are returned in metadata "partition"
and "threshold"
.
Partation also stored in colData"part"
. Note we recommend the returned
"threshold"
is not at the ends of input "threshold"
.
library(S4Vectors) sce <- makeSimulatedData() sce <- preprocess(sce) sce <- geneCluster(sce, G = seq_len(4)) sce_sub <- wilcoxExt(sce, genecluster = 1) metadata(sce_sub)$partition metadata(sce_sub)$threshold # Suppose we have 4 cell states, if we don't want cell state 1 # to be grouped together with other cell states adj.matrix <- 1 - diag(4) colnames(adj.matrix) <- rownames(adj.matrix) <- levels(sce$x) adj.matrix[1, c(2, 3, 4)] <- 0 adj.matrix[c(2, 3, 4), 1] <- 0 thrs <- 10^seq(from = -2, to = -0.4, by = 0.1) sce_sub <- wilcoxExt(sce, genecluster = 1, threshold = thrs, adj.matrix = adj.matrix ) metadata(sce_sub)$partition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.