You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
*`SDATA_PATH`: Path to the SpatialData `.zarr` directory [required]
57
+
*`IMAGE_PATH`: Path to the image file to be added (`.ome.tif` used in the explorer during alignment) [required]
58
+
*`TRANSFORMATION_MATRIX_PATH`: Path to the `matrix.csv` file returned by the Explorer after alignment [required]
57
59
58
60
**Options**:
59
61
60
-
*`--output-path TEXT`: Path to a directory where Xenium Explorer's outputs will be saved. By default, writes to the same path as `sdata_path` but with the `.explorer` suffix
61
-
*`--image-key TEXT`: Name of the image of interest (key of `sdata.images`). This argument doesn't need to be provided if there is only one image.
62
-
*`--shapes-key TEXT`: Name of the cell shapes (key of `sdata.shapes`). This argument doesn't need to be provided if there is only one shapes key or a table with only one region.
63
-
*`--points-key TEXT`: Name of the transcripts (key of `sdata.points`). This argument doesn't need to be provided if there is only one points key.
64
-
*`--gene-column TEXT`: Column name of the points dataframe containing the gene names
65
-
*`--layer TEXT`: Layer of `sdata.table` where the gene counts are saved. If `None`, uses `sdata.table.X`.
66
-
*`--lazy / --no-lazy`: If `True`, will not load the full images in memory (except if the image memory is below `ram_threshold_gb`) [default: lazy]
67
-
*`--ram-threshold-gb INTEGER`: Threshold (in gygabytes) from which image can be loaded in memory. If `None`, the image is never loaded in memory [default: 4]
68
-
*`--mode TEXT`: string that indicated which files should be created. `'-ib'` means everything except images and boundaries, while `'+tocm'` means only transcripts/observations/counts/metadata (each letter corresponds to one explorer file). By default, keeps everything
62
+
*`--original-image-key TEXT`: Optional original-image key (of sdata.images) on which the new image will be aligned. This doesn't need to be provided if there is only one image
63
+
*`--overwrite / --no-overwrite`: Whether to overwrite the image if existing [default: no-overwrite]
69
64
*`--help`: Show this message and exit.
70
65
71
-
### `add-aligned`
66
+
### `spatialdata_xenium_explorer update-obs`
72
67
73
-
After alignment on the Xenium Explorer, add an image to the SpatialData object
68
+
Update the cell categories for the Xenium Explorer's (i.e. what's in `adata.obs`). This is useful when you perform analysis and update your `AnnData` object
69
+
70
+
!!! note "Usage"
71
+
This command should only be used if you updated `adata.obs`, after creation of the other explorer files.
*`SDATA_PATH`: Path to the SpatialData `.zarr` directory [required]
84
-
*`IMAGE_PATH`: Path to the image file to be added (`.ome.tif` used in the explorer during alignment) [required]
85
-
*`TRANSFORMATION_MATRIX_PATH`: Path to the `matrix.csv` file returned by the Explorer after alignment [required]
81
+
*`ADATA_PATH`: Path to the anndata file (`zarr` or `h5ad`) containing the new observations [required]
82
+
*`OUTPUT_PATH`: Path to the Xenium Explorer directory (it will update `analysis.zarr.zip`) [required]
86
83
87
84
**Options**:
88
85
89
-
*`--original-image-key TEXT`: Optional original-image key on which the new image will be aligned. This doesn't need to be provided if there is only one image
90
-
*`--overwrite / --no-overwrite`: Whether to overwrite the image if existing [default: no-overwrite]
91
86
*`--help`: Show this message and exit.
92
87
93
-
### `update-obs`
94
-
95
-
Update the cell categories for the Xenium Explorer's (i.e. what's in `adata.obs`). This is useful when you perform analysis and update your `AnnData` object
88
+
### `spatialdata_xenium_explorer write`
96
89
97
-
!!! note "Usage"
98
-
This command should only be used if you updated `adata.obs`, after creation of the other explorer files.
90
+
Convert a spatialdata object to Xenium Explorer's inputs
*`ADATA_PATH`: Path to the anndata file (`zarr` or `h5ad`) containing the new observations [required]
109
-
*`OUTPUT_PATH`: Path to the Xenium Explorer directory (it will update `analysis.zarr.zip`) [required]
100
+
*`SDATA_PATH`: Path to the SpatialData `.zarr` directory [required]
110
101
111
102
**Options**:
112
103
104
+
*`--output-path TEXT`: Path to a directory where Xenium Explorer's outputs will be saved. By default, writes to the same path as `sdata_path` but with the `.explorer` suffix
105
+
*`--image-key TEXT`: Name of the image of interest (key of `sdata.images`). This argument doesn't need to be provided if there is only one image.
106
+
*`--shapes-key TEXT`: Name of the cell shapes (key of `sdata.shapes`). This argument doesn't need to be provided if there is only one shapes key or a table with only one region.
107
+
*`--points-key TEXT`: Name of the transcripts (key of `sdata.points`). This argument doesn't need to be provided if there is only one points key.
108
+
*`--gene-column TEXT`: Column name of the points dataframe containing the gene names
109
+
*`--pixelsize FLOAT`: Number of microns in a pixel. Invalid value can lead to inconsistent scales in the Explorer. [default: 0.2125]
110
+
*`--layer TEXT`: Layer of `sdata.table` where the gene counts are saved. If `None`, uses `sdata.table.X`.
111
+
*`--lazy / --no-lazy`: If `True`, will not load the full images in memory (except if the image memory is below `ram_threshold_gb`) [default: lazy]
112
+
*`--ram-threshold-gb INTEGER`: Threshold (in gygabytes) from which image can be loaded in memory. If `None`, the image is never loaded in memory [default: 4]
113
+
*`--mode TEXT`: string that indicated which files should be created. `'-ib'` means everything except images and boundaries, while `'+tocm'` means only transcripts/observations/counts/metadata (each letter corresponds to one explorer file). By default, keeps everything
Copy file name to clipboardExpand all lines: spatialdata_xenium_explorer/converter.py
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ def write(
27
27
shapes_key: str|None=None,
28
28
points_key: str|None=None,
29
29
gene_column: str|None=None,
30
+
pixelsize: float=0.2125,
30
31
layer: str|None=None,
31
32
polygon_max_vertices: int=13,
32
33
lazy: bool=True,
@@ -62,6 +63,7 @@ def write(
62
63
shapes_key: Name of the cell shapes (key of `sdata.shapes`). This argument doesn't need to be provided if there is only one shapes key or a table with only one region.
63
64
points_key: Name of the transcripts (key of `sdata.points`). This argument doesn't need to be provided if there is only one points key.
64
65
gene_column: Column name of the points dataframe containing the gene names.
66
+
pixelsize: Number of microns in a pixel. Invalid value can lead to inconsistent scales in the Explorer.
65
67
layer: Layer of `sdata.table` where the gene counts are saved. If `None`, uses `sdata.table.X`.
66
68
polygon_max_vertices: Maximum number of vertices for the cell polygons. A higher value will display smoother cells.
67
69
lazy: If `True`, will not load the full images in memory (except if the image memory is below `ram_threshold_gb`).
0 commit comments