Welcome to good-neighbors’ documentation!

good-neighbors

Identify neighborhoods based on local cell populations.

Modules

class goodneighbors.GoodNeighbors(h5path, location='', mode='r', microns_per_pixel=nan)[source]

Class for executing and storing the neighborhood analysis

Properties:
microns_per_pixel:
 (int) set in initialization
radius:(float) pixel size of radius, set by set_neighborhood_fractions via the radius_um (in microns)
groupby:(list) of cells fields who as a group can identify image frames
h5path:(str) location of the h5path storing things
location:(str) subdirectory in the h5object
cells

Access the pandas.DataFrame stored in the h5 object and return it

Returns:(pandas.DataFrame)
measure_distance()[source]

Calculate the distance and store it in the cache

plot_counts_per_radius(min_radius=0, max_radius=150, step_radius=2)[source]
set_cells(df, groupby)[source]

Define the cells as a pandas.DataFrame

Inputs:
df:(pandas.DataFrame) Must have columns defined ['cell_index','x','y','phenotype_label']
groupby:(list) List of fields that will group the pandas.DataFrame by image frame

Indices and tables