Calculate the number and proportion of each cell phenotype in an image
calculate_cell_proportions( sce_object, column = "Phenotype", reference_celltypes = NULL, celltypes_to_exclude = NULL )
sce_object | SingleCellExperiment object in the form of the output of format_image_to_sce |
---|---|
column | Column of cells to choose the phenotype from (e.g. Phenotype, Cell.Type, etc) |
reference_celltypes | Vector specifying reference phenotypes. If NULL (default), then the proportion of each cell type against all cells is returned. Alternatively, a custom vector of cell types can be used as input, and these will be used as the denominator in the calculation of the proportions. |
celltypes_to_exclude | Vector specifying cell types to exclude. For example "OTHER" will exclude that celltype from the Total. If NULL, all cell types are included |
A data.frame is returned