count_phenotypes: Count phenotypes per slide and tissue category

Description Usage Arguments Value See Also

View source: R/count_phenotypes.R

Description

Count selected phenotypes, aggregating by Slide ID and Tissue Category. If multiple tissue categories are selected, include a Total row for each Slide ID.

Usage

1
count_phenotypes(csd, phenotypes, tissue_categories, .by = "Slide ID")

Arguments

csd

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

phenotypes

A named list of phenotype selectors (see phenoptr::parse_phenotypes). Results will be reported in the same order as phenotypes are listed here. To include a row total, phenotypes should contain a "Total" item.

tissue_categories

A character vector of tissue category names of interest.

.by

Column to aggregate by

Value

A data frame with columns for Slide ID, Tissue Category, cell counts for each requested phenotype, and total cells.

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_mean_expression(), compute_positivity_many(), compute_positivity(), counts_to_percents()


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