comparison spatialdata_io.xml @ 0:1f6c780a2635 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/spatialdata commit 87bff76d897c5a4277d9987cf26432a18e0458cd-dirty
author iuc
date Sat, 14 Mar 2026 15:16:08 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1f6c780a2635
1 <tool id="spatialdata_io" name="SpatialData IO" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>load common spatial omics formats into SpatialData</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="creator" />
8 <command detect_errors="exit_code"><![CDATA[
9 ## CosMX
10 #if $method_condi.method == 'cosmx':
11 ## puting all files in working directory instead of input. cosmx should run inside same directory
12 mkdir -p 'CellComposite' 'CellLabels' 'output' &&
13 #for $image in $method_condi.CellComposite:
14 #if $image.element_identifier.endswith('.jpg'):
15 ln -s '$image' 'CellComposite/${image.element_identifier}' &&
16 #else:
17 ln -s '$image' 'CellComposite/${image.element_identifier}.jpg' &&
18 #end if
19 #end for
20 #for $image in $method_condi.CellLabels:
21 #if $image.element_identifier.endswith('.tiff') or $image.element_identifier.endswith('.tif'):
22 ln -s '$image' 'CellLabels/${image.element_identifier}' &&
23 #else:
24 ln -s '$image' 'CellLabels/${image.element_identifier}.tiff' &&
25 #end if
26 #end for
27 #if $method_condi.exprMat_file.element_identifier.endswith('.csv'):
28 ln -s '$method_condi.exprMat_file' '${method_condi.exprMat_file.element_identifier}' &&
29 #else:
30 ln -s '$method_condi.exprMat_file' '${method_condi.exprMat_file.element_identifier}.csv' &&
31 #end if
32 #if $method_condi.fov_positions_file.element_identifier.endswith('.csv'):
33 ln -s '$method_condi.fov_positions_file' '${method_condi.fov_positions_file.element_identifier}' &&
34 #else:
35 ln -s '$method_condi.fov_positions_file' '${method_condi.fov_positions_file.element_identifier}.csv' &&
36 #end if
37 #if $method_condi.metadata_file.element_identifier.endswith('.csv'):
38 ln -s '$method_condi.metadata_file' '${method_condi.metadata_file.element_identifier}' &&
39 #else:
40 ln -s '$method_condi.metadata_file' '${method_condi.metadata_file.element_identifier}.csv' &&
41 #end if
42 #if $method_condi.tx_file.element_identifier.endswith('.csv'):
43 ln -s '$method_condi.tx_file' '${method_condi.tx_file.element_identifier}' &&
44 #else:
45 ln -s '$method_condi.tx_file' '${method_condi.tx_file.element_identifier}.csv' &&
46 #end if
47
48 ## CURIO
49 #else if $method_condi.method == 'curio':
50 mkdir -p 'input' 'output' &&
51 ln -s '$method_condi.anndata' 'input/${method_condi.dataset_id}_anndata.h5ad' &&
52 ln -s '$method_condi.cluster_assignment' 'input/${method_condi.dataset_id}_cluster_assignment.txt' &&
53 ln -s '$method_condi.metrics' 'input/${method_condi.dataset_id}_Metrics.csv' &&
54 ln -s '$method_condi.variable_features_clusters' 'input/${method_condi.dataset_id}_variable_features_clusters.txt' &&
55 ln -s '$method_condi.variable_features_spatial' 'input/${method_condi.dataset_id}_variable_features_spatial_moransi.txt' &&
56
57 ## DBIT
58 #else if $method_condi.method == 'dbit':
59 ## puting all files in working directory instead of input. dbit should run inside same directory
60 mkdir -p 'output' &&
61 ln -s '$method_condi.barcode_positions' '${method_condi.dataset_id}_barcode_positions.tabular' &&
62 ln -s '$method_condi.counts' '${method_condi.dataset_id}_counts.h5ad' &&
63 ln -s '$method_condi.tissue_lowres' '${method_condi.dataset_id}_tissue_lowres.png' &&
64
65 ## MACSima
66 #else if $method_condi.method == 'macsima':
67 mkdir -p 'input' 'output' &&
68 #for $image in $method_condi.tiff_files:
69 #if $image.element_identifier.endswith('.tif') or $image.element_identifier.endswith('.tiff'):
70 ln -s '$image' 'input/${image.element_identifier}' &&
71 #else:
72 ln -s '$image' 'input/${image.element_identifier}.tif' &&
73 #end if
74 #end for
75
76 ## MERSCOPE
77 #else if $method_condi.method == 'merscope':
78 mkdir -p 'input/region/images' 'input/region/vpt_outputs' 'output' &&
79 #for $image in $method_condi.mosaic_images:
80 #if $image.element_identifier.endswith('.tif'):
81 ln -s '$image' 'input/region/images/${image.element_identifier}' &&
82 #else:
83 ln -s '$image' 'input/region/images/${image.element_identifier}.tif' &&
84 #end if
85 #end for
86 ln -s '$method_condi.input_micron_to_mosaic' 'input/region/images/micron_to_mosaic_pixel_transform.csv' &&
87 ln -s '$method_condi.cell_by_gene' 'input/region/vpt_outputs/cell_by_gene.csv' &&
88 ln -s '$method_condi.cell_meta' 'input/region/vpt_outputs/cell_metadata.csv' &&
89 ## the tool checks the file name, so the name is hardcoded here, but it does not necessarily have to be from cellpose
90 ln -s '$method_condi.cells_boundaries' 'input/region/vpt_outputs/cellpose_micron_space.parquet' &&
91 ln -s '$method_condi.transcripts' 'input/region/detected_transcripts.csv' &&
92
93 ## Visium
94 #else if $method_condi.method == 'visium':
95 mkdir -p 'input/spatial' 'output' &&
96 #if $method_condi.matrix_bool:
97 ln -s '$method_condi.feature_bc_matrix' 'input/raw_feature_bc_matrix.h5' &&
98 #else:
99 ln -s '$method_condi.feature_bc_matrix' 'input/filtered_feature_bc_matrix.h5' &&
100 #end if
101 ln -s '$method_condi.scalefactors_json' 'input/scalefactors_json.json' &&
102 ln -s '$method_condi.fullres_image_file' 'input/fullres_image.tif' &&
103 ln -s '$method_condi.tissue_hires_image' 'input/spatial/tissue_hires_image.png' &&
104 ln -s '$method_condi.tissue_lowres_image' 'input/spatial/tissue_lowres_image.png' &&
105 ln -s '$method_condi.tissue_positions_list' 'input/tissue_positions_list.csv' &&
106
107 ## Visium HD
108 #else if $method_condi.method == 'visium_hd':
109 mkdir -p 'input' 'output' &&
110 ## Core required file
111 ln -s '$method_condi.feature_slice' 'input/feature_slice.h5' &&
112
113 ## Binned outputs (if included)
114 #if str($method_condi.include_binned_condi.include_binned) == 'yes':
115 ## Bin 002um (required for nucleus segmentation if enabled)
116 #if $method_condi.include_binned_condi.bin002.feature_bc_matrix_002:
117 mkdir -p 'input/binned_outputs/square_002um/spatial' &&
118 #if $method_condi.matrix_bool:
119 ln -s '$method_condi.include_binned_condi.bin002.feature_bc_matrix_002' 'input/binned_outputs/square_002um/raw_feature_bc_matrix.h5' &&
120 #else:
121 ln -s '$method_condi.include_binned_condi.bin002.feature_bc_matrix_002' 'input/binned_outputs/square_002um/filtered_feature_bc_matrix.h5' &&
122 #end if
123 ln -s '$method_condi.include_binned_condi.bin002.tissue_positions_002' 'input/binned_outputs/square_002um/spatial/tissue_positions.parquet' &&
124 ln -s '$method_condi.include_binned_condi.bin002.scalefactors_json_002' 'input/binned_outputs/square_002um/spatial/scalefactors_json.json' &&
125 #end if
126
127 ## Bin 008um
128 #if $method_condi.include_binned_condi.bin008.feature_bc_matrix_008:
129 mkdir -p 'input/binned_outputs/square_008um/spatial' &&
130 #if $method_condi.matrix_bool:
131 ln -s '$method_condi.include_binned_condi.bin008.feature_bc_matrix_008' 'input/binned_outputs/square_008um/raw_feature_bc_matrix.h5' &&
132 #else:
133 ln -s '$method_condi.include_binned_condi.bin008.feature_bc_matrix_008' 'input/binned_outputs/square_008um/filtered_feature_bc_matrix.h5' &&
134 #end if
135 ln -s '$method_condi.include_binned_condi.bin008.tissue_positions_008' 'input/binned_outputs/square_008um/spatial/tissue_positions.parquet' &&
136 ln -s '$method_condi.include_binned_condi.bin008.scalefactors_json_008' 'input/binned_outputs/square_008um/spatial/scalefactors_json.json' &&
137 #end if
138
139 ## Bin 016um
140 #if $method_condi.include_binned_condi.bin016.feature_bc_matrix_016:
141 mkdir -p 'input/binned_outputs/square_016um/spatial' &&
142 #if $method_condi.matrix_bool:
143 ln -s '$method_condi.include_binned_condi.bin016.feature_bc_matrix_016' 'input/binned_outputs/square_016um/raw_feature_bc_matrix.h5' &&
144 #else:
145 ln -s '$method_condi.include_binned_condi.bin016.feature_bc_matrix_016' 'input/binned_outputs/square_016um/filtered_feature_bc_matrix.h5' &&
146 #end if
147 ln -s '$method_condi.include_binned_condi.bin016.tissue_positions_016' 'input/binned_outputs/square_016um/spatial/tissue_positions.parquet' &&
148 ln -s '$method_condi.include_binned_condi.bin016.scalefactors_json_016' 'input/binned_outputs/square_016um/spatial/scalefactors_json.json' &&
149 #end if
150
151 ## Nucleus segmentation (requires barcode_mappings at root)
152 #if str($method_condi.include_binned_condi.include_nucleus_seg_condi.include_nucleus_seg) == 'yes':
153 mkdir -p 'input/segmented_outputs/' &&
154 ln -s '$method_condi.include_binned_condi.include_nucleus_seg_condi.barcode_mappings' 'input/barcode_mappings.parquet' &&
155 ln -s '$method_condi.include_binned_condi.include_nucleus_seg_condi.nucleus_segmentation' 'input/segmented_outputs/nucleus_segmentations.geojson' &&
156 #end if
157 #end if
158
159 ## Segmented outputs (cell segmentation)
160 #if str($method_condi.segmentation_conditional.enable_segmentation) == 'yes':
161 mkdir -p 'input/segmented_outputs/spatial' &&
162 #if $method_condi.matrix_bool:
163 ln -s '$method_condi.segmentation_conditional.feature_bc_matrix_seg' 'input/segmented_outputs/raw_feature_cell_matrix.h5' &&
164 #else:
165 ln -s '$method_condi.segmentation_conditional.feature_bc_matrix_seg' 'input/segmented_outputs/filtered_feature_cell_matrix.h5' &&
166 #end if
167 ln -s '$method_condi.segmentation_conditional.cell_segmentation' 'input/segmented_outputs/cell_segmentations.geojson' &&
168 ln -s '$method_condi.segmentation_conditional.scalefactors_json_seg' 'input/segmented_outputs/spatial/scalefactors_json.json' &&
169 #end if
170
171 ## Images (placed in spatial/ and/or segmented_outputs/spatial/)
172 mkdir -p 'input/spatial' &&
173 #if $method_condi.images.tissue_hires:
174 ln -s '$method_condi.images.tissue_hires' 'input/spatial/tissue_hires_image.png' &&
175 #end if
176 #if $method_condi.images.tissue_lowres:
177 ln -s '$method_condi.images.tissue_lowres' 'input/spatial/tissue_lowres_image.png' &&
178 #end if
179 #if str($method_condi.images.cytassist_image_condi.include_cytassist) == 'yes':
180 ln -s '$method_condi.images.cytassist_image_condi.cytassist_image' 'input/spatial/cytassist_image.tiff' &&
181 #end if
182
183 ## Microscope image (if provided, create microscope_image directory)
184 #if $method_condi.images.microscope_image:
185 mkdir -p 'input/microscope_image' &&
186 ln -s '$method_condi.images.microscope_image' 'input/microscope_image/fullres_image.tiff' &&
187 #end if
188
189 echo "echoing the structure..." &&
190 tree -L 3 input &&
191
192 ## XENIUM
193 #else if $method_condi.method == 'xenium':
194 mkdir -p 'input/region/morphology_focus/' 'output' &&
195 ## ln -s does not work here.
196 #if str($method_condi.cell_boundaries) != '':
197 cp '$method_condi.cell_boundaries' 'input/region/cell_boundaries.parquet' &&
198 #end if
199 cp '$method_condi.cell_feature_matrix' 'input/region/cell_feature_matrix.h5' &&
200 cp '$method_condi.cells' 'input/region/cells.parquet' &&
201 cp '$method_condi.cells_zarr' 'input/region/cells.zarr.zip' &&
202 cp '$method_condi.experiment_xenium' 'input/region/experiment.xenium' &&
203 #for $image in $method_condi.morphology_focus:
204 #if $image.element_identifier.endswith('.ome.tiff') or $image.element_identifier.endswith('.ome.tif'):
205 cp '$image' 'input/region/morphology_focus/${image.element_identifier}' &&
206 #else:
207 cp '$image' 'input/region/morphology_focus/${image.element_identifier}.ome.tif' &&
208 #end if
209 #end for
210 #if str($method_condi.nucleus_boundaries) != '':
211 cp '$method_condi.nucleus_boundaries' 'input/region/nucleus_boundaries.parquet' &&
212 #end if
213 #if str($method_condi.transcripts) != '':
214 cp '$method_condi.transcripts' 'input/region/transcripts.parquet' &&
215 #end if
216 #if str($method_condi.add_hne_condi.add_hne) == 'yes' or str($method_condi.add_hne_condi.add_hne) == 'yes_accurate':
217 cp '$method_condi.add_hne_condi.hne_image' 'input/region/he_image.ome.tif' &&
218 #end if
219 #if str($method_condi.add_if_condi.add_if) == 'yes' or str($method_condi.add_if_condi.add_if) == 'yes_accurate':
220 cp '$method_condi.add_if_condi.if_image' 'input/region/if_image.ome.tif' &&
221 #end if
222 #if str($method_condi.add_hne_condi.add_hne) == 'yes_accurate':
223 cp '$method_condi.add_hne_condi.image_alignment' 'input/region/he_image_alignment.csv' &&
224 #end if
225 #if str($method_condi.add_if_condi.add_if) == 'yes_accurate':
226 cp '$method_condi.add_if_condi.image_alignment' 'input/region/if_image_alignment.csv' &&
227 #end if
228 #end if
229
230 ## run the pipeline
231 cat 'spdata_io.py' &&
232 python3 'spdata_io.py' &&
233 ## zip the output spatialdata folder
234 cd output && zip -r ../spatialdata.spatialdata.zip spatialdata/ && cd ..
235 ]]></command>
236 <configfiles>
237 <configfile name="spdata_config" filename="spdata_io.py">
238 #if $method_condi.method == 'cosmx':
239 from spatialdata_io import cosmx
240 spdata = cosmx(path="./",
241 dataset_id="$method_condi.dataset_id",
242 transcripts=$method_condi.transcripts_bool,
243 )
244
245 #else if $method_condi.method == 'curio':
246 from spatialdata_io import curio
247 spdata = curio(path="./input"
248 )
249
250 #else if $method_condi.method == 'dbit':
251 from spatialdata_io import dbit
252 spdata = dbit(path="./",
253 anndata_path="${method_condi.dataset_id}_counts.h5ad",
254 barcode_position="${method_condi.dataset_id}_barcode_positions.tabular",
255 image_path="${method_condi.dataset_id}_tissue_lowres.png",
256 dataset_id="$method_condi.dataset_id",
257 border=$method_condi.border,
258 border_scale=$method_condi.border_scale,
259 )
260
261 #else if $method_condi.method == 'macsima':
262 from spatialdata_io import macsima
263 spdata = macsima(path="./input",
264 parsing_style="auto",
265 #if $method_condi.subset:
266 subset=$method_condi.subset,
267 #end if
268 #if $method_condi.subset_c:
269 subset_c=$method_condi.subset_c,
270 #end if
271 max_chunk_size=$method_condi.max_chunk_size,
272 c_chunks_size=$method_condi.c_chunks_size,
273 multiscale=$method_condi.multiscale_bool,
274 transformations=$method_condi.transformations_bool,
275 #if str($method_condi.scale_factors) != '':
276 #set scale_factors_list = [int(x.strip()) for x in str($method_condi.scale_factors).split(',')]
277 scale_factors=$scale_factors_list,
278 #end if
279 nuclei_channel_name="$method_condi.nuclei_channel_name",
280 #if str($method_condi.split_threshold_nuclei_channel) != '':
281 split_threshold_nuclei_channel=$method_condi.split_threshold_nuclei_channel,
282 #else:
283 split_threshold_nuclei_channel=None,
284 #end if
285 include_cycle_in_channel_name=$method_condi.include_cycle_in_channel_name_bool,
286 )
287
288 #else if $method_condi.method == 'merscope':
289 from spatialdata_io import merscope
290 spdata = merscope(path="./input/region",
291 vpt_outputs="./input/region/vpt_outputs",
292 #set z_layers_list = [int(x.strip()) for x in str($method_condi.z_layers).split(',')]
293 z_layers=$z_layers_list,
294 region_name="$method_condi.region_name",
295 slide_name="$method_condi.slide_name",
296 backend="rioxarray",
297 transcripts=$method_condi.transcripts_bool,
298 cells_boundaries=$method_condi.cells_boundaries_bool,
299 cells_table=$method_condi.cells_table_bool,
300 mosaic_images=$method_condi.mosaic_images_bool,
301 )
302
303 #else if $method_condi.method == 'visium':
304 from spatialdata_io import visium
305 spdata = visium(path="./input",
306 dataset_id="$method_condi.dataset_id",
307 #if $method_condi.matrix_bool:
308 counts_file='raw_feature_bc_matrix.h5',
309 #else:
310 counts_file='filtered_feature_bc_matrix.h5',
311 #end if
312 fullres_image_file='fullres_image.tif',
313 tissue_positions_file='tissue_positions_list.csv',
314 scalefactors_file='scalefactors_json.json',
315 var_names_make_unique=True,
316 )
317
318 #else if $method_condi.method == 'visium_hd':
319 from spatialdata_io import visium_hd
320 spdata = visium_hd(path="./input",
321 dataset_id="$method_condi.dataset_id",
322 #if $method_condi.matrix_bool:
323 filtered_counts_file=False,
324 #else:
325 filtered_counts_file=True,
326 #end if
327 #if str($method_condi.include_binned_condi.include_binned) == 'no':
328 load_segmentations_only=True,
329 #else:
330 load_segmentations_only=False,
331 #end if
332 #if str($method_condi.include_binned_condi.include_binned) == 'yes' and str($method_condi.include_binned_condi.include_nucleus_seg_condi.include_nucleus_seg) == 'yes':
333 load_nucleus_segmentations=True,
334 #else:
335 load_nucleus_segmentations=False,
336 #end if
337 bin_size=None,
338 bins_as_squares=$method_condi.bins_as_squares_bool,
339 annotate_table_by_labels=$method_condi.annotate_table_by_labels_bool,
340 #if $method_condi.images.microscope_image:
341 fullres_image_file="./input/microscope_image/fullres_image.tiff",
342 #else:
343 fullres_image_file=None,
344 #end if
345 #if str($method_condi.images.cytassist_image_condi.include_cytassist) == 'yes':
346 load_all_images=True,
347 #else:
348 load_all_images=False,
349 #end if
350 var_names_make_unique=$method_condi.var_names_make_unique_bool,
351 )
352
353 #else if $method_condi.method == 'xenium':
354 import os
355 from spatialdata_io import xenium
356 spdata = xenium(path="./input/region",
357 #if str($method_condi.cell_boundaries) != '':
358 cells_boundaries=True,
359 #else:
360 cells_boundaries=False,
361 #end if
362 #if str($method_condi.nucleus_boundaries) != '':
363 nucleus_boundaries=True,
364 #else:
365 nucleus_boundaries=False,
366 #end if
367 cells_as_circles=$method_condi.cells_as_circles_bool,
368 cells_labels=$method_condi.cells_labels_bool,
369 nucleus_labels=$method_condi.nucleus_labels_bool,
370 #if str($method_condi.transcripts) != '':
371 transcripts=True,
372 #else:
373 transcripts=False,
374 #end if
375 morphology_mip=$method_condi.morphology_mip_bool,
376 morphology_focus=$method_condi.morphology_focus_bool,
377 #if str($method_condi.add_hne_condi.add_hne) == 'yes' or str($method_condi.add_if_condi.add_if) == 'yes':
378 aligned_images=True,
379 #else:
380 aligned_images=False,
381 #end if
382 cells_table=$method_condi.cells_table_bool,
383 gex_only=$method_condi.gex_only_bool,
384 n_jobs=int(os.getenv("GALAXY_SLOTS")),
385 )
386
387 #if str($method_condi.add_if_condi.add_if) == 'yes_accurate':
388 from spatialdata_io import xenium_aligned_image
389 spdata["if_image"] = xenium_aligned_image(
390 image_path="./input/region/if_image.ome.tif",
391 alignment_file="./input/region/if_image_alignment.csv"
392 )
393 #else if str($method_condi.add_hne_condi.add_hne) == 'yes_accurate':
394 from spatialdata_io import xenium_aligned_image
395 spdata["he_image"] = xenium_aligned_image(
396 image_path="./input/region/he_image.ome.tif",
397 alignment_file="./input/region/he_image_alignment.csv"
398 )
399
400 #end if
401 #end if
402
403 print(spdata)
404 spdata.write("./output/spatialdata", overwrite=True)
405 </configfile>
406 </configfiles>
407 <inputs>
408 <conditional name="method_condi">
409 <param name="method" type="select" label="Spatial Technology">
410 <option value="cosmx">CosMx</option>
411 <option value="dbit">DBiT-seq</option>
412 <option value="macsima">MACSima</option>
413 <option value="merscope">MERSCOPE</option>
414 <option value="visium">10x Genomics Visium</option>
415 <option value="visium_hd">10x Genomics Visium HD</option>
416 <option value="xenium">10x Genomics Xenium</option>
417 </param>
418 <when value="cosmx">
419 <param name="CellComposite" type="data" format="jpg,png,tiff" multiple="true" label="Cell Composite images"/>
420 <param name="CellLabels" type="data" format="tiff" multiple="true" label="Cell Labels images"/>
421 <param name="exprMat_file" type="data" format="csv" label="Expression matrix file"/>
422 <param name="fov_positions_file" type="data" format="csv" label="FOV positions file"/>
423 <param name="metadata_file" type="data" format="csv" label="Metadata file"/>
424 <param name="tx_file" type="data" format="csv" label="Transcripts file"/>
425 <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="It should match your input files name">
426 <sanitizer invalid_char="">
427 <valid initial="string.letters,string.digits">
428 <add value="_" />
429 </valid>
430 </sanitizer>
431 <validator type="regex">[0-9a-zA-Z_]+</validator>
432 </param>
433 <param name="transcripts_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load transcripts information?"/>
434 </when>
435 <when value="dbit">
436 <param name="barcode_positions" type="data" format="tabular" label="Barcode positions file"/>
437 <param name="counts" type="data" format="h5ad" label="Counts file"/>
438 <param name="tissue_lowres" type="data" format="png" label="Tissue low resolution image"/>
439 <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="It should match your input files name">
440 <sanitizer invalid_char="">
441 <valid initial="string.letters,string.digits">
442 <add value="_" />
443 </valid>
444 </sanitizer>
445 <validator type="regex">[0-9a-zA-Z_]+</validator>
446 </param>
447 <param name="border" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Create a border" help="If True, the square is shrinked toward its center, leaving an empty border." />
448 <param name="border_scale" type="float" value="1" label="Border scale factor" help="The factor by which the border is scaled. The default is 1. It corresponds to a border length of (0.125 * length of the square’s edge)"/>
449 </when>
450 <when value="macsima">
451 <param name="tiff_files" type="data" format="tiff" multiple="true" label="MACSima TIFF images" help="OME-TIFF files from MACSima cyclic imaging experiment"/>
452 <param name="subset" type="integer" min="0" optional="true" label="Subset the image to the first ``subset`` pixels in x and y dimensions"/>
453 <param name="subset_c" type="integer" min="0" optional="true" label="Subset the image to the first ``c_subset`` channels"/>
454 <param name="max_chunk_size" type="integer" min="0" value="1024" label="Maximum chunk size for x and y dimension"/>
455 <param name="c_chunks_size" type="integer" min="0" value="1" label="Maximum chunk size for x and y dimension"/>
456 <param name="multiscale_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Create multiscale image?"/>
457 <param name="transformations_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Whether to add a transformation from pixels to microns to the image"/>
458 <param name="scale_factors" type="integer" min="0" optional="true" label="Scale factors to use for downsampling" help="If None, scale factors are calculated based on image size."/>
459 <param name="nuclei_channel_name" type="text" value="DAPI" label="Nuclei channel name"/>
460 <param name="split_threshold_nuclei_channel" type="integer" min="0" value="2" optional="true" label="Split threshold for nuclei channels" help="If the number of channels that include nuclei_channel_name is greater than this threshold, the nuclei channels are split into a separate stack.."/>
461 <param name="include_cycle_in_channel_name_bool" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Include cycle number in channel name?" help="If True, prepend cycle number to channel names (e.g., 'R1 DAPI')"/>
462 </when>
463 <when value="merscope">
464 <param name="slide_name" type="text" value="Galaxy" label="Dataset identifier" help="Prefix used to name the constructed SpatialData elements.">
465 <sanitizer invalid_char="">
466 <valid initial="string.letters,string.digits">
467 <add value="_" />
468 </valid>
469 </sanitizer>
470 <validator type="regex">[0-9a-zA-Z_]+</validator>
471 </param>
472 <param name="region_name" type="text" value="region" label="Region name" help="Region name appended to the dataset identifier in the MERSCOPE output.">
473 <sanitizer invalid_char="">
474 <valid initial="string.letters,string.digits">
475 <add value="_" />
476 </valid>
477 </sanitizer>
478 <validator type="regex">[0-9a-zA-Z_]+</validator>
479 </param>
480 <param argument="--z_layers" type="text" value="3" optional="false" label="Comma separated list of Indices of the z-layers to consider" help="By default, only the middle layer is considered (layer 3).">
481 <expand macro="sanitize_digits"/>
482 </param>
483 <param argument="--mosaic-images" type="data" format="tiff" multiple="true" label="MEROSCOPE tiff images"/>
484 <param name="input_micron_to_mosaic" type="data" format="csv" label="Micron to mosaic mapping file"/>
485 <param name="cell_by_gene" type="data" format="csv" label="Cell by gene table" help="Cells as rows and Genes as columns"/>
486 <param name="cell_meta" type="data" format="csv" label="Cell metadata table"/>
487 <param name="cells_boundaries" type="data" format="parquet" label="Cell boundaries (micron_space)"/>
488 <param name="transcripts" type="data" format="csv" label="Detected transcripts"/>
489 <param name="transcripts_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load transcripts information?"/>
490 <param name="cells_boundaries_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells boundaries?"/>
491 <param name="cells_table_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells table?"/>
492 <param name="mosaic_images_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load mosaic images?"/>
493 </when>
494 <when value="visium">
495 <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier to name the constructed SpatialData elements">
496 <sanitizer invalid_char="">
497 <valid initial="string.letters,string.digits">
498 <add value="_" />
499 </valid>
500 </sanitizer>
501 <validator type="regex">[0-9a-zA-Z_]+</validator>
502 </param>
503 <param name="feature_bc_matrix" type="data" format="h5" label="feature BC matrix (Counts file)"/>
504 <param name="matrix_bool" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Is the matrix input, raw?" help="If the matrix input is raw, set this to true." />
505 <param name="scalefactors_json" type="data" format="json" label="Scale factors file"/>
506 <param name="fullres_image_file" type="data" format="tiff" label="Full resolution image"/>
507 <param name="tissue_hires_image" type="data" format="png" label="Tissue high resolution image"/>
508 <param name="tissue_lowres_image" type="data" format="png" label="Tissue low resolution image"/>
509 <param name="tissue_positions_list" type="data" format="csv" label="Tissue positions file"/>
510 </when>
511 <when value="visium_hd">
512 <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="Name for the constructed SpatialData elements">
513 <sanitizer invalid_char="">
514 <valid initial="string.letters,string.digits">
515 <add value="_" />
516 </valid>
517 </sanitizer>
518 <validator type="regex">[0-9a-zA-Z_]+</validator>
519 </param>
520 <param name="matrix_bool" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Is the matrix input, raw?" help="If the matrix input is raw, set this to true."/>
521 <param name="feature_slice" type="data" format="h5" label="Feature slice file"/>
522 <conditional name="include_binned_condi">
523 <param name="include_binned" type="select" label="Include binned data?">
524 <option value="yes">Yes</option>
525 <option value="no">No</option>
526 </param>
527 <when value="no"/>
528 <when value="yes">
529 <section name="bin008" title="Binned outputs 008">
530 <param name="feature_bc_matrix_008" type="data" format="h5" optional="true" label="Feature BC matrix of bin 008"/>
531 <param name="tissue_positions_008" type="data" format="parquet" optional="true" label="Tissue positions of bin 008"/>
532 <param name="scalefactors_json_008" type="data" format="json" optional="true" label="Scale factors of bin 008"/>
533 </section>
534 <section name="bin016" title="Binned outputs 016">
535 <param name="feature_bc_matrix_016" type="data" format="h5" optional="true" label="Feature BC matrix of bin 016"/>
536 <param name="tissue_positions_016" type="data" format="parquet" optional="true" label="Tissue positions of bin 016"/>
537 <param name="scalefactors_json_016" type="data" format="json" optional="true" label="Scale factors of bin 016"/>
538 </section>
539 <conditional name="include_nucleus_seg_condi">
540 <param name="include_nucleus_seg" type="select" label="Include nucleus segmentation?">
541 <option value="yes">Yes</option>
542 <option value="no">No</option>
543 </param>
544 <when value="no">
545 <section name="bin002" title="Binned outputs 002">
546 <param name="feature_bc_matrix_002" type="data" format="h5" optional="true" label="Feature BC matrix of bin 002"/>
547 <param name="tissue_positions_002" type="data" format="parquet" optional="true" label="Tissue positions of bin 002"/>
548 <param name="scalefactors_json_002" type="data" format="json" optional="true" label="Scale factors of bin 002"/>
549 </section>
550 </when>
551 <when value="yes">
552 <section name="bin002" title="Binned outputs 002">
553 <param name="feature_bc_matrix_002" type="data" format="h5" optional="false" label="Feature BC matrix of bin 002"/>
554 <param name="tissue_positions_002" type="data" format="parquet" optional="false" label="Tissue positions of bin 002"/>
555 <param name="scalefactors_json_002" type="data" format="json" optional="false" label="Scale factors of bin 002"/>
556 </section>
557 <param name="nucleus_segmentation" type="data" format="geojson" optional="false" label="Nucleus segmentation GeoJSON"/>
558 <param name="barcode_mappings" type="data" format="parquet" optional="false" label="Barcode mappings"/>
559 </when>
560 </conditional>
561 </when>
562 </conditional>
563 <conditional name="segmentation_conditional">
564 <param name="enable_segmentation" type="select" label="Include segmentation data?">
565 <option value="yes">Yes</option>
566 <option value="no">No</option>
567 </param>
568 <when value="no"/>
569 <when value="yes">
570 <param name="feature_bc_matrix_seg" type="data" format="h5" optional="false" label="Feature BC matrix of cell segmentation"/>
571 <param name="cell_segmentation" type="data" format="geojson" optional="false" label="Cell segmentation GeoJSON"/>
572 <param name="scalefactors_json_seg" type="data" format="json" optional="false" label="Scale factors of cell segmentation"/>
573 </when>
574 </conditional>
575 <section name="images" title="Images">
576 <param name="microscope_image" type="data" format="png,tiff,jpg" optional="true" label="Microscope image" help="Full-resolution microscope image (png/tiff/jpg)"/>
577 <param name="tissue_hires" type="data" format="png" optional="true" label="Tissue high-res image" help="tissue_hires_image.png"/>
578 <param name="tissue_lowres" type="data" format="png" optional="true" label="Tissue low-res image" help="tissue_lowres_image.png"/>
579 <conditional name="cytassist_image_condi">
580 <param name="include_cytassist" type="select" label="Include CytAssist image?">
581 <option value="yes">Yes</option>
582 <option value="no">No</option>
583 </param>
584 <when value="no"/>
585 <when value="yes">
586 <param name="cytassist_image" type="data" format="tiff" optional="false" label="CytAssist image"/>
587 </when>
588 </conditional>
589 </section>
590 <param name="bins_as_squares_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load bins as squares?" help="If True, bins are represented as squares; if False, as circles"/>
591 <param name="annotate_table_by_labels_bool" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Annotate table by labels?" help="Annotate the AnnData table with cell/nucleus labels"/>
592 <param name="var_names_make_unique_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Make variable names unique?" help="If True, call .var_names_make_unique() on each AnnData table"/>
593 </when>
594 <when value="xenium">
595 <param name="cell_feature_matrix" type="data" format="h5" label="Cell feature matrix"/>
596 <param name="cells" type="data" format="parquet" label="Cells metadata"/>
597 <param name="cells_zarr" type="data" format="zarr.zip" label="Cells zarr archive"/>
598 <param name="experiment_xenium" type="data" format="json" label="Experiment xenium file containing specifications"/>
599 <param name="morphology_focus" type="data" format="ome.tiff" multiple="true" label="Morphology focus images" help="Both MIP and Focus"/>
600 <param name="cell_boundaries" type="data" optional="true" format="parquet" label="Polygons of cell boundaries"/>
601 <param name="nucleus_boundaries" type="data" optional="true" format="parquet" label="Polygons of nucleus boundaries"/>
602 <param name="transcripts" type="data" optional="true" format="parquet" label="Transcripts"/>
603 <param name="cells_as_circles_bool" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Represent cells as circles?" help="The center and the radius of each circle is computed from the corresponding labels cell"/>
604 <param name="cells_labels_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells labels?"/>
605 <param name="nucleus_labels_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load nucleus labels?"/>
606 <param name="morphology_mip_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load morphology MIP?"/>
607 <param name="morphology_focus_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load morphology focus?"/>
608 <param name="cells_table_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells annotation from AnnData?"/>
609 <param name="gex_only_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load gene expression only?"/>
610 <conditional name="add_hne_condi">
611 <param name="add_hne" type="select" label="Add H&amp;E image?">
612 <option value="yes_accurate">Yes, with accurate alignment</option>
613 <option value="yes">Yes</option>
614 <option value="no" selected="true">No</option>
615 </param>
616 <when value="no"/>
617 <when value="yes_accurate">
618 <param name="hne_image" type="data" format="ome.tiff" label="H&amp;E image"/>
619 <param name="image_alignment" type="data" format="csv" label="Image alignment file"/>
620 </when>
621 <when value="yes">
622 <param name="hne_image" type="data" format="ome.tiff" label="H&amp;E image"/>
623 </when>
624 </conditional>
625 <conditional name="add_if_condi">
626 <param name="add_if" type="select" label="Add IF image?">
627 <option value="yes_accurate">Yes, with accurate alignment</option>
628 <option value="yes">Yes</option>
629 <option value="no" selected="true">No</option>
630 </param>
631 <when value="no"/>
632 <when value="yes_accurate">
633 <param name="if_image" type="data" format="ome.tiff" label="IF image"/>
634 <param name="image_alignment" type="data" format="csv" label="Image alignment file"/>
635 </when>
636 <when value="yes">
637 <param name="if_image" type="data" format="ome.tiff" label="IF image"/>
638 </when>
639 </conditional>
640 </when>
641 </conditional>
642 </inputs>
643 <outputs>
644 <data name="spatialdata_output" format="spatialdata.zip" from_work_dir="spatialdata.spatialdata.zip" label="${tool.name} on ${on_string}: spatialdata"/>
645 </outputs>
646 <tests>
647 <!-- test 1: io MERSCOPE full -->
648 <test>
649 <conditional name="method_condi">
650 <param name="method" value="merscope"/>
651 <param name="slide_name" value="Test_MERSCOPE"/>
652 <param name="region_name" value="sample_region"/>
653 <param name="mosaic_images" location="https://zenodo.org/records/18746346/files/mosaic_Cellbound1_z2.tif,https://zenodo.org/records/18746346/files/mosaic_Cellbound1_z3.tif,https://zenodo.org/records/18746346/files/mosaic_Cellbound2_z2.tif,https://zenodo.org/records/18746346/files/mosaic_Cellbound2_z3.tif,https://zenodo.org/records/18746346/files/mosaic_Cellbound3_z2.tif,https://zenodo.org/records/18746346/files/mosaic_Cellbound3_z3.tif,https://zenodo.org/records/18746346/files/mosaic_DAPI_z2.tif,https://zenodo.org/records/18746346/files/mosaic_DAPI_z3.tif,https://zenodo.org/records/18746346/files/mosaic_PolyT_z2.tif,https://zenodo.org/records/18746346/files/mosaic_PolyT_z3.tif"/>
654 <param name="z_layers" value="3"/>
655 <param name="input_micron_to_mosaic" location="https://zenodo.org/records/18746346/files/merscope_micron_to_mosaic_pixel_transform.csv"/>
656 <param name="cell_by_gene" location="https://zenodo.org/records/18746346/files/merscope_cell_by_gene.csv"/>
657 <param name="cell_meta" location="https://zenodo.org/records/18746346/files/merscope_cell_metadata.csv"/>
658 <param name="cells_boundaries" location="https://zenodo.org/records/18746346/files/merscope_cellpose2_micron_space.parquet"/>
659 <param name="transcripts" location="https://zenodo.org/records/18746346/files/merscope_detected_transcripts.csv"/>
660 </conditional>
661 <assert_stdout>
662 <has_text text="z_layers=[3]"/>
663 <has_text text="&apos;Test_MERSCOPE_sample_region_polygons&apos;: GeoDataFrame shape: (928, 9)"/>
664 <has_text text="&apos;table&apos;: AnnData (928, 130)"/>
665 </assert_stdout>
666 <output name="spatialdata_output">
667 <assert_contents>
668 <has_archive_member path="spatialdata/zarr.json">
669 <has_text text="&quot;zarr_format&quot;: 3"/>
670 <has_text text="&quot;label&quot;: &quot;DAPI&quot;"/>
671 </has_archive_member>
672 </assert_contents>
673 </output>
674 </test>
675 <!-- test 2: io COSMX full -->
676 <test>
677 <conditional name="method_condi">
678 <param name="method" value="cosmx"/>
679 <param name="CellComposite" location="https://zenodo.org/records/18746346/files/cosmx_CellComposite_F001.jpg"/>
680 <param name="CellLabels" location="https://zenodo.org/records/18746346/files/cosmx_CellLabels_F001.tif"/>
681 <param name="exprMat_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_exprMat_file.csv"/>
682 <param name="fov_positions_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_fov_positions_file.csv"/>
683 <param name="metadata_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_metadata_file.csv"/>
684 <param name="tx_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_tx_file.csv"/>
685 <param name="dataset_id" value="cosmx_dummy"/>
686 <param name="transcripts_bool" value="True"/>
687 </conditional>
688 <output name="spatialdata_output">
689 <assert_contents>
690 <has_archive_member path="spatialdata/zarr.json">
691 <has_text text="&quot;zarr_format&quot;: 3"/>
692 <has_text text="images/1_image"/>
693 </has_archive_member>
694 </assert_contents>
695 </output>
696 </test>
697 <!-- test 3: io dbit full-->
698 <test>
699 <conditional name="method_condi">
700 <param name="method" value="dbit"/>
701 <param name="barcode_positions" location="https://zenodo.org/records/18746346/files/dbit_barcode_positions.txt"/>
702 <param name="counts" location="https://zenodo.org/records/18746346/files/dbit_counts.h5ad"/>
703 <param name="tissue_lowres" location="https://zenodo.org/records/18746346/files/dbit_tissue_lowres.png"/>
704 </conditional>
705 <assert_stdout>
706 <has_text text="&apos;Galaxy&apos;: GeoDataFrame shape: (500, 1) (2D shapes)"/>
707 <has_text text="&apos;table&apos;: AnnData (500, 1000)"/>
708 </assert_stdout>
709 <output name="spatialdata_output">
710 <assert_contents>
711 <has_archive_member path="spatialdata/zarr.json">
712 <has_text text="&quot;zarr_format&quot;: 3"/>
713 <has_text text="images/Galaxy_image"/>
714 </has_archive_member>
715 </assert_contents>
716 </output>
717 </test>
718 <!-- test 4: io macsima full-->
719 <test>
720 <conditional name="method_condi">
721 <param name="method" value="macsima"/>
722 <param name="tiff_files" location="https://zenodo.org/records/18746346/files/macima_C-001_S-000_S_APC_R-01_W-D01_ROI-01_A-CD3_C-REA1151.tif,https://zenodo.org/records/18746346/files/macima_C-002_S-000_S_PE_R-01_W-D01_ROI-01_A-CD279_C-REA1165.tif,https://zenodo.org/records/18746346/files/macima_C-015_S-000_B_DAPI_R-01_W-D01_ROI-01_A-DAPI.tif,https://zenodo.org/records/18746346/files/macima_C-001_S-000_S_DAPI_R-01_W-D01_ROI-01_A-DAPI.tif,https://zenodo.org/records/18746346/files/macima_C-004_S-000_S_FITC_R-01_W-D01_ROI-01_A-CD66b_C-REA306.tif"/>
723 </conditional>
724 <assert_stdout>
725 <has_text text="&apos;input_image&apos;: DataTree"/>
726 <has_text text="&apos;input_table&apos;: AnnData (0, 5)"/>
727 </assert_stdout>
728 <output name="spatialdata_output">
729 <assert_contents>
730 <has_archive_member path="spatialdata/zarr.json">
731 <has_text text="&quot;zarr_format&quot;: 3"/>
732 <has_text text="images/input_image"/>
733 </has_archive_member>
734 </assert_contents>
735 </output>
736 </test>
737 <!-- test 5: io VISIUM full -->
738 <test>
739 <conditional name="method_condi">
740 <param name="method" value="visium"/>
741 <param name="dataset_id" value="Test_Visium"/>
742 <param name="feature_bc_matrix" location="https://zenodo.org/records/18746346/files/visium_CytAssist_FFPE_Protein_Expression_Human_Tonsil_filtered_feature_bc_matrix.h5"/>
743 <param name="matrix_bool" value="false"/>
744 <param name="scalefactors_json" location="https://zenodo.org/records/18746346/files/visium_scalefactors_json.json"/>
745 <param name="fullres_image_file" location="https://zenodo.org/records/18746346/files/visium_CytAssist_FFPE_Protein_Expression_Human_Tonsil_image.tif"/>
746 <param name="tissue_hires_image" location="https://zenodo.org/records/18746346/files/visium_tissue_hires_image.png"/>
747 <param name="tissue_lowres_image" location="https://zenodo.org/records/18746346/files/visium_tissue_lowres_image.png"/>
748 <param name="tissue_positions_list" location="https://zenodo.org/records/18746346/files/visium_tissue_positions.csv"/>
749 </conditional>
750 <assert_stdout>
751 <has_text text="&apos;Test_Visium&apos;: GeoDataFrame shape: (4194, 2)"/>
752 <has_text text="&apos;table&apos;: AnnData (4194, 18085)"/>
753 </assert_stdout>
754 <output name="spatialdata_output">
755 <assert_contents>
756 <has_archive_member path="spatialdata/zarr.json">
757 <has_text text="&quot;zarr_format&quot;: 3"/>
758 <has_text text="images/Test_Visium_full_image"/>
759 </has_archive_member>
760 </assert_contents>
761 </output>
762 </test>
763 <!-- test 6: io Visium HD full -->
764 <test>
765 <conditional name="method_condi">
766 <param name="method" value="visium_hd"/>
767 <param name="dataset_id" value="Test_VisiumHD"/>
768 <param name="matrix_bool" value="false"/>
769 <param name="feature_slice" location="https://zenodo.org/records/18746346/files/visiumhd_feature_slice.h5"/>
770 <conditional name="include_binned_condi">
771 <param name="include_binned" value="yes"/>
772 <section name="bin008">
773 <param name="feature_bc_matrix_008" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_008.h5"/>
774 <param name="tissue_positions_008" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_008.parquet"/>
775 <param name="scalefactors_json_008" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_008.json"/>
776 </section>
777 <section name="bin016">
778 <param name="feature_bc_matrix_016" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_016.h5"/>
779 <param name="tissue_positions_016" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_016.parquet"/>
780 <param name="scalefactors_json_016" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_016.json"/>
781 </section>
782 <conditional name="include_nucleus_seg_condi">
783 <param name="include_nucleus_seg" value="yes"/>
784 <section name="bin002">
785 <param name="feature_bc_matrix_002" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_002.h5"/>
786 <param name="tissue_positions_002" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_002.parquet"/>
787 <param name="scalefactors_json_002" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_002.json"/>
788 </section>
789 <param name="nucleus_segmentation" location="https://zenodo.org/records/18746346/files/visiumhd_nucleus_segmentations.geojson"/>
790 <param name="barcode_mappings" location="https://zenodo.org/records/18746346/files/visiumhd_barcode_mappings.parquet"/>
791 </conditional>
792 </conditional>
793 <conditional name="segmentation_conditional">
794 <param name="enable_segmentation" value="yes"/>
795 <param name="feature_bc_matrix_seg" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_cell_matrix_seg.h5"/>
796 <param name="cell_segmentation" location="https://zenodo.org/records/18746346/files/visiumhd_cell_segmentations.geojson"/>
797 <param name="scalefactors_json_seg" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_seg.json"/>
798 </conditional>
799 <section name="images">
800 <param name="tissue_hires" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_hires_image.png"/>
801 <param name="tissue_lowres" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_lowres_image.png"/>
802 <conditional name="cytassist_image_condi">
803 <param name="include_cytassist" value="yes"/>
804 <param name="cytassist_image" location="https://zenodo.org/records/18746346/files/visiumhd_cytassist_image.tiff"/>
805 </conditional>
806 </section>
807 <param name="bins_as_squares_bool" value="true"/>
808 <param name="annotate_table_by_labels_bool" value="false"/>
809 <param name="var_names_make_unique_bool" value="true"/>
810 </conditional>
811 <assert_stdout>
812 <has_text text="&apos;Test_VisiumHD"/>
813 <has_text text="Tables"/>
814 <has_text text="&apos;cell_segmentations&apos;: AnnData"/>
815 </assert_stdout>
816 <output name="spatialdata_output">
817 <assert_contents>
818 <has_archive_member path="spatialdata/zarr.json">
819 <has_text text="&quot;zarr_format&quot;: 3"/>
820 </has_archive_member>
821 </assert_contents>
822 </output>
823 </test>
824 <!-- test 7: io XENIUM full -->
825 <test>
826 <conditional name="method_condi">
827 <param name="method" value="xenium"/>
828 <param name="cell_feature_matrix" location="https://zenodo.org/records/18746346/files/xenium_cell_feature_matrix.h5"/>
829 <param name="cells" location="https://zenodo.org/records/18746346/files/xenium_cells.parquet"/>
830 <param name="cells_zarr" location="https://zenodo.org/records/18746346/files/xenium_cells.zarr.zip"/>
831 <param name="experiment_xenium" location="https://zenodo.org/records/18746346/files/xenium_experiment.xenium"/>
832 <param name="morphology_focus" location="https://zenodo.org/records/18746346/files/ch0000_dapi.ome.tif,https://zenodo.org/records/18746346/files/ch0006_yellow_background.ome.tif,https://zenodo.org/records/18746346/files/ch0001_atp1a1_cd45_e-cadherin.ome.tif,https://zenodo.org/records/18746346/files/ch0007_red_background.ome.tif,https://zenodo.org/records/18746346/files/ch0002_18s.ome.tif,https://zenodo.org/records/18746346/files/ch0008_pd-1.ome.tif,https://zenodo.org/records/18746346/files/ch0003_alphasma_vimentin.ome.tif,https://zenodo.org/records/18746346/files/ch0009_vista.ome.tif,https://zenodo.org/records/18746346/files/ch0004_blue_background.ome.tif,https://zenodo.org/records/18746346/files/ch0010_pd-l1.ome.tif,https://zenodo.org/records/18746346/files/ch0005_green_background.ome.tif,https://zenodo.org/records/18746346/files/ch0011_lag-3.ome.tif"/>
833 <param name="cell_boundaries" location="https://zenodo.org/records/18746346/files/xenium_cell_boundaries.parquet"/>
834 <param name="nucleus_boundaries" location="https://zenodo.org/records/18746346/files/xenium_nucleus_boundaries.parquet"/>
835 <param name="transcripts" location="https://zenodo.org/records/18746346/files/xenium_transcripts.parquet"/>
836 <conditional name="add_hne_condi">
837 <param name="add_hne" value="yes"/>
838 <param name="hne_image" location="https://zenodo.org/records/18746346/files/xenium_he_image.ome.tif"/>
839 </conditional>
840 </conditional>
841 <assert_stdout>
842 <has_text text="&apos;cell_labels&apos;: DataTree"/>
843 <has_text text="&apos;table&apos;: AnnData (358, 405)"/>
844 </assert_stdout>
845 <output name="spatialdata_output">
846 <assert_contents>
847 <has_archive_member path="spatialdata/zarr.json">
848 <has_text text="&quot;zarr_format&quot;: 3"/>
849 <has_text text="images/morphology_focus"/>
850 </has_archive_member>
851 </assert_contents>
852 </output>
853 </test>
854 <!-- test 8: io XENIUM full accurate-->
855 <test>
856 <conditional name="method_condi">
857 <param name="method" value="xenium"/>
858 <param name="cell_feature_matrix" location="https://zenodo.org/records/18746346/files/xenium_cell_feature_matrix.h5"/>
859 <param name="cells" location="https://zenodo.org/records/18746346/files/xenium_cells.parquet"/>
860 <param name="cells_zarr" location="https://zenodo.org/records/18746346/files/xenium_cells.zarr.zip"/>
861 <param name="experiment_xenium" location="https://zenodo.org/records/18746346/files/xenium_experiment.xenium"/>
862 <param name="morphology_focus" location="https://zenodo.org/records/18746346/files/ch0000_dapi.ome.tif,https://zenodo.org/records/18746346/files/ch0006_yellow_background.ome.tif,https://zenodo.org/records/18746346/files/ch0001_atp1a1_cd45_e-cadherin.ome.tif,https://zenodo.org/records/18746346/files/ch0007_red_background.ome.tif,https://zenodo.org/records/18746346/files/ch0002_18s.ome.tif,https://zenodo.org/records/18746346/files/ch0008_pd-1.ome.tif,https://zenodo.org/records/18746346/files/ch0003_alphasma_vimentin.ome.tif,https://zenodo.org/records/18746346/files/ch0009_vista.ome.tif,https://zenodo.org/records/18746346/files/ch0004_blue_background.ome.tif,https://zenodo.org/records/18746346/files/ch0010_pd-l1.ome.tif,https://zenodo.org/records/18746346/files/ch0005_green_background.ome.tif,https://zenodo.org/records/18746346/files/ch0011_lag-3.ome.tif"/>
863 <param name="cell_boundaries" location="https://zenodo.org/records/18746346/files/xenium_cell_boundaries.parquet"/>
864 <param name="nucleus_boundaries" location="https://zenodo.org/records/18746346/files/xenium_nucleus_boundaries.parquet"/>
865 <param name="transcripts" location="https://zenodo.org/records/18746346/files/xenium_transcripts.parquet"/>
866 <conditional name="add_hne_condi">
867 <param name="add_hne" value="yes_accurate"/>
868 <param name="hne_image" location="https://zenodo.org/records/18746346/files/xenium_he_image.ome.tif"/>
869 <param name="image_alignment" location="https://zenodo.org/records/18746346/files/xenium_he_image_alignment.csv"/>
870 </conditional>
871 </conditional>
872 <assert_stdout>
873 <has_text text="&apos;cell_labels&apos;: DataTree"/>
874 <has_text text="&apos;table&apos;: AnnData (358, 405)"/>
875 <has_text text="xenium_aligned_image"/>
876 </assert_stdout>
877 <output name="spatialdata_output">
878 <assert_contents>
879 <has_archive_member path="spatialdata/zarr.json">
880 <has_text text="&quot;zarr_format&quot;: 3"/>
881 <has_text text="images/morphology_focus"/>
882 </has_archive_member>
883 </assert_contents>
884 </output>
885 </test>
886 </tests>
887 <help><![CDATA[
888 **What it does**
889
890 This tool loads common spatial omics data formats into the SpatialData framework, a unified data structure for spatial omics data. It supports multiple spatial transcriptomics and proteomics technologies, converting their native output formats into a standardized SpatialData object stored as a Zarr archive.
891
892 -----
893
894 **Supported Technologies**
895
896 - **10x Genomics Visium**: Standard Visium spatial gene expression data
897 - **10x Genomics Visium HD**: High-definition Visium with multiple bin sizes and segmentation data
898 - **10x Genomics Xenium**: In situ spatial transcriptomics with subcellular resolution
899 - **CosMx SMI (Nanostring)**: Spatial molecular imaging platform
900 - **MERSCOPE (Vizgen)**: Multiplexed error-robust fluorescence in situ hybridization
901 - **MACSima (Miltenyi)**: Multiplexed antibody-based imaging for cyclic staining
902 - **DBiT-seq**: Deterministic Barcoding in Tissue for spatial omics
903
904 -----
905
906 **Output**
907
908 The tool produces a SpatialData object saved as a compressed Zarr archive (.spatialdata.zip). This archive contains:
909
910 - **Images**: H&E, staining images
911 - **Labels**: Pixel-level segmentation
912 - **Shapes**: Cell/nucleus boundaries, subcellular structures, anatomical annotations, regions of interest (ROIs)
913 - **Points**: Transcripts locations with gene information, landmarks points
914 - **Tables**: AnnData objects with gene expression matrices and metadata
915
916 The SpatialData format enables downstream analysis with tools like squidpy, spatialdata-plot, and napari for interactive visualization.
917
918 -----
919
920 **More Information**
921
922 - `SpatialData documentation <https://spatialdata.scverse.org/projects/io/en/stable/>`__
923
924
925 ]]></help>
926 <expand macro="citations" />
927 </tool>