harpy.io.read_resolve_transcripts

harpy.io.read_resolve_transcripts#

harpy.io.read_resolve_transcripts(sdata, path_count_matrix, output_points_name='transcripts', to_coordinate_system='global', to_micron_coordinate_system='micron', pixel_size=0.138, overwrite=False)#

Reads and adds transcripts from Resolve Biosciences’ Molecular Cartography technology 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 Resolve. Expected to contain x, y coordinates and a gene name.

  • 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')) – Pixel coordinate system to which output_points_name will be added.

  • to_micron_coordinate_system (str | None (default: 'micron')) – Micron coordinate system to which output_points_name will be added.

  • pixel_size (float | None (default: 0.138)) – Size of the pixels in micron. Transcripts from Resolve Molecular Cartography are in pixels. By specifying ‘pixel_size’, we can add the micron coordinate system ‘to_micron_coordinate_system’.

  • 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.