troutpy.pp.xenium_converter#
- troutpy.pp.xenium_converter(sdata, copy=False, unassigned_tag='UNASSIGNED')#
Convert a 10x Xenium SpatialData object’s transcripts and table to the troutpy-expected format.
Renames/derives columns on
sdata.points["transcripts"](gene,control_probe,transcript_id,overlaps_cell, …) and adds a"raw"layer tosdata.table.- Parameters:
sdata (spatialdata.SpatialData) – A SpatialData object with attributes such as Images, Points, and Tables, conforming to the structure detailed in the SpatialData documentation.
copy (bool, optional) – If
True, return the modified SpatialData object. Otherwise modifysdatain place and returnNone.unassigned_tag (str, optional) – Value of
cell_idused to mark transcripts that are not assigned to any cell.
- Returns:
spatialdata.SpatialData or None The converted SpatialData object if
copy=True; otherwiseNone.