SOAPy_st.pp.read_mult_image2adata

SOAPy_st.pp.read_mult_image2adata(image: ndarray | str | PathLike, mask: ndarray | str | PathLike, channel_names: list | None = None, remove_channels: list | None = None, max_quantile: float = 0.98, scale: float = 1.0) AnnData

To read Image_based spatial omics data. Slide seqV2, Stereo seq and other image data

Parameters

imageUnion[np.ndarray, str, PathLike]

multiplexed image (.tiff file); with dimension (z,x,y), where z represents channel number, x and y represent length and width of sample respectively you can use np.swapaxes() for dimension. E.g. convert (x,y,z) to (z,x,y): img_new=np.swapaxes(np.swapaxes(img,0,2),1,2) # (x,y,z)→(z,y,x)→(z,x,y).

maskUnion[np.ndarray, str, PathLike]

image of mask, whose size should be equal to img.

channel_nameslist

list of channel names (e.g. protein names), whose length should be equal to channel number of img.

remove_channelslist

List of the index of channels to be removed.

max_quantilefloat

highest quantile clipped as highest value.

scale ; float

The scale of the coordinates, usually for visual matching with different resolutions of HE or other images, is not scaled by default.

Returns

anndata.Anndata object