View source: R/scoreSpecificity.R
scoreSpecificity | R Documentation |
Calculate specificity scores for a set of targets and controls. Most often used for single-cell feature barcode data, but may be useful for other applications where a positive signal needs to be distinguished from a variable background. Adapted from T-BEAM, 10x Genomics's approach to monomeric MHC antibody specificity scoring. The return is a list structure, with each list element containing a dataframe of specificity scores for each target. Likelihood scores are determined via a cumulative beta distribution function with a confidence of .925.
scoreSpecificity(
counts, targets, controls,
nPrior = 3, sPrior = 1)
counts |
numeric matrix, a matrix of counts with markers names as the rownames and the sample identifiers (single cells, libraries, ect) as the column names. Matrix needs to contain a row for each target and control, but can contain non-relevant rows not being used in this calculation. |
targets |
character vector, names of the target markers for which to test specificity. All values must appear in row names of |
controls |
character vector, names of the control markers to be used in build null distributions for specificity. All values must appear in row names of |
nPrior |
integer, pseudoCount for the control count to be added to the count from |
sPrior |
integer, pseudoCount for the target count to be added to the count from |
a data frame of specificity scores, with one row per sample and one column for each target marker. Each value is a likelihood score for specificity for that list's antigen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.