cuspa.io.transcripts_from_spatialdata#
- cuspa.io.transcripts_from_spatialdata( ) Transcripts#
Extract an (xy, gene_ids, gene_names) triple from a SpatialData points element.
- Parameters:
- sdata
A
spatialdata.SpatialDataobject.- points_key
Name of a points element.
sdata[points_key]is adask.dataframe.DataFramewith at leastxandycolumns.- gene_column
Column name holding the per-transcript gene label. Values are encoded as a categorical and emitted as
int32codes suitable forcuspa.tl.aggregate_to_cells(). Set toNoneto skip.- dtype
Floating-point dtype for the xy tensor. Defaults to
cupy.float32.
- Returns: