spateo.io.seqfish

IO functions for seqFISH-PLUS technology.

Functions

read_seqfish_meta_as_dataframe(→ pandas.DataFrame)

Read a seqFISH cell centroid locations file.

read_seqfish(→ anndata.AnnData)

Read seqFISH data as AnnData.

Module Contents

spateo.io.seqfish.read_seqfish_meta_as_dataframe(path: str, fov_offset: pandas.DataFrame = None, accumulate_x: bool = False, accumulate_y: bool = False) pandas.DataFrame[source]

Read a seqFISH cell centroid locations file.

Parameters:
path

Path to file

fov_offset

a dataframe contains the x/y offset of each fov (field of view), for example, {‘fov’:[fov_1, ..], ‘x_offset’:[x_offset_1, ..], ‘y_offset’:[y_offset_1, ..]}

accumulate_x

whether to accumulate x_offset

accumulate_y

whether to accumulate y_offset

Returns:

Pandas DataFrame with the following columns.
  • fov: ID of field of view

  • cell_id: ID of cell in each fov

  • x, y: X, Y coordinates of the cell centroids

  • region: sample region(tissue)

spateo.io.seqfish.read_seqfish(path: str, meta_path: str, fov_offset: pandas.DataFrame = None, accumulate_x: bool = False, accumulate_y: bool = False) anndata.AnnData[source]

Read seqFISH data as AnnData.

Parameters:
path

Path to seqFISH digital expression matrix CSV.

meta_path

Path to CSV file containing cell centroid locations.

fov_offset

a dataframe contain offset of each fov, for example, {‘fov’:[fov_1, ..], ‘x_offset’:[x_offset_1, ..], ‘y_offset’:[y_offset_1, ..]}

accumulate_x

whether to accumulate x_offset

accumulate_y

whether to accumulate y_offset