harpy.io.read_stereoseq_transcripts

harpy.io.read_stereoseq_transcripts#

harpy.io.read_stereoseq_transcripts(sdata, path_count_matrix, output_points_name='transcripts', to_coordinate_system='global', overwrite=False)#

Reads and adds Stereoseq transcript information to a SpatialData object.

Parameters:
  • sdata (SpatialData) – The SpatialData object to which the transcripts will be added.

  • path_count_matrix (str | Path) – Path to the file containing the transcripts information specific to Stereoseq. Expected to contain x, y coordinates, gene name, and a midcount column.

  • output_points_name (str, default='transcripts'.) – Name of the points element of the SpatialData object to which the transcripts will be added.

  • to_coordinate_system (str (default: 'global')) – Coordinate system to which output_points_name will be added.

  • overwrite (bool, default=False) – If True overwrites the output_points_name (a points element) if it already exists.

Return type:

SpatialData

Returns:

: The updated SpatialData object containing the transcripts.