Single-cell plot

Function to visualize coordinate representation of individual cells:

bigfish.plot.plot_cell(ndim, cell_coord=None, nuc_coord=None, rna_coord=None, foci_coord=None, other_coord=None, image=None, cell_mask=None, nuc_mask=None, boundary_size=1, title=None, remove_frame=True, rescale=False, contrast=False, framesize=(15, 10), path_output=None, ext='png', show=True)

Plot image and coordinates extracted for a specific cell.

Parameters
ndim{2, 3}

Number of spatial dimensions to consider in the coordinates.

cell_coordnp.ndarray, np.int64, optional

Coordinates of the cell border with shape (nb_points, 2). If None, coordinate representation of the cell is not shown.

nuc_coordnp.ndarray, np.int64, optional

Coordinates of the nucleus border with shape (nb_points, 2).

rna_coordnp.ndarray, np.int64, optional

Coordinates of the detected spots with shape (nb_spots, 4) or (nb_spots, 3). One coordinate per dimension (zyx or yx dimensions) plus the index of the cluster assigned to the spot. If no cluster was assigned, value is -1. If only coordinates of spatial dimensions are available, only centroid of foci can be shown.

foci_coordnp.ndarray, np.int64, optional

Array with shape (nb_foci, 5) or (nb_foci, 4). One coordinate per dimension for the foci centroid (zyx or yx dimensions), the number of spots detected in the foci and its index.

other_coordnp.ndarray, np.int64, optional

Coordinates of the detected elements with shape (nb_elements, 3) or (nb_elements, 2). One coordinate per dimension (zyx or yx dimensions).

imagenp.ndarray, np.uint, optional

Original image of the cell with shape (y, x). If None, original image of the cell is not shown.

cell_masknp.ndarray, optional

Mask of the cell.

nuc_masknp.ndarray, optional

Mask of the nucleus.

boundary_sizeint, default=1

Width of the cell and nucleus boundaries, in pixel.

titlestr, optional

Title of the image.

remove_framebool, default=True

Remove axes and frame.

rescalebool, default=False

Rescale pixel values of the image (made by default in matplotlib).

contrastbool, default=False

Contrast image.

framesizetuple, default=(15, 10)

Size of the frame used to plot with plt.figure(figsize=framesize).

path_outputstr, optional

Path to save the image (without extension).

extstr or list, default=’png’

Extension used to save the plot. If it is a list of strings, the plot will be saved several times.

showbool, default=True

Show the figure or not.