Count selected phenotypes, aggregating by Slide ID and Tissue Category. If multiple tissue categories are selected, include a Total row for each Slide ID.
count_phenotypes(csd, phenotypes, tissue_categories, .by = "Slide ID")
Cell seg data to use. This should already have been filtered for the slides or fields of interest.
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.
A character vector of tissue category names of interest.
Column to aggregate by
A data frame with columns for Slide ID, Tissue Category, cell counts for each requested phenotype, and total cells.
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()