compute_mean_expression: Compute mean expression of cells for a single phenotype and...

Description Usage Arguments Value See Also

View source: R/mean_expression.R

Description

Find the cells with the highest (or lowest) expression of the given parameter within the given phenotype. Report the mean expression of the high-expressing cells.

Usage

1
compute_mean_expression(csd, phenotype, param, percentile = NULL, count = NULL)

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 phenoptr::select_rows.

param

The parameter (column) to report, as a string.

percentile

The percentile cutoff for top-expressing cells. For example, to measure the top quartile, the percentile is 0.75. Negative numbers will use low-expressing cells; to measure the bottom decile, use a percentile of -0.1.

count

The number of top expressing cells to use. Only one of percentile and count can be provided. If both are omitted, the mean expression of all cells is returned.

Value

A data frame with columns for count and mean.

See Also

Other aggregation functions: compute_density_from_cell_summary(), compute_density_from_table(), compute_h_score_from_score_data(), compute_h_score(), compute_mean_expression_many(), compute_positivity_many(), compute_positivity(), count_phenotypes(), counts_to_percents()


akoyabio/phenoptrReports documentation built on Jan. 17, 2022, 6:22 p.m.