Subset LIGER object by cluster or other meta data variable.
Subset_LIGER(
liger_object,
cluster = NULL,
cluster_col = "leiden_cluster",
ident = NULL,
ident_col = NULL,
invert = FALSE
)
LIGER object name.
Name(s) of cluster to subset from object.
name of @cellMeta
column containing cluster names, default is "leiden_cluster".
variable within ident_col
to use in sub-setting object.
column in @cellMeta
that contains values provided to ident
.
logical, whether to subset the inverse of the clusters or idents provided, default is FALSE.
liger object
if (FALSE) {
# subset clusters 3 and 5
sub_liger <- subset_liger(liger_object = liger_object, cluster = c(3, 5))
# subset control samples from column "Treatment"
sub_liger <- subset_liger(liger_object = liger_object, ident = "control",
ident_col = "Treatment")
# subset control samples from column "Treatment" in clusters 3 and 5
sub_liger <- subset_liger(liger_object = liger_object, ident = "control",
ident_col = "Treatment", cluster = c(3, 5))
# Remove cluster 9
sub_liger <- subset_liger(liger_object = liger_object, cluster = 9, invert = TRUE)
}