sparrow.io.read_vizgen_transcripts

sparrow.io.read_vizgen_transcripts#

sparrow.io.read_vizgen_transcripts(sdata, path_count_matrix, path_transform_matrix, output_layer='transcripts', to_coordinate_system='global', overwrite=False)#

Reads and adds Vizgen 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 Vizgen. Expected to contain x, y coordinates and a gene name.

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

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

  • path_transform_matrix (str | Path) – Path to the transformation matrix for the affine transformation.

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

Return type:

SpatialData

Returns:

: The updated SpatialData object containing the transcripts.