Checks if there are at least 3 samples with a minimum number of cells,
returning valid sample names if the condition is met.
Usage
get_valid_samples(input, subject_ids, min_cells)
Arguments
- input
A Seurat object containing metadata
- subject_ids
The name of the metadata column containing subject IDs
- min_cells
Minimum cells per subject
Value
A vector of sample names meeting the criteria, or NULL if the
requirement is not met
Details
This function inspects the metadata to ensure there are at least 3 samples
with min_cells. If this condition is not satisfied, the function
returns NULL and issues a warning.
Examples
if (FALSE) { # \dontrun{
# `seurat_obj` is a Seurat object with a metadata column "sample_id":
get_valid_samples(seurat_obj, "sample_id", 50)
} # }