composition_of_neighborhoods: composition_of_neighborhoods

View source: R/composition_of_neighborhoods.R

composition_of_neighborhoodsR Documentation

composition_of_neighborhoods

Description

Returns a data.frame which contains the percentages of cells with a specific marker within each neighborhood. and the number of cells in the neighborhood.

Usage

composition_of_neighborhoods(spe_object, feature_colname)

Arguments

spe_object

SpatialExperiment that is the output of identify_neighborhoods.

feature_colname

String. Column with cell types.

Value

A data.frame is returned

Examples

neighborhoods <- identify_neighborhoods(image_no_markers,
method = "hierarchical", min_neighborhood_size = 100,
cell_types_of_interest = c("Immune", "Immune1", "Immune2"), radius = 50,
feature_colname = "Cell.Type")
neighborhoods_vis <- composition_of_neighborhoods(neighborhoods,
feature_colname="Cell.Type")

TrigosTeam/SPIAT documentation built on Aug. 22, 2024, 7:50 p.m.