spateo.io.seqscope#

IO functions for SeqScope technology.

Module Contents#

Functions#

read_seqscope_as_anndata(→ anndata.AnnData)

Read SeqScope matrix directory as AnnData.

read_seqscope_positions_as_dataframe(→ pandas.DataFrame)

Read SeqScope barcode positions CSV as dataframe.

read_seqscope(→ anndata.AnnData)

Read SeqScope data as AnnData.

spateo.io.seqscope.read_seqscope_as_anndata(matrix_dir: str) anndata.AnnData[source]#

Read SeqScope matrix directory as AnnData.

Parameters:
matrix_dir

Path to directory containing matrix files.

Returns:

AnnData of barcode x genes.

spateo.io.seqscope.read_seqscope_positions_as_dataframe(path: str) pandas.DataFrame[source]#

Read SeqScope barcode positions CSV as dataframe.

Parameters:
path

Path to file

Returns:

DataFrame containing barcode positions.

spateo.io.seqscope.read_seqscope(matrix_dir: str, positions_path: str, binsize: int | None = 1, add_props: bool = True, version: Literal[seqscope] = 'seqscope') anndata.AnnData[source]#

Read SeqScope data as AnnData.

Parameters:
matrix_dir

Directory containing matrix files (barcodes.tsv.gz, features.tsv.gz, matrix.mtx.gz)

positions_path

Path to CSV containing spatial coordinates

binsize

Size of pixel bins

add_props

Whether or not to compute label properties, such as area, bounding box, centroid, etc.

version

SeqScope technology version. Currently only used to set the scale and scale units of each unit coordinate. This may change in the future.