Function to identify perturbed and non-perturbed gRNA expressing cells that accounts for multiple treatments/conditions/chemical perturbations.
RunMixscape( object, assay = "PRTB", slot = "scale.data", labels = "gene", nt.class.name = "NT", new.class.name = "mixscape_class", min.de.genes = 5, min.cells = 5, de.assay = "RNA", logfc.threshold = 0.25, iter.num = 10, verbose = FALSE, split.by = NULL, fine.mode = FALSE, fine.mode.labels = "guide_ID", prtb.type = "KO" )
An object of class Seurat.
Assay to use for mixscape classification.
Assay data slot to use.
metadata column with target gene labels.
Classification name of non-targeting gRNA cells.
Name of mixscape classification to be stored in metadata.
Required number of genes that are differentially expressed for method to separate perturbed and non-perturbed cells.
Minimum number of cells in target gene class. If fewer than this many cells are assigned to a target gene class during classification, all are assigned NP.
Assay to use when performing differential expression analysis. Usually RNA.
Limit testing to genes which show, on average, at least X-fold difference (log-scale) between the two groups of cells. Default is 0.25 Increasing logfc.threshold speeds up the function, but can miss weaker signals.
Number of normalmixEM iterations to run if convergence does not occur.
metadata column with experimental condition/cell type classification information. This is meant to be used to account for cases a perturbation is condition/cell type -specific.
When this is equal to TRUE, DE genes for each target gene class will be calculated for each gRNA separately and pooled into one DE list for calculating the perturbation score of every cell and their subsequent classification.
metadata column with gRNA ID labels.
specify type of CRISPR perturbation expected for labeling mixscape classifications. Default is KO.
Returns Seurat object with with the following information in the meta data and tools slots:
Classification result with cells being either classified as perturbed (KO, by default) or non-perturbed (NP) based on their target gene class.
Global classification result (perturbed, NP or NT)
Posterior probabilities used to determine if a cell is KO (default). Name of this item will change to match prtb.type parameter setting. (>0.5) or NP
Perturbation scores for every cell calculated in the first iteration of the function.