Compute positivity of a single phenotype

compute_positivity(csd, phenotype, positivity)

Arguments

csd

Cell seg data to use. This should already have been filtered for the slides or fields of interest.

phenotype

A phenotype selector. This will be passed to select_rows.

positivity

A one-sided formula giving the positivity expression to evaluate.

Value

A data frame with columns for count (total number of cells of the given phenotype), positive (count of positive cells) and fraction (fraction of positive cells).