Description Usage Arguments Details Value Author(s) References Examples
View source: R/mergeClusters.R
mergeClusters
provides a simple wrapper
to store a manual merging inside the input SingleCellExperiment
.
1 | mergeClusters(x, k, table, id, overwrite = FALSE)
|
x |
a |
k |
character string specifying the clustering to merge;
valid values are |
table |
merging table with 2 columns containing the cluster IDs to merge in the 1st, and the cluster IDs to newly assign in the 2nd column. |
id |
character string used as a label for the merging. |
overwrite |
logical specifying whether to force overwriting
should a clustering with name |
in the following code snippets,
x
is a SingleCellExperiment
object.
merging codes are accesible through cluster_codes(x)$id
all functions that ask for specification of a clustering
(e.g. plotAbundances
, plotMultiHeatmap
)
take the merging ID as a valid input argument.
a SingleCellExperiment
with newly added cluster codes stored in cluster_codes(.)$id
.
Helena L Crowell helena.crowell@uzh.ch
Nowicka M, Krieg C, Crowell HL, Weber LM et al. CyTOF workflow: Differential discovery in high-throughput high-dimensional cytometry datasets. F1000Research 2017, 6:748 (doi: 10.12688/f1000research.11622.1)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # construct SCE & run clustering
data(PBMC_fs, PBMC_panel, PBMC_md, merging_table)
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce)
# merge clusters
sce <- mergeClusters(sce,
k = "meta20",
id = "merging",
table = merging_table)
# tabulate manual merging
table(cluster_ids(sce, k = "merging"))
# visualize median type-marker expression
plotExprHeatmap(sce,
features = "type",
by = "cluster_id",
k = "merging",
bars = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.