LikelihoodMethod

LikelihoodMethod#

missionbio.demultiplex.protein.pace.likelihood.LikelihoodMethod

class LikelihoodMethod(protein: Assay, truth: Truth, min_distance_for_doublet: int = 3, **kwargs: Any)#

A PACE method to categorize the cells into the most likely category based on the given truth.

Parameters:
  • protein – The protein assay

  • truth – A Truth object

  • min_distance_for_doublet – The minimum number of antibodies that must be different between two clones for their doublet to be considered.

  • kwargs – The other parameters passed to PACEModel.

Functions#

__init__

param protein:

The protein assay

assignment_probabilities

Compute the probability of each cell type for each row in the expression matrix

classify_mixed_clusters

Assigns the doublets as "Mixed" if they have an adjusted mixing rate lower than the max_adjusted_mixing or "Mixed like" for higher adjusted mixing rates.

clipped_normalized_reads

Clip the NSP counts to the range [0, 1]

clipped_signature

The mean NSP values rounded to 0 or 1

cluster_truth

The truth that defines the clusters in the protein assay

get_normalized_reads

returns:

The normalized counts in the protein assay as a dataframe

label_cells

Adds the LABEL row attribute based on the maximum likelihood method of assignment

label_sticky_cells

Assigns the "Sticky" labels to the cells

likelihoods

Create the probability density function of the likelihood of each expression type.

log_likelihood

Calculate the log-likelihood of the data.

palette

Create a palette for the cell types by giving each sub-celltype a unique color

Attributes#