ei {CATALYST} | R Documentation |
SingleCellExperiment
convencience functionsVarious wrappers to conviniently access slots
in a SingleCellExperiment
created with prepData
, and that are used
frequently during differential analysis.
ei(x) n_cells(x) marker_classes(x) type_markers(x) state_markers(x) sample_ids(x) cluster_ids(x, k) cluster_codes(x) ## S4 method for signature 'SingleCellExperiment' ei(x) ## S4 method for signature 'SingleCellExperiment' n_cells(x) ## S4 method for signature 'SingleCellExperiment' marker_classes(x) ## S4 method for signature 'SingleCellExperiment' type_markers(x) ## S4 method for signature 'SingleCellExperiment' state_markers(x) ## S4 method for signature 'SingleCellExperiment' cluster_codes(x) ## S4 method for signature 'SingleCellExperiment' sample_ids(x) ## S4 method for signature 'SingleCellExperiment,missing' cluster_ids(x, k = NULL) ## S4 method for signature 'SingleCellExperiment,character' cluster_ids(x, k = NULL)
x |
|
k |
character string specifying the clustering to extract.
Valid values are |
ei
extracts the experimental design table.
n_cells
extracts the number of events measured per sample.
marker_classes
extracts marker class assignments ("type", "state", "none").
type_markers
extracts the antigens used for clustering.
state_markers
extracts antigens that were not used for clustering.
sample_ids
extracts the sample IDs as specified in the metadata-table.
cluster_codes
extracts a data.frame
containing cluster codes for the
FlowSOM
clustering, the ConsensusClusterPlus
metaclustering, and all mergings done through mergeClusters
.
cluster_ids
extracts the numeric vector of cluster IDs
as inferred by FlowSOM
.
Helena L Crowell
# construct SCE & run clustering data(PBMC_fs, PBMC_panel, PBMC_md) sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md) sce <- cluster(sce) # view experimental design table ei(sce) # quick-access sample & cluster assignments plot(table(sample_ids(sce))) plot(table(cluster_ids(sce))) # access marker information marker_classes(sce) type_markers(sce) state_markers(sce) # get cluster ID correspondece between 2 clusterings old_ids <- seq_len(20) m <- match(old_ids, cluster_codes(sce)$`meta20`) new_ids <- cluster_codes(sce)$`meta12`[m] data.frame(old_ids, new_ids) # plot relative change in area under CDF curve vs. k library(SingleCellExperiment) metadata(sce)$delta_area