## Read and preprocess inForm data and image files

list_cell_seg_files()

Find inForm data files.

read_cell_seg_data()

Read and clean an inForm data file.

get_field_info()

read_components()

read_maps()

Read an inForm segmentation map file.

parse_tissue_description()

Parse the description tag of the tissue map image read from an inForm binary_seg_maps file

## Compute and visualize spatial relationships between cells

find_nearest_distance()

Nearest neighbor distances for each cell and phenotype.

compute_all_nearest_distance()

Nearest neighbors from a file.

count_within()

Count cells within a radius for a single field.

count_within_batch()

Count cells within a radius for multiple tissue categories, phenotypes and fields.

count_within_many()

Count cells within a radius for multiple tissue categories and phenotypes in a single field.

count_within_many_impl()

Helper function for count_within_batch and count_within_many. This does the actual work of calling count_within multiple times and accumulating the result.

count_touching_cells()

Find and count touching cells for pairs of phenotypes.

spatial_distribution_report()

Create a spatial distribution report.

## Estimate cell density

density_bands()

Estimate cell density in bands from a tissue boundary.

density_at_distance()

Estimate cell density at distance from a tissue boundary.

## Helpers

distance_matrix()

Create a distance matrix from cell seg data.

field_column()

Get the name of the column that distinguishes fields in a merged cell seg data file.

parse_phenotypes()

Parse a vector of phenotype names

plot_diverging()

Plot a distance map using a diverging color scale with white at 0

select_rows()

Flexibly select rows of a data frame.

subset_distance_matrix()

Subset the rows and columns of a distance matrix.

unique_phenotypes()

Find unique phenotypes in a cell seg table

validate_phenotypes()

Validate a phenotype parameter

## Sample data

sample_cell_seg_data sample_cell_seg_path() sample_cell_seg_folder()

Sample cell segmentation data.