# HG changeset patch
# User iuc
# Date 1773501345 0
# Node ID c5928c28e2f01dff8d2f6c2b36ccecd593cd6121
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/spatialdata commit 87bff76d897c5a4277d9987cf26432a18e0458cd-dirty
diff -r 000000000000 -r c5928c28e2f0 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Sat Mar 14 15:15:45 2026 +0000
@@ -0,0 +1,442 @@
+
+ 0.7.2
+ 0
+ 25.0
+
+
+ spatialdata
+ spatialdata-io
+ spatialdata-plot
+
+ ome-zarr
+
+ anndata
+ pandas
+ rioxarray
+ zip
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10.1038/s41592-024-02212-x
+
+
+
\ No newline at end of file
diff -r 000000000000 -r c5928c28e2f0 spatialdata_plot.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spatialdata_plot.xml Sat Mar 14 15:15:45 2026 +0000
@@ -0,0 +1,688 @@
+
+ rich static plotting from SpatialData objects
+
+ macros.xml
+
+
+
+
+
+
+import spatialdata as sd
+import spatialdata_plot
+
+## Load the SpatialData object
+spdata = sd.read_zarr("./input/spatialdata")
+
+print(spdata)
+
+## Render images
+#for $img in $render_images:
+spdata = spdata.pl.render_images(
+ #if $img.image_element:
+ element='$img.image_element',
+ #else:
+ element=None,
+ #end if
+ #if $img.channel:
+ channel='$img.channel',
+ #end if
+ #if str($img.cmap_or_palette_condi.color_map_type) == 'cmap':
+ #set $cmap_list = [str(x.strip()) for x in str($img.cmap_or_palette_condi.cmap).split(',')]
+ cmap=$cmap_list,
+ #end if
+ #if str($img.normalize_condi.normalize) == 'yes':
+ norm=Normalize(
+ vmin=$img.normalize_condi.vmin if str($img.normalize_condi.vmin) != '' else None,
+ vmax=$img.normalize_condi.vmax if str($img.normalize_condi.vmax) != '' else None,
+ clip=$img.normalize_condi.clip
+ ),
+ #end if
+ #if str($img.cmap_or_palette_condi.color_map_type) == 'palette':
+ #set $palette_list = [str(x.strip()) for x in str($img.cmap_or_palette_condi.palette).split(',')]
+ palette=$palette_list,
+ #end if
+ alpha=$img.alpha,
+ #if $img.scale:
+ scale='$img.scale',
+ #end if
+)
+#end for
+
+## Render labels
+#for $lbl in $render_labels:
+spdata = spdata.pl.render_labels(
+ #if $lbl.labels_element:
+ element='$lbl.labels_element',
+ #else:
+ element=None,
+ #end if
+ #if $lbl.color:
+ color='$lbl.color',
+ #end if
+ #if $lbl.groups:
+ #set $groups_list = [str(x.strip()) for x in str($lbl.groups).split(',')]
+ groups=$groups_list,
+ #end if
+ #if str($lbl.cmap_or_palette_condi.color_map_type) == 'palette':
+ #set $palette_list = [str(x.strip()) for x in str($lbl.cmap_or_palette_condi.palette).split(',')]
+ palette=$palette_list,
+ #end if
+ contour_px=$lbl.contour_px,
+ #if str($lbl.cmap_or_palette_condi.color_map_type) == 'cmap':
+ #set $cmap_list = [str(x.strip()) for x in str($lbl.cmap_or_palette_condi.cmap).split(',')]
+ cmap=$cmap_list,
+ #end if
+ #if str($lbl.normalize_condi.normalize) == 'yes':
+ norm=Normalize(
+ vmin=$lbl.normalize_condi.vmin if str($lbl.normalize_condi.vmin) != '' else None,
+ vmax=$lbl.normalize_condi.vmax if str($lbl.normalize_condi.vmax) != '' else None,
+ clip=$lbl.normalize_condi.clip
+ ),
+ #end if
+ outline_alpha=$lbl.outline_alpha,
+ fill_alpha=$lbl.fill_alpha,
+ #if $lbl.scale:
+ scale='$lbl.scale',
+ #else
+ scale=None,
+ #end if
+ #if $lbl.table_name:
+ table_name='$lbl.table_name',
+ #else
+ table_name=None,
+ #end if
+ #if $lbl.table_layer:
+ table_layer='$lbl.table_layer',
+ #else
+ table_layer=None,
+ #end if
+)
+#end for
+
+## Render points
+#for $pt in $render_points:
+spdata = spdata.pl.render_points(
+ #if $pt.points_element:
+ element='$pt.points_element',
+ #else:
+ element=None,
+ #end if
+ #if $pt.color:
+ color='$pt.color',
+ #end if
+ #if str($pt.alpha) != '':
+ alpha=$pt.alpha,
+ #end if
+ #if $pt.groups:
+ #set $groups_list = [str(x.strip()) for x in str($pt.groups).split(',')]
+ groups=$groups_list,
+ #end if
+ #if str($pt.cmap_or_palette_condi.color_map_type) == 'palette':
+ #set $palette_list = [str(x.strip()) for x in str($pt.cmap_or_palette_condi.palette).split(',')]
+ palette=$palette_list,
+ #end if
+ #if str($pt.cmap_or_palette_condi.color_map_type) == 'cmap':
+ #set $cmap_list = [str(x.strip()) for x in str($pt.cmap_or_palette_condi.cmap).split(',')]
+ cmap=$cmap_list,
+ #end if
+ #if str($pt.normalize_condi.normalize) == 'yes':
+ norm=Normalize(
+ vmin=$pt.normalize_condi.vmin if str($pt.normalize_condi.vmin) != '' else None,
+ vmax=$pt.normalize_condi.vmax if str($pt.normalize_condi.vmax) != '' else None,
+ clip=$pt.normalize_condi.clip
+ ),
+ #end if
+ size=$pt.size,
+ #if $pt.method:
+ method='$pt.method',
+ #else:
+ method=None,
+ #end if
+ #if $pt.table_name:
+ table_name='$pt.table_name',
+ #else
+ table_name=None,
+ #end if
+ #if $pt.table_layer:
+ table_layer='$pt.table_layer',
+ #else
+ table_layer=None,
+ #end if
+
+)
+#end for
+
+## Render shapes
+#for $shp in $render_shapes:
+spdata = spdata.pl.render_shapes(
+ #if $shp.shapes_element:
+ element='$shp.shapes_element',
+ #else:
+ element=None,
+ #end if
+ #if $shp.color:
+ color='$shp.color',
+ #end if
+ #if str($shp.fill_alpha) != '':
+ fill_alpha=$shp.fill_alpha,
+ #end if
+ #if str($shp.groups) != '':
+ #set $groups_list = [str(x.strip()) for x in str($shp.groups).split(',')]
+ groups=$groups_list,
+ #end if
+ #if str($shp.cmap_or_palette_condi.color_map_type) == 'palette':
+ #set $palette_list = [str(x.strip()) for x in str($shp.cmap_or_palette_condi.palette).split(',')]
+ palette=$palette_list,
+ #end if
+
+ #if str($shp.outline_condi.outline_type) == 'no':
+ outline_width=None,
+ outline_color=None,
+ outline_alpha=None,
+ #else if str($shp.outline_condi.outline_type) == 'yes':
+ outline_width=$shp.outline_condi.outline_width1,
+ outline_color='$shp.outline_condi.outline_color1',
+ outline_alpha=$shp.outline_condi.outline_alpha1,
+ #else if str($shp.outline_condi.outline_type) == 'yes2':
+ outline_width=[$shp.outline_condi.outline_width1, $shp.outline_condi.outline_width2],
+ outline_color=['$shp.outline_condi.outline_color1', '$shp.outline_condi.outline_color2'],
+ outline_alpha=[$shp.outline_condi.outline_alpha1, $shp.outline_condi.outline_alpha2],
+ #end if
+
+ #if str($shp.cmap_or_palette_condi.color_map_type) == 'cmap':
+ #set $cmap_list = [str(x.strip()) for x in str($shp.cmap_or_palette_condi.cmap).split(',')]
+ cmap=$cmap_list,
+ #end if
+ #if str($shp.normalize_condi.normalize) == 'yes':
+ norm=Normalize(
+ vmin=$shp.normalize_condi.vmin if str($shp.normalize_condi.vmin) != '' else None,
+ vmax=$shp.normalize_condi.vmax if str($shp.normalize_condi.vmax) != '' else None,
+ clip=$shp.normalize_condi.clip
+ ),
+ #end if
+ scale=$shp.scale,
+ #if $shp.method and str($shp.method) != 'None':
+ method='$shp.method',
+ #else:
+ method=None,
+ #end if
+ #if $shp.table_name:
+ table_name='$shp.table_name',
+ #else
+ table_name=None,
+ #end if
+ #if $shp.table_layer:
+ table_layer='$shp.table_layer',
+ #else
+ table_layer=None,
+ #end if
+ #if $shp.shape and str($shp.shape) != 'None':
+ shape='$shp.shape',
+ #else:
+ shape=None,
+ #end if
+)
+#end for
+
+## Show the plot
+spdata.pl.show(
+ #if $show_params.coordinate_systems:
+ #set $coordinate_systems_list = [str(x.strip()) for x in str($show_params.coordinate_systems).split(',')]
+ coordinate_systems=$coordinate_systems_list,
+ #end if
+ figsize=($show_params.figsize_width, $show_params.figsize_height),
+ dpi=$show_params.dpi,
+ ncols=$show_params.ncols,
+ #if str($show_params.legend_fontsize) != '':
+ legend_fontsize=$show_params.legend_fontsize,
+ #end if
+ legend_fontweight='$show_params.legend_fontweight',
+ legend_loc='$show_params.legend_loc',
+ na_in_legend=$show_params.na_in_legend,
+ #if $show_params.title:
+ title='$show_params.title',
+ #end if
+ share_extent=$show_params.share_extent,
+ save='plot.${show_params.format}'
+)
+
+print("Plot saved successfully")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `__
+- `SpatialData documentation `__
+
+ ]]>
+
+
\ No newline at end of file