Compute CMS scores (for cells of a single sample) from a multi-sample Seurat object. Requires a Seurat object with cell classifications stored as "Cell_Type" in the metadata and with sample ID stored as "orig.ident" in the metadata. Also requires a dataframe containing the "reference" cell classifications generated from the single-sample dataset. A single score on a scale of 0-1 is returned.

GetCMS(object = NULL, sample.ID = NULL, reference.ID = NULL)

Arguments

object

A multi-sample Seurat object with sample identifiers stored as "orig.ident" and cell classifications as "Cell_Type" in the object metadata slot.

sample.ID

The name of the single sample to be CMS-scored (must correspond to an ID stored in "orig.ident").

reference.ID

A dataframe consisting of a single column, "Cell_Type", containing the cell classifications generated during a single-sample workflow (for use as a reference set without multi-sample batch effects).;

Value

Returns a numeric score from 0-1 (best-worst).

Examples

# NOT RUN {
GetCMS(object = my_seurat_object, sample.ID = "PBMC_01", reference.ID = PBMC01_SingleSample_RefID)
#> Error in GetCMS(object = my_seurat_object, sample.ID = "PBMC_01", reference.ID = PBMC01_SingleSample_RefID) object 'my_seurat_object' not found
# }