sainsc.io.read_StereoSeq_bins ============================= .. py:function:: sainsc.io.read_StereoSeq_bins(filepath, bin_size = 50, *, spatialdata = False, resolution = None, sep = '\t', n_threads = None, **kwargs) Read a Stereo-seq GEM file into bins. :param filepath: Path to the Stereo-seq file. :type filepath: os.PathLike or str :param bin_size: Defines the size of bins along both dimensions e.g 50 will results in bins of size 50x50. :type bin_size: int, optional :param spatialdata: If True will load the data as a SpatialData object else as an AnnData object. :type spatialdata: bool, optional :param resolution: Center-to-center distance of Stere-seq beads in nm, if None it will try to detect it from the chip definition in the file header if one exists. :type resolution: float, optional :param sep: Separator used in :py:func:`polars.read_csv`. :type sep: str, optional :param n_threads: Number of threads used for reading and processing file. If `None` this will default to the number of available CPUs. :type n_threads: int, optional :param kwargs: Other keyword arguments will be passed to :py:func:`polars.read_csv`. :returns: AnnData or SpatialData object of the bins with coordinates stored in :py:attr:`anndata.AnnData.obsm` with the key `'spatial'`. :rtype: anndata.AnnData | spatialdata.SpatialData :raises ModuleNotFoundError: If `spatialdata` is set to `True` but the package is not installed.