bin2cell.grid_image

bin2cell.grid_image(adata, val, log1p=False, mpp=2, sigma=None, save_path=None)

Create an image of a specified val across the array coordinate grid. Orientation matches the morphology image and spatial coordinates.

Input

adataAnnData

2um bin VisiumHD object. Should have array coordinates evaluated by calling b2c.check_array_coordinates().

valstr

.obs column or variable name to visualise.

log1pbool, optional (default: False)

Whether to log1p-transform the values in the image.

mppfloat, optional (default: 2)

Microns per pixel of the output image.

sigmafloat or None, optional (default: None)

If not None, will run the final image through skimage.filters.gaussian() with the provided sigma value.

save_pathfilepath or None, optional (default: None)

If specified, will save the generated image to this path (e.g. for StarDist use). If not provided, will return image.