bin2cell.get_mpp_coords
- bin2cell.get_mpp_coords(adata, basis='spatial', spatial_key='spatial', mpp=None)
Get an mpp-adjusted representation of spatial or array coordinates of the provided object. Origin in top left, dimensions correspond to
np.array()representation of image ([:,0]is up-down,[:,1]is left-right). The resulting coordinates are integers for ease of retrieval of labels from arrays or defining crops.- adata
AnnData 2um bin VisiumHD object.
- basis
str, optional (default:"spatial") Whether to get
"spatial"or"array"coordinates. The former is the source morphology image, the latter is a GEX-based grid representation.- spatial_key
str, optional (default:"spatial") Only used with
basis="spatial". Needs to be present in.obsm. Rounded coordinates will be used to represent each bin when retrieving labels.- mpp
floatorNone, optional (default:None) The mpp value. Mandatory for GEX (
basis="array"), if not provided with morphology (basis="spatial") will assume full scale image.
- adata