sainsc.io.read_StereoSeq_bins
- 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.
- Parameters:
bin_size (int, optional) – Defines the size of bins along both dimensions e.g 50 will results in bins of size 50x50.
spatialdata (bool, optional) – If True will load the data as a SpatialData object else as an AnnData object.
resolution (float, optional) – 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.
sep (str, optional) – Separator used in
polars.read_csv().n_threads (int, optional) – Number of threads used for reading and processing file. If None this will default to the number of available CPUs.
kwargs – Other keyword arguments will be passed to
polars.read_csv().
- Returns:
AnnData or SpatialData object of the bins with coordinates stored in
anndata.AnnData.obsmwith the key ‘spatial’.- Return type:
- Raises:
ModuleNotFoundError – If spatialdata is set to True but the package is not installed.