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.
Copy file name to clipboardExpand all lines: spatialdata_xenium_explorer/cli/app.py
+17-7Lines changed: 17 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,24 @@ def write(
12
12
None,
13
13
help="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",
14
14
),
15
+
image_key: str=typer.Option(
16
+
None,
17
+
help="Name of the image of interest (key of `sdata.images`). This argument doesn't need to be provided if there is only one image.",
18
+
),
19
+
shapes_key: str=typer.Option(
20
+
None,
21
+
help="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.",
22
+
),
23
+
points_key: str=typer.Option(
24
+
None,
25
+
help="Name of the transcripts (key of `sdata.points`). This argument doesn't need to be provided if there is only one points key.",
26
+
),
15
27
gene_column: str=typer.Option(
16
28
None, help="Column name of the points dataframe containing the gene names"
17
29
),
18
-
shapes_key: str=typer.Option(
30
+
layer: str=typer.Option(
19
31
None,
20
-
help="Key for the boundaries. By default, uses the baysor boundaires, else the cellpose boundaries",
32
+
help="Layer of `sdata.table` where the gene counts are saved. If `None`, uses `sdata.table.X`.",
21
33
),
22
34
lazy: bool=typer.Option(
23
35
True,
@@ -31,10 +43,6 @@ def write(
31
43
None,
32
44
help="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",
33
45
),
34
-
save_h5ad: bool=typer.Option(
35
-
True,
36
-
help="Whether to save the adata as h5ad in the explorer directory (for convenience only, since h5ad is faster to open than the original .zarr table)",
37
-
),
38
46
):
39
47
"""Convert a spatialdata object to Xenium Explorer's inputs"""
f"Trying to get an element key of `sdata.{attr}`, but it contains multiple values and no key was provided. It will not be saved to the xenium explorer."
103
+
)
98
104
returnNone
99
105
100
-
assert (
101
-
len(elements) ==1
102
-
), f"Trying to get an element key of `sdata.{attr}`, but it contains multiple values and no dict key was provided"
0 commit comments