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#
|
|
Compute the probability of each cell type for each row in the expression matrix |
|
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. |
|
Clip the NSP counts to the range [0, 1] |
|
The mean NSP values rounded to 0 or 1 |
|
The truth that defines the clusters in the protein assay |
|
|
|
Adds the LABEL row attribute based on the maximum likelihood method of assignment |
|
Assigns the "Sticky" labels to the cells |
|
Create the probability density function of the likelihood of each expression type. |
|
Calculate the log-likelihood of the data. |
|
Create a palette for the cell types by giving each sub-celltype a unique color |