Mercurial > repos > iuc > spatialdata_io
changeset 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 | |
| files | macros.xml spatialdata_io.xml |
| diffstat | 2 files changed, 1369 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Sat Mar 14 15:16:08 2026 +0000 @@ -0,0 +1,442 @@ +<macros> + <token name="@TOOL_VERSION@">0.7.2</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@PROFILE@">25.0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">spatialdata</requirement> + <requirement type="package" version="0.6.0">spatialdata-io</requirement> + <requirement type="package" version="0.2.14">spatialdata-plot</requirement> + <!-- spatialdata is not compatible with ome-zarr > 0.13.0 check here: https://github.com/conda-forge/spatialdata-feedstock/pull/33--> + <requirement type="package" version="0.13.0">ome-zarr</requirement> + <!-- The zarr writer in Previous anndata doesn't support serializing ArrowStringArray. pining anndata and pandas --> + <requirement type="package" version="0.12.10">anndata</requirement> + <requirement type="package" version="2.3.3">pandas</requirement> + <requirement type="package" version="0.20.0">rioxarray</requirement> + <requirement type="package" version="3.0">zip</requirement> + </requirements> + </xml> + <xml name="creator"> + <creator> + <person givenName="Amirhossein" familyName="Naghsh Nilchi" email="nilchia@informatik.uni-freiburg.de"/> + <person givenName="Pavan" familyName="Videm" email="videmp@informatik.uni-freiburg.de"/> + <person givenName="Björn" familyName="Grüning" email="gruening@informatik.uni-freiburg.de"/> + <organization name="European Galaxy Team" url="https://usegalaxy-eu.github.io/people"/> + </creator> + </xml> + <xml name="sanitize_digits"> + <sanitizer invalid_char=""> + <valid initial="string.digits"> + <add value=","/> + <add value="."/> + <yield/> + </valid> + </sanitizer> + </xml> + <xml name="sanitize_query" token_validinitial="string.printable"> + <sanitizer> + <valid initial="@VALIDINITIAL@"> + <remove value="'"/> + </valid> + </sanitizer> + </xml> + <xml name="matplotlib_color"> + <option value="AliceBlue">AliceBlue</option> + <option value="AntiqueWhite">AntiqueWhite</option> + <option value="Aqua">Aqua</option> + <option value="Aquamarine">Aquamarine</option> + <option value="Azure">Azure</option> + <option value="Beige">Beige</option> + <option value="Bisque">Bisque</option> + <option value="Black">Black</option> + <option value="BlanchedAlmond">BlanchedAlmond</option> + <option value="Blue">Blue</option> + <option value="BlueViolet">BlueViolet</option> + <option value="Brown">Brown</option> + <option value="BurlyWood">BurlyWood</option> + <option value="CadetBlue">CadetBlue</option> + <option value="Chartreuse">Chartreuse</option> + <option value="Chocolate">Chocolate</option> + <option value="Coral">Coral</option> + <option value="CornflowerBlue">CornflowerBlue</option> + <option value="Cornsilk">Cornsilk</option> + <option value="Crimson">Crimson</option> + <option value="Cyan">Cyan</option> + <option value="DarkBlue">DarkBlue</option> + <option value="DarkCyan">DarkCyan</option> + <option value="DarkGoldenRod">DarkGoldenRod</option> + <option value="DarkGray">DarkGray</option> + <option value="DarkGrey">DarkGrey</option> + <option value="DarkGreen">DarkGreen</option> + <option value="DarkKhaki">DarkKhaki</option> + <option value="DarkMagenta">DarkMagenta</option> + <option value="DarkOliveGreen">DarkOliveGreen</option> + <option value="DarkOrange">DarkOrange</option> + <option value="DarkOrchid">DarkOrchid</option> + <option value="DarkRed">DarkRed</option> + <option value="DarkSalmon">DarkSalmon</option> + <option value="DarkSeaGreen">DarkSeaGreen</option> + <option value="DarkSlateBlue">DarkSlateBlue</option> + <option value="DarkSlateGray">DarkSlateGray</option> + <option value="DarkSlateGrey">DarkSlateGrey</option> + <option value="DarkTurquoise">DarkTurquoise</option> + <option value="DarkViolet">DarkViolet</option> + <option value="DeepPink">DeepPink</option> + <option value="DeepSkyBlue">DeepSkyBlue</option> + <option value="DimGray">DimGray</option> + <option value="DimGrey">DimGrey</option> + <option value="DodgerBlue">DodgerBlue</option> + <option value="FireBrick">FireBrick</option> + <option value="FloralWhite">FloralWhite</option> + <option value="ForestGreen">ForestGreen</option> + <option value="Fuchsia">Fuchsia</option> + <option value="Gainsboro">Gainsboro</option> + <option value="GhostWhite">GhostWhite</option> + <option value="Gold">Gold</option> + <option value="GoldenRod">GoldenRod</option> + <option value="Gray">Gray</option> + <option value="Grey">Grey</option> + <option value="Green">Green</option> + <option value="GreenYellow">GreenYellow</option> + <option value="HoneyDew">HoneyDew</option> + <option value="HotPink">HotPink</option> + <option value="IndianRed">IndianRed</option> + <option value="Indigo">Indigo</option> + <option value="Ivory">Ivory</option> + <option value="Khaki">Khaki</option> + <option value="Lavender">Lavender</option> + <option value="LavenderBlush">LavenderBlush</option> + <option value="LawnGreen">LawnGreen</option> + <option value="LemonChiffon">LemonChiffon</option> + <option value="LightBlue">LightBlue</option> + <option value="LightCoral">LightCoral</option> + <option value="LightCyan">LightCyan</option> + <option value="LightGoldenRodYellow">LightGoldenRodYellow</option> + <option value="LightGray">LightGray</option> + <option value="LightGrey">LightGrey</option> + <option value="LightGreen">LightGreen</option> + <option value="LightPink">LightPink</option> + <option value="LightSalmon">LightSalmon</option> + <option value="LightSeaGreen">LightSeaGreen</option> + <option value="LightSkyBlue">LightSkyBlue</option> + <option value="LightSlateGray">LightSlateGray</option> + <option value="LightSlateGrey">LightSlateGrey</option> + <option value="LightSteelBlue">LightSteelBlue</option> + <option value="LightYellow">LightYellow</option> + <option value="Lime">Lime</option> + <option value="LimeGreen">LimeGreen</option> + <option value="Linen">Linen</option> + <option value="Magenta">Magenta</option> + <option value="Maroon">Maroon</option> + <option value="MediumAquaMarine">MediumAquaMarine</option> + <option value="MediumBlue">MediumBlue</option> + <option value="MediumOrchid">MediumOrchid</option> + <option value="MediumPurple">MediumPurple</option> + <option value="MediumSeaGreen">MediumSeaGreen</option> + <option value="MediumSlateBlue">MediumSlateBlue</option> + <option value="MediumSpringGreen">MediumSpringGreen</option> + <option value="MediumTurquoise">MediumTurquoise</option> + <option value="MediumVioletRed">MediumVioletRed</option> + <option value="MidnightBlue">MidnightBlue</option> + <option value="MintCream">MintCream</option> + <option value="MistyRose">MistyRose</option> + <option value="Moccasin">Moccasin</option> + <option value="NavajoWhite">NavajoWhite</option> + <option value="Navy">Navy</option> + <option value="OldLace">OldLace</option> + <option value="Olive">Olive</option> + <option value="OliveDrab">OliveDrab</option> + <option value="Orange">Orange</option> + <option value="OrangeRed">OrangeRed</option> + <option value="Orchid">Orchid</option> + <option value="PaleGoldenRod">PaleGoldenRod</option> + <option value="PaleGreen">PaleGreen</option> + <option value="PaleTurquoise">PaleTurquoise</option> + <option value="PaleVioletRed">PaleVioletRed</option> + <option value="PapayaWhip">PapayaWhip</option> + <option value="PeachPuff">PeachPuff</option> + <option value="Peru">Peru</option> + <option value="Pink">Pink</option> + <option value="Plum">Plum</option> + <option value="PowderBlue">PowderBlue</option> + <option value="Purple">Purple</option> + <option value="RebeccaPurple">RebeccaPurple</option> + <option value="Red">Red</option> + <option value="RosyBrown">RosyBrown</option> + <option value="RoyalBlue">RoyalBlue</option> + <option value="SaddleBrown">SaddleBrown</option> + <option value="Salmon">Salmon</option> + <option value="SandyBrown">SandyBrown</option> + <option value="SeaGreen">SeaGreen</option> + <option value="SeaShell">SeaShell</option> + <option value="Sienna">Sienna</option> + <option value="Silver">Silver</option> + <option value="SkyBlue">SkyBlue</option> + <option value="SlateBlue">SlateBlue</option> + <option value="SlateGray">SlateGray</option> + <option value="SlateGrey">SlateGrey</option> + <option value="Snow">Snow</option> + <option value="SpringGreen">SpringGreen</option> + <option value="SteelBlue">SteelBlue</option> + <option value="Tan">Tan</option> + <option value="Teal">Teal</option> + <option value="Thistle">Thistle</option> + <option value="Tomato">Tomato</option> + <option value="Turquoise">Turquoise</option> + <option value="Violet">Violet</option> + <option value="Wheat">Wheat</option> + <option value="White">White</option> + <option value="WhiteSmoke">WhiteSmoke</option> + <option value="Yellow">Yellow</option> + <option value="YellowGreen">YellowGreen</option> + </xml> + <xml name="matplotlib_pyplot_colormap"> + <option value="viridis">viridis (Perceptually Uniform Sequential)</option> + <option value="plasma">plasma (Perceptually Uniform Sequential)</option> + <option value="inferno">inferno (Perceptually Uniform Sequential)</option> + <option value="magma">magma (Perceptually Uniform Sequential)</option> + <option value="cividis">cividis (Perceptually Uniform Sequential)</option> + <option value="Greys">Greys (Sequential)</option> + <option value="Purples">Purples (Sequential)</option> + <option value="Blues">Blues (Sequential)</option> + <option value="Greens">Greens (Sequential)</option> + <option value="Oranges">Oranges (Sequential)</option> + <option value="Reds">Reds (Sequential)</option> + <option value="YlOrBr">YlOrBr (Sequential)</option> + <option value="YlOrRd">YlOrRd (Sequential)</option> + <option value="OrRd">OrRd (Sequential)</option> + <option value="PuRd">PuRd (Sequential)</option> + <option value="RdPu">RdPu (Sequential)</option> + <option value="BuPu">BuPu (Sequential)</option> + <option value="GnBu">GnBu (Sequential)</option> + <option value="PuBu">PuBu (Sequential)</option> + <option value="YlGnBu">YlGnBu (Sequential)</option> + <option value="PuBuGn">PuBuGn (Sequential)</option> + <option value="BuGn">BuGn (Sequential)</option> + <option value="YlGn">YlGn (Sequential)</option> + <option value="binary">binary (Sequential 2)</option> + <option value="gist_yarg">gist_yarg (Sequential 2)</option> + <option value="gist_gray">gist_gray (Sequential 2)</option> + <option value="gray">gray (Sequential 2)</option> + <option value="bone">bone (Sequential 2)</option> + <option value="pink">pink (Sequential 2)</option> + <option value="spring">spring (Sequential 2)</option> + <option value="summer">summer (Sequential 2)</option> + <option value="autumn">autumn (Sequential 2)</option> + <option value="winter">winter (Sequential 2)</option> + <option value="cool">cool (Sequential 2)</option> + <option value="Wistia">Wistia (Sequential 2)</option> + <option value="hot">hot (Sequential 2)</option> + <option value="afmhot">afmhot (Sequential 2)</option> + <option value="gist_heat">gist_heat (Sequential 2)</option> + <option value="copper">copper (Sequential 2)</option> + <option value="PiYG">PiYG (Diverging)</option> + <option value="PRGn">PRGn (Diverging)</option> + <option value="BrBG">BrBG (Diverging)</option> + <option value="PuOr">PuOr (Diverging)</option> + <option value="RdGy">RdGy (Diverging)</option> + <option value="RdBu">RdBu (Diverging)</option> + <option value="RdYlBu">RdYlBu (Diverging)</option> + <option value="RdYlGn">RdYlGn (Diverging)</option> + <option value="Spectral">Spectral (Diverging)</option> + <option value="coolwarm">coolwarm (Diverging)</option> + <option value="bwr">bwr (Diverging)</option> + <option value="seismic">seismic (Diverging)</option> + <option value="twilight">twilight (Cyclic)</option> + <option value="twilight_shifted">twilight_shifted (Cyclic)</option> + <option value="hsv">hsv (Cyclic)</option> + <option value="Pastel1">Pastel1 (Qualitative)</option> + <option value="Pastel2">Pastel2 (Qualitative)</option> + <option value="Paired">Paired (Qualitative)</option> + <option value="Accent">Accent (Qualitative)</option> + <option value="Dark2">Dark2 (Qualitative)</option> + <option value="Set1">Set1 (Qualitative)</option> + <option value="Set2">Set2 (Qualitative)</option> + <option value="Set3">Set3 (Qualitative)</option> + <option value="tab10">tab10 (Qualitative)</option> + <option value="tab20">tab20 (Qualitative)</option> + <option value="tab20b">tab20b (Qualitative)</option> + <option value="tab20c">tab20c (Qualitative)</option> + <option value="flag">flag (Miscellaneous)</option> + <option value="prism">prism (Miscellaneous)</option> + <option value="ocean">ocean (Miscellaneous)</option> + <option value="gist_earth">gist_earth (Miscellaneous)</option> + <option value="terrain">terrain (Miscellaneous)</option> + <option value="gist_stern">gist_stern (Miscellaneous)</option> + <option value="gnuplot">gnuplot (Miscellaneous)</option> + <option value="gnuplot2">gnuplot2 (Miscellaneous)</option> + <option value="CMRmap">CMRmap (Miscellaneous)</option> + <option value="cubehelix">cubehelix (Miscellaneous)</option> + <option value="brg">brg (Miscellaneous)</option> + <option value="gist_rainbow">gist_rainbow (Miscellaneous)</option> + <option value="rainbow">rainbow (Miscellaneous)</option> + <option value="jet">jet (Miscellaneous)</option> + <option value="nipy_spectral">nipy_spectral (Miscellaneous)</option> + <option value="gist_ncar">gist_ncar (Miscellaneous)</option> + </xml> + + <xml name="cmap_param"> + <param argument="cmap" type="select" multiple="true" label="Matplotlib colormap name"> + <expand macro="matplotlib_pyplot_colormap"/> + </param> + </xml> + <xml name="palette_param"> + <param name="palette" type="select" multiple="true" label="Palette for discrete annotations" help="Must match the number of groups. The list can contain multiple palettes (one per group) to be visualized. If groups is provided but not palette, palette is set to default lightgray"> + <expand macro="matplotlib_color"/> + </param> + </xml> + <xml name="normalize_condi"> + <conditional name="normalize_condi"> + <param name="normalize" type="select" label="Apply matplotlib colormap normalization for continuous annotations?"> + <option value="no">No</option> + <option value="yes">Yes</option> + </param> + <when value="no"/> + <when value="yes"> + <param name="vmin" type="float" optional="true" label="Min value" help="Values within the range [vmin, vmax] from the input data will be linearly mapped to [0, 1]. If either vmin or vmax is not provided, they default to the minimum and maximum values of the input, respectively." /> + <param name="vmax" type="float" optional="true" label="Max value" help="Values within the range [vmin, vmax] from the input data will be linearly mapped to [0, 1]. If either vmin or vmax is not provided, they default to the minimum and maximum values of the input, respectively." /> + <param name="clip" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Clip" help="If clipping is on, values below vmin are mapped to 0 and values above vmax are mapped to 1" /> + </when> + </conditional> + </xml> + <xml name="cmap_or_palette_condi"> + <conditional name="cmap_or_palette_condi"> + <param name="color_map_type" type="select" label="Color mapping type"> + <option value="none">None</option> + <option value="cmap">Colormap (for continuous data)</option> + <option value="palette">Palette (for discrete/categorical data)</option> + </param> + <when value="none"/> + <when value="cmap"> + <expand macro="cmap_param"/> + </when> + <when value="palette"> + <expand macro="palette_param"/> + </when> + </conditional> + </xml> + + <!-- Input/Output macros --> + <xml name="input_spatialdata"> + <param name="input_spatialdata" type="data" format="spatialdata.zip" label="SpatialData object"/> + </xml> + + <!-- Common parameter macros --> + <xml name="param_element_name" token_label="Element name" token_help="" token_optional="false"> + <param name="element_name" type="text" label="@LABEL@" help="@HELP@" optional="@OPTIONAL@"> + <expand macro="sanitize_query"/> + <yield/> + </param> + </xml> + + <xml name="param_output_element_name" token_value="transformed_element" token_label="Output element name" token_help=""> + <param name="output_element_name" type="text" value="@VALUE@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_table_name" token_value="table" token_optional="false" token_label="Table name" token_help=""> + <param name="table_name" type="text" value="@VALUE@" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_coordinate_system" token_value="global" token_label="Coordinate system" token_help=""> + <param name="coordinate_system" type="text" value="@VALUE@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_target_coordinate_system" token_value="global" token_label="Target coordinate system" token_help=""> + <param name="target_coordinate_system" type="text" value="@VALUE@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_axes" token_value="x,y" token_label="Axes" token_help="Comma-separated list of axes (e.g., 'x,y' or 'x,y,z')"> + <param name="axes" type="text" value="@VALUE@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_region_key" token_value="region" token_optional="false" token_label="Region key" token_help=""> + <param name="region_key" type="text" value="@VALUE@" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_instance_key" token_value="instance_id" token_optional="false" token_label="Instance key" token_help=""> + <param name="instance_key" type="text" value="@VALUE@" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_value_key" token_optional="false" token_label="Value key" token_help=""> + <param name="value_key" type="text" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="coordinate_bounds_params"> + <param name="min_coordinate" type="text" label="Minimum coordinates" help="Comma-separated (e.g., '0,0')"> + <expand macro="sanitize_digits"/> + </param> + <param name="max_coordinate" type="text" label="Maximum coordinates" help="Comma-separated (e.g., '100,100')"> + <expand macro="sanitize_digits"/> + </param> + </xml> + + <!-- Option group macros --> + <xml name="join_type_options"> + <option value="left_exclusive">Left Exclusive</option> + <option value="inner">Inner</option> + <option value="right">Right</option> + <option value="right_exclusive">Right Exclusive</option> + </xml> + + <xml name="param_join_type" token_selected="left"> + <param name="how" type="select" label="Join type"> + <option value="@SELECTED@" selected="true">@SELECTED@</option> + <expand macro="join_type_options"/> + </param> + </xml> + + <xml name="agg_func_options"> + <option value="sum">Sum</option> + <option value="mean">Mean</option> + <option value="count">Count</option> + </xml> + + <xml name="param_agg_func" token_optional="false" token_selected="sum" token_help=""> + <param name="agg_func" type="select" optional="@OPTIONAL@" label="Aggregation function"> + <option value="@SELECTED@" selected="true">@SELECTED@</option> + <expand macro="agg_func_options"/> + </param> + </xml> + + <xml name="param_table_layer" token_optional="true" token_label="Layer of the AnnData table to use for coloring if color is in table.var" token_help="If None, sdata.table.X of the default table is used for coloring."> + <param name="table_layer" type="text" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_color" token_label="Color column" token_help="Column name from table.obs or table.var to use for coloring. Use comma to separate multiple keys. It can also be a color name."> + <param name="color" type="text" optional="true" label="@LABEL@" help="@HELP@"> + <expand macro="sanitize_query"/> + </param> + </xml> + + <xml name="param_rendering_method" token_optional="true" token_label="Rendering method" token_help="When None, the method is chosen based on the size of the data."> + <param name="method" type="select" optional="@OPTIONAL@" label="@LABEL@" help="@HELP@"> + <yield/> + <option value="matplotlib">Matplotlib</option> + <option value="datashader">Datashader</option> + </param> + </xml> + + <xml name="citations"> + <citations> + <citation type="doi">10.1038/s41592-024-02212-x</citation> + </citations> + </xml> +</macros> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spatialdata_io.xml Sat Mar 14 15:16:08 2026 +0000 @@ -0,0 +1,927 @@ +<tool id="spatialdata_io" name="SpatialData IO" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description>load common spatial omics formats into SpatialData</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="creator" /> + <command detect_errors="exit_code"><![CDATA[ + ## CosMX + #if $method_condi.method == 'cosmx': + ## puting all files in working directory instead of input. cosmx should run inside same directory + mkdir -p 'CellComposite' 'CellLabels' 'output' && + #for $image in $method_condi.CellComposite: + #if $image.element_identifier.endswith('.jpg'): + ln -s '$image' 'CellComposite/${image.element_identifier}' && + #else: + ln -s '$image' 'CellComposite/${image.element_identifier}.jpg' && + #end if + #end for + #for $image in $method_condi.CellLabels: + #if $image.element_identifier.endswith('.tiff') or $image.element_identifier.endswith('.tif'): + ln -s '$image' 'CellLabels/${image.element_identifier}' && + #else: + ln -s '$image' 'CellLabels/${image.element_identifier}.tiff' && + #end if + #end for + #if $method_condi.exprMat_file.element_identifier.endswith('.csv'): + ln -s '$method_condi.exprMat_file' '${method_condi.exprMat_file.element_identifier}' && + #else: + ln -s '$method_condi.exprMat_file' '${method_condi.exprMat_file.element_identifier}.csv' && + #end if + #if $method_condi.fov_positions_file.element_identifier.endswith('.csv'): + ln -s '$method_condi.fov_positions_file' '${method_condi.fov_positions_file.element_identifier}' && + #else: + ln -s '$method_condi.fov_positions_file' '${method_condi.fov_positions_file.element_identifier}.csv' && + #end if + #if $method_condi.metadata_file.element_identifier.endswith('.csv'): + ln -s '$method_condi.metadata_file' '${method_condi.metadata_file.element_identifier}' && + #else: + ln -s '$method_condi.metadata_file' '${method_condi.metadata_file.element_identifier}.csv' && + #end if + #if $method_condi.tx_file.element_identifier.endswith('.csv'): + ln -s '$method_condi.tx_file' '${method_condi.tx_file.element_identifier}' && + #else: + ln -s '$method_condi.tx_file' '${method_condi.tx_file.element_identifier}.csv' && + #end if + + ## CURIO + #else if $method_condi.method == 'curio': + mkdir -p 'input' 'output' && + ln -s '$method_condi.anndata' 'input/${method_condi.dataset_id}_anndata.h5ad' && + ln -s '$method_condi.cluster_assignment' 'input/${method_condi.dataset_id}_cluster_assignment.txt' && + ln -s '$method_condi.metrics' 'input/${method_condi.dataset_id}_Metrics.csv' && + ln -s '$method_condi.variable_features_clusters' 'input/${method_condi.dataset_id}_variable_features_clusters.txt' && + ln -s '$method_condi.variable_features_spatial' 'input/${method_condi.dataset_id}_variable_features_spatial_moransi.txt' && + + ## DBIT + #else if $method_condi.method == 'dbit': + ## puting all files in working directory instead of input. dbit should run inside same directory + mkdir -p 'output' && + ln -s '$method_condi.barcode_positions' '${method_condi.dataset_id}_barcode_positions.tabular' && + ln -s '$method_condi.counts' '${method_condi.dataset_id}_counts.h5ad' && + ln -s '$method_condi.tissue_lowres' '${method_condi.dataset_id}_tissue_lowres.png' && + + ## MACSima + #else if $method_condi.method == 'macsima': + mkdir -p 'input' 'output' && + #for $image in $method_condi.tiff_files: + #if $image.element_identifier.endswith('.tif') or $image.element_identifier.endswith('.tiff'): + ln -s '$image' 'input/${image.element_identifier}' && + #else: + ln -s '$image' 'input/${image.element_identifier}.tif' && + #end if + #end for + + ## MERSCOPE + #else if $method_condi.method == 'merscope': + mkdir -p 'input/region/images' 'input/region/vpt_outputs' 'output' && + #for $image in $method_condi.mosaic_images: + #if $image.element_identifier.endswith('.tif'): + ln -s '$image' 'input/region/images/${image.element_identifier}' && + #else: + ln -s '$image' 'input/region/images/${image.element_identifier}.tif' && + #end if + #end for + ln -s '$method_condi.input_micron_to_mosaic' 'input/region/images/micron_to_mosaic_pixel_transform.csv' && + ln -s '$method_condi.cell_by_gene' 'input/region/vpt_outputs/cell_by_gene.csv' && + ln -s '$method_condi.cell_meta' 'input/region/vpt_outputs/cell_metadata.csv' && + ## the tool checks the file name, so the name is hardcoded here, but it does not necessarily have to be from cellpose + ln -s '$method_condi.cells_boundaries' 'input/region/vpt_outputs/cellpose_micron_space.parquet' && + ln -s '$method_condi.transcripts' 'input/region/detected_transcripts.csv' && + + ## Visium + #else if $method_condi.method == 'visium': + mkdir -p 'input/spatial' 'output' && + #if $method_condi.matrix_bool: + ln -s '$method_condi.feature_bc_matrix' 'input/raw_feature_bc_matrix.h5' && + #else: + ln -s '$method_condi.feature_bc_matrix' 'input/filtered_feature_bc_matrix.h5' && + #end if + ln -s '$method_condi.scalefactors_json' 'input/scalefactors_json.json' && + ln -s '$method_condi.fullres_image_file' 'input/fullres_image.tif' && + ln -s '$method_condi.tissue_hires_image' 'input/spatial/tissue_hires_image.png' && + ln -s '$method_condi.tissue_lowres_image' 'input/spatial/tissue_lowres_image.png' && + ln -s '$method_condi.tissue_positions_list' 'input/tissue_positions_list.csv' && + + ## Visium HD + #else if $method_condi.method == 'visium_hd': + mkdir -p 'input' 'output' && + ## Core required file + ln -s '$method_condi.feature_slice' 'input/feature_slice.h5' && + + ## Binned outputs (if included) + #if str($method_condi.include_binned_condi.include_binned) == 'yes': + ## Bin 002um (required for nucleus segmentation if enabled) + #if $method_condi.include_binned_condi.bin002.feature_bc_matrix_002: + mkdir -p 'input/binned_outputs/square_002um/spatial' && + #if $method_condi.matrix_bool: + ln -s '$method_condi.include_binned_condi.bin002.feature_bc_matrix_002' 'input/binned_outputs/square_002um/raw_feature_bc_matrix.h5' && + #else: + ln -s '$method_condi.include_binned_condi.bin002.feature_bc_matrix_002' 'input/binned_outputs/square_002um/filtered_feature_bc_matrix.h5' && + #end if + ln -s '$method_condi.include_binned_condi.bin002.tissue_positions_002' 'input/binned_outputs/square_002um/spatial/tissue_positions.parquet' && + ln -s '$method_condi.include_binned_condi.bin002.scalefactors_json_002' 'input/binned_outputs/square_002um/spatial/scalefactors_json.json' && + #end if + + ## Bin 008um + #if $method_condi.include_binned_condi.bin008.feature_bc_matrix_008: + mkdir -p 'input/binned_outputs/square_008um/spatial' && + #if $method_condi.matrix_bool: + ln -s '$method_condi.include_binned_condi.bin008.feature_bc_matrix_008' 'input/binned_outputs/square_008um/raw_feature_bc_matrix.h5' && + #else: + ln -s '$method_condi.include_binned_condi.bin008.feature_bc_matrix_008' 'input/binned_outputs/square_008um/filtered_feature_bc_matrix.h5' && + #end if + ln -s '$method_condi.include_binned_condi.bin008.tissue_positions_008' 'input/binned_outputs/square_008um/spatial/tissue_positions.parquet' && + ln -s '$method_condi.include_binned_condi.bin008.scalefactors_json_008' 'input/binned_outputs/square_008um/spatial/scalefactors_json.json' && + #end if + + ## Bin 016um + #if $method_condi.include_binned_condi.bin016.feature_bc_matrix_016: + mkdir -p 'input/binned_outputs/square_016um/spatial' && + #if $method_condi.matrix_bool: + ln -s '$method_condi.include_binned_condi.bin016.feature_bc_matrix_016' 'input/binned_outputs/square_016um/raw_feature_bc_matrix.h5' && + #else: + ln -s '$method_condi.include_binned_condi.bin016.feature_bc_matrix_016' 'input/binned_outputs/square_016um/filtered_feature_bc_matrix.h5' && + #end if + ln -s '$method_condi.include_binned_condi.bin016.tissue_positions_016' 'input/binned_outputs/square_016um/spatial/tissue_positions.parquet' && + ln -s '$method_condi.include_binned_condi.bin016.scalefactors_json_016' 'input/binned_outputs/square_016um/spatial/scalefactors_json.json' && + #end if + + ## Nucleus segmentation (requires barcode_mappings at root) + #if str($method_condi.include_binned_condi.include_nucleus_seg_condi.include_nucleus_seg) == 'yes': + mkdir -p 'input/segmented_outputs/' && + ln -s '$method_condi.include_binned_condi.include_nucleus_seg_condi.barcode_mappings' 'input/barcode_mappings.parquet' && + ln -s '$method_condi.include_binned_condi.include_nucleus_seg_condi.nucleus_segmentation' 'input/segmented_outputs/nucleus_segmentations.geojson' && + #end if + #end if + + ## Segmented outputs (cell segmentation) + #if str($method_condi.segmentation_conditional.enable_segmentation) == 'yes': + mkdir -p 'input/segmented_outputs/spatial' && + #if $method_condi.matrix_bool: + ln -s '$method_condi.segmentation_conditional.feature_bc_matrix_seg' 'input/segmented_outputs/raw_feature_cell_matrix.h5' && + #else: + ln -s '$method_condi.segmentation_conditional.feature_bc_matrix_seg' 'input/segmented_outputs/filtered_feature_cell_matrix.h5' && + #end if + ln -s '$method_condi.segmentation_conditional.cell_segmentation' 'input/segmented_outputs/cell_segmentations.geojson' && + ln -s '$method_condi.segmentation_conditional.scalefactors_json_seg' 'input/segmented_outputs/spatial/scalefactors_json.json' && + #end if + + ## Images (placed in spatial/ and/or segmented_outputs/spatial/) + mkdir -p 'input/spatial' && + #if $method_condi.images.tissue_hires: + ln -s '$method_condi.images.tissue_hires' 'input/spatial/tissue_hires_image.png' && + #end if + #if $method_condi.images.tissue_lowres: + ln -s '$method_condi.images.tissue_lowres' 'input/spatial/tissue_lowres_image.png' && + #end if + #if str($method_condi.images.cytassist_image_condi.include_cytassist) == 'yes': + ln -s '$method_condi.images.cytassist_image_condi.cytassist_image' 'input/spatial/cytassist_image.tiff' && + #end if + + ## Microscope image (if provided, create microscope_image directory) + #if $method_condi.images.microscope_image: + mkdir -p 'input/microscope_image' && + ln -s '$method_condi.images.microscope_image' 'input/microscope_image/fullres_image.tiff' && + #end if + + echo "echoing the structure..." && + tree -L 3 input && + + ## XENIUM + #else if $method_condi.method == 'xenium': + mkdir -p 'input/region/morphology_focus/' 'output' && + ## ln -s does not work here. + #if str($method_condi.cell_boundaries) != '': + cp '$method_condi.cell_boundaries' 'input/region/cell_boundaries.parquet' && + #end if + cp '$method_condi.cell_feature_matrix' 'input/region/cell_feature_matrix.h5' && + cp '$method_condi.cells' 'input/region/cells.parquet' && + cp '$method_condi.cells_zarr' 'input/region/cells.zarr.zip' && + cp '$method_condi.experiment_xenium' 'input/region/experiment.xenium' && + #for $image in $method_condi.morphology_focus: + #if $image.element_identifier.endswith('.ome.tiff') or $image.element_identifier.endswith('.ome.tif'): + cp '$image' 'input/region/morphology_focus/${image.element_identifier}' && + #else: + cp '$image' 'input/region/morphology_focus/${image.element_identifier}.ome.tif' && + #end if + #end for + #if str($method_condi.nucleus_boundaries) != '': + cp '$method_condi.nucleus_boundaries' 'input/region/nucleus_boundaries.parquet' && + #end if + #if str($method_condi.transcripts) != '': + cp '$method_condi.transcripts' 'input/region/transcripts.parquet' && + #end if + #if str($method_condi.add_hne_condi.add_hne) == 'yes' or str($method_condi.add_hne_condi.add_hne) == 'yes_accurate': + cp '$method_condi.add_hne_condi.hne_image' 'input/region/he_image.ome.tif' && + #end if + #if str($method_condi.add_if_condi.add_if) == 'yes' or str($method_condi.add_if_condi.add_if) == 'yes_accurate': + cp '$method_condi.add_if_condi.if_image' 'input/region/if_image.ome.tif' && + #end if + #if str($method_condi.add_hne_condi.add_hne) == 'yes_accurate': + cp '$method_condi.add_hne_condi.image_alignment' 'input/region/he_image_alignment.csv' && + #end if + #if str($method_condi.add_if_condi.add_if) == 'yes_accurate': + cp '$method_condi.add_if_condi.image_alignment' 'input/region/if_image_alignment.csv' && + #end if + #end if + + ## run the pipeline + cat 'spdata_io.py' && + python3 'spdata_io.py' && + ## zip the output spatialdata folder + cd output && zip -r ../spatialdata.spatialdata.zip spatialdata/ && cd .. + ]]></command> + <configfiles> + <configfile name="spdata_config" filename="spdata_io.py"> +#if $method_condi.method == 'cosmx': +from spatialdata_io import cosmx +spdata = cosmx(path="./", + dataset_id="$method_condi.dataset_id", + transcripts=$method_condi.transcripts_bool, + ) + +#else if $method_condi.method == 'curio': +from spatialdata_io import curio +spdata = curio(path="./input" + ) + +#else if $method_condi.method == 'dbit': +from spatialdata_io import dbit +spdata = dbit(path="./", + anndata_path="${method_condi.dataset_id}_counts.h5ad", + barcode_position="${method_condi.dataset_id}_barcode_positions.tabular", + image_path="${method_condi.dataset_id}_tissue_lowres.png", + dataset_id="$method_condi.dataset_id", + border=$method_condi.border, + border_scale=$method_condi.border_scale, + ) + +#else if $method_condi.method == 'macsima': +from spatialdata_io import macsima +spdata = macsima(path="./input", + parsing_style="auto", + #if $method_condi.subset: + subset=$method_condi.subset, + #end if + #if $method_condi.subset_c: + subset_c=$method_condi.subset_c, + #end if + max_chunk_size=$method_condi.max_chunk_size, + c_chunks_size=$method_condi.c_chunks_size, + multiscale=$method_condi.multiscale_bool, + transformations=$method_condi.transformations_bool, + #if str($method_condi.scale_factors) != '': + #set scale_factors_list = [int(x.strip()) for x in str($method_condi.scale_factors).split(',')] + scale_factors=$scale_factors_list, + #end if + nuclei_channel_name="$method_condi.nuclei_channel_name", + #if str($method_condi.split_threshold_nuclei_channel) != '': + split_threshold_nuclei_channel=$method_condi.split_threshold_nuclei_channel, + #else: + split_threshold_nuclei_channel=None, + #end if + include_cycle_in_channel_name=$method_condi.include_cycle_in_channel_name_bool, + ) + +#else if $method_condi.method == 'merscope': +from spatialdata_io import merscope +spdata = merscope(path="./input/region", + vpt_outputs="./input/region/vpt_outputs", + #set z_layers_list = [int(x.strip()) for x in str($method_condi.z_layers).split(',')] + z_layers=$z_layers_list, + region_name="$method_condi.region_name", + slide_name="$method_condi.slide_name", + backend="rioxarray", + transcripts=$method_condi.transcripts_bool, + cells_boundaries=$method_condi.cells_boundaries_bool, + cells_table=$method_condi.cells_table_bool, + mosaic_images=$method_condi.mosaic_images_bool, + ) + +#else if $method_condi.method == 'visium': +from spatialdata_io import visium +spdata = visium(path="./input", + dataset_id="$method_condi.dataset_id", + #if $method_condi.matrix_bool: + counts_file='raw_feature_bc_matrix.h5', + #else: + counts_file='filtered_feature_bc_matrix.h5', + #end if + fullres_image_file='fullres_image.tif', + tissue_positions_file='tissue_positions_list.csv', + scalefactors_file='scalefactors_json.json', + var_names_make_unique=True, + ) + +#else if $method_condi.method == 'visium_hd': +from spatialdata_io import visium_hd +spdata = visium_hd(path="./input", + dataset_id="$method_condi.dataset_id", + #if $method_condi.matrix_bool: + filtered_counts_file=False, + #else: + filtered_counts_file=True, + #end if + #if str($method_condi.include_binned_condi.include_binned) == 'no': + load_segmentations_only=True, + #else: + load_segmentations_only=False, + #end if + #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': + load_nucleus_segmentations=True, + #else: + load_nucleus_segmentations=False, + #end if + bin_size=None, + bins_as_squares=$method_condi.bins_as_squares_bool, + annotate_table_by_labels=$method_condi.annotate_table_by_labels_bool, + #if $method_condi.images.microscope_image: + fullres_image_file="./input/microscope_image/fullres_image.tiff", + #else: + fullres_image_file=None, + #end if + #if str($method_condi.images.cytassist_image_condi.include_cytassist) == 'yes': + load_all_images=True, + #else: + load_all_images=False, + #end if + var_names_make_unique=$method_condi.var_names_make_unique_bool, + ) + +#else if $method_condi.method == 'xenium': +import os +from spatialdata_io import xenium +spdata = xenium(path="./input/region", + #if str($method_condi.cell_boundaries) != '': + cells_boundaries=True, + #else: + cells_boundaries=False, + #end if + #if str($method_condi.nucleus_boundaries) != '': + nucleus_boundaries=True, + #else: + nucleus_boundaries=False, + #end if + cells_as_circles=$method_condi.cells_as_circles_bool, + cells_labels=$method_condi.cells_labels_bool, + nucleus_labels=$method_condi.nucleus_labels_bool, + #if str($method_condi.transcripts) != '': + transcripts=True, + #else: + transcripts=False, + #end if + morphology_mip=$method_condi.morphology_mip_bool, + morphology_focus=$method_condi.morphology_focus_bool, + #if str($method_condi.add_hne_condi.add_hne) == 'yes' or str($method_condi.add_if_condi.add_if) == 'yes': + aligned_images=True, + #else: + aligned_images=False, + #end if + cells_table=$method_condi.cells_table_bool, + gex_only=$method_condi.gex_only_bool, + n_jobs=int(os.getenv("GALAXY_SLOTS")), + ) + +#if str($method_condi.add_if_condi.add_if) == 'yes_accurate': +from spatialdata_io import xenium_aligned_image +spdata["if_image"] = xenium_aligned_image( + image_path="./input/region/if_image.ome.tif", + alignment_file="./input/region/if_image_alignment.csv" +) +#else if str($method_condi.add_hne_condi.add_hne) == 'yes_accurate': +from spatialdata_io import xenium_aligned_image +spdata["he_image"] = xenium_aligned_image( + image_path="./input/region/he_image.ome.tif", + alignment_file="./input/region/he_image_alignment.csv" +) + +#end if +#end if + +print(spdata) +spdata.write("./output/spatialdata", overwrite=True) + </configfile> + </configfiles> + <inputs> + <conditional name="method_condi"> + <param name="method" type="select" label="Spatial Technology"> + <option value="cosmx">CosMx</option> + <option value="dbit">DBiT-seq</option> + <option value="macsima">MACSima</option> + <option value="merscope">MERSCOPE</option> + <option value="visium">10x Genomics Visium</option> + <option value="visium_hd">10x Genomics Visium HD</option> + <option value="xenium">10x Genomics Xenium</option> + </param> + <when value="cosmx"> + <param name="CellComposite" type="data" format="jpg,png,tiff" multiple="true" label="Cell Composite images"/> + <param name="CellLabels" type="data" format="tiff" multiple="true" label="Cell Labels images"/> + <param name="exprMat_file" type="data" format="csv" label="Expression matrix file"/> + <param name="fov_positions_file" type="data" format="csv" label="FOV positions file"/> + <param name="metadata_file" type="data" format="csv" label="Metadata file"/> + <param name="tx_file" type="data" format="csv" label="Transcripts file"/> + <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="It should match your input files name"> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <param name="transcripts_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load transcripts information?"/> + </when> + <when value="dbit"> + <param name="barcode_positions" type="data" format="tabular" label="Barcode positions file"/> + <param name="counts" type="data" format="h5ad" label="Counts file"/> + <param name="tissue_lowres" type="data" format="png" label="Tissue low resolution image"/> + <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="It should match your input files name"> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <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." /> + <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)"/> + </when> + <when value="macsima"> + <param name="tiff_files" type="data" format="tiff" multiple="true" label="MACSima TIFF images" help="OME-TIFF files from MACSima cyclic imaging experiment"/> + <param name="subset" type="integer" min="0" optional="true" label="Subset the image to the first ``subset`` pixels in x and y dimensions"/> + <param name="subset_c" type="integer" min="0" optional="true" label="Subset the image to the first ``c_subset`` channels"/> + <param name="max_chunk_size" type="integer" min="0" value="1024" label="Maximum chunk size for x and y dimension"/> + <param name="c_chunks_size" type="integer" min="0" value="1" label="Maximum chunk size for x and y dimension"/> + <param name="multiscale_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Create multiscale image?"/> + <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"/> + <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."/> + <param name="nuclei_channel_name" type="text" value="DAPI" label="Nuclei channel name"/> + <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.."/> + <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')"/> + </when> + <when value="merscope"> + <param name="slide_name" type="text" value="Galaxy" label="Dataset identifier" help="Prefix used to name the constructed SpatialData elements."> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <param name="region_name" type="text" value="region" label="Region name" help="Region name appended to the dataset identifier in the MERSCOPE output."> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <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)."> + <expand macro="sanitize_digits"/> + </param> + <param argument="--mosaic-images" type="data" format="tiff" multiple="true" label="MEROSCOPE tiff images"/> + <param name="input_micron_to_mosaic" type="data" format="csv" label="Micron to mosaic mapping file"/> + <param name="cell_by_gene" type="data" format="csv" label="Cell by gene table" help="Cells as rows and Genes as columns"/> + <param name="cell_meta" type="data" format="csv" label="Cell metadata table"/> + <param name="cells_boundaries" type="data" format="parquet" label="Cell boundaries (micron_space)"/> + <param name="transcripts" type="data" format="csv" label="Detected transcripts"/> + <param name="transcripts_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load transcripts information?"/> + <param name="cells_boundaries_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells boundaries?"/> + <param name="cells_table_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells table?"/> + <param name="mosaic_images_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load mosaic images?"/> + </when> + <when value="visium"> + <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier to name the constructed SpatialData elements"> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <param name="feature_bc_matrix" type="data" format="h5" label="feature BC matrix (Counts file)"/> + <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." /> + <param name="scalefactors_json" type="data" format="json" label="Scale factors file"/> + <param name="fullres_image_file" type="data" format="tiff" label="Full resolution image"/> + <param name="tissue_hires_image" type="data" format="png" label="Tissue high resolution image"/> + <param name="tissue_lowres_image" type="data" format="png" label="Tissue low resolution image"/> + <param name="tissue_positions_list" type="data" format="csv" label="Tissue positions file"/> + </when> + <when value="visium_hd"> + <param name="dataset_id" type="text" value="Galaxy" label="Dataset identifier" help="Name for the constructed SpatialData elements"> + <sanitizer invalid_char=""> + <valid initial="string.letters,string.digits"> + <add value="_" /> + </valid> + </sanitizer> + <validator type="regex">[0-9a-zA-Z_]+</validator> + </param> + <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."/> + <param name="feature_slice" type="data" format="h5" label="Feature slice file"/> + <conditional name="include_binned_condi"> + <param name="include_binned" type="select" label="Include binned data?"> + <option value="yes">Yes</option> + <option value="no">No</option> + </param> + <when value="no"/> + <when value="yes"> + <section name="bin008" title="Binned outputs 008"> + <param name="feature_bc_matrix_008" type="data" format="h5" optional="true" label="Feature BC matrix of bin 008"/> + <param name="tissue_positions_008" type="data" format="parquet" optional="true" label="Tissue positions of bin 008"/> + <param name="scalefactors_json_008" type="data" format="json" optional="true" label="Scale factors of bin 008"/> + </section> + <section name="bin016" title="Binned outputs 016"> + <param name="feature_bc_matrix_016" type="data" format="h5" optional="true" label="Feature BC matrix of bin 016"/> + <param name="tissue_positions_016" type="data" format="parquet" optional="true" label="Tissue positions of bin 016"/> + <param name="scalefactors_json_016" type="data" format="json" optional="true" label="Scale factors of bin 016"/> + </section> + <conditional name="include_nucleus_seg_condi"> + <param name="include_nucleus_seg" type="select" label="Include nucleus segmentation?"> + <option value="yes">Yes</option> + <option value="no">No</option> + </param> + <when value="no"> + <section name="bin002" title="Binned outputs 002"> + <param name="feature_bc_matrix_002" type="data" format="h5" optional="true" label="Feature BC matrix of bin 002"/> + <param name="tissue_positions_002" type="data" format="parquet" optional="true" label="Tissue positions of bin 002"/> + <param name="scalefactors_json_002" type="data" format="json" optional="true" label="Scale factors of bin 002"/> + </section> + </when> + <when value="yes"> + <section name="bin002" title="Binned outputs 002"> + <param name="feature_bc_matrix_002" type="data" format="h5" optional="false" label="Feature BC matrix of bin 002"/> + <param name="tissue_positions_002" type="data" format="parquet" optional="false" label="Tissue positions of bin 002"/> + <param name="scalefactors_json_002" type="data" format="json" optional="false" label="Scale factors of bin 002"/> + </section> + <param name="nucleus_segmentation" type="data" format="geojson" optional="false" label="Nucleus segmentation GeoJSON"/> + <param name="barcode_mappings" type="data" format="parquet" optional="false" label="Barcode mappings"/> + </when> + </conditional> + </when> + </conditional> + <conditional name="segmentation_conditional"> + <param name="enable_segmentation" type="select" label="Include segmentation data?"> + <option value="yes">Yes</option> + <option value="no">No</option> + </param> + <when value="no"/> + <when value="yes"> + <param name="feature_bc_matrix_seg" type="data" format="h5" optional="false" label="Feature BC matrix of cell segmentation"/> + <param name="cell_segmentation" type="data" format="geojson" optional="false" label="Cell segmentation GeoJSON"/> + <param name="scalefactors_json_seg" type="data" format="json" optional="false" label="Scale factors of cell segmentation"/> + </when> + </conditional> + <section name="images" title="Images"> + <param name="microscope_image" type="data" format="png,tiff,jpg" optional="true" label="Microscope image" help="Full-resolution microscope image (png/tiff/jpg)"/> + <param name="tissue_hires" type="data" format="png" optional="true" label="Tissue high-res image" help="tissue_hires_image.png"/> + <param name="tissue_lowres" type="data" format="png" optional="true" label="Tissue low-res image" help="tissue_lowres_image.png"/> + <conditional name="cytassist_image_condi"> + <param name="include_cytassist" type="select" label="Include CytAssist image?"> + <option value="yes">Yes</option> + <option value="no">No</option> + </param> + <when value="no"/> + <when value="yes"> + <param name="cytassist_image" type="data" format="tiff" optional="false" label="CytAssist image"/> + </when> + </conditional> + </section> + <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"/> + <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"/> + <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"/> + </when> + <when value="xenium"> + <param name="cell_feature_matrix" type="data" format="h5" label="Cell feature matrix"/> + <param name="cells" type="data" format="parquet" label="Cells metadata"/> + <param name="cells_zarr" type="data" format="zarr.zip" label="Cells zarr archive"/> + <param name="experiment_xenium" type="data" format="json" label="Experiment xenium file containing specifications"/> + <param name="morphology_focus" type="data" format="ome.tiff" multiple="true" label="Morphology focus images" help="Both MIP and Focus"/> + <param name="cell_boundaries" type="data" optional="true" format="parquet" label="Polygons of cell boundaries"/> + <param name="nucleus_boundaries" type="data" optional="true" format="parquet" label="Polygons of nucleus boundaries"/> + <param name="transcripts" type="data" optional="true" format="parquet" label="Transcripts"/> + <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"/> + <param name="cells_labels_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells labels?"/> + <param name="nucleus_labels_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load nucleus labels?"/> + <param name="morphology_mip_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load morphology MIP?"/> + <param name="morphology_focus_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load morphology focus?"/> + <param name="cells_table_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load cells annotation from AnnData?"/> + <param name="gex_only_bool" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Load gene expression only?"/> + <conditional name="add_hne_condi"> + <param name="add_hne" type="select" label="Add H&E image?"> + <option value="yes_accurate">Yes, with accurate alignment</option> + <option value="yes">Yes</option> + <option value="no" selected="true">No</option> + </param> + <when value="no"/> + <when value="yes_accurate"> + <param name="hne_image" type="data" format="ome.tiff" label="H&E image"/> + <param name="image_alignment" type="data" format="csv" label="Image alignment file"/> + </when> + <when value="yes"> + <param name="hne_image" type="data" format="ome.tiff" label="H&E image"/> + </when> + </conditional> + <conditional name="add_if_condi"> + <param name="add_if" type="select" label="Add IF image?"> + <option value="yes_accurate">Yes, with accurate alignment</option> + <option value="yes">Yes</option> + <option value="no" selected="true">No</option> + </param> + <when value="no"/> + <when value="yes_accurate"> + <param name="if_image" type="data" format="ome.tiff" label="IF image"/> + <param name="image_alignment" type="data" format="csv" label="Image alignment file"/> + </when> + <when value="yes"> + <param name="if_image" type="data" format="ome.tiff" label="IF image"/> + </when> + </conditional> + </when> + </conditional> + </inputs> + <outputs> + <data name="spatialdata_output" format="spatialdata.zip" from_work_dir="spatialdata.spatialdata.zip" label="${tool.name} on ${on_string}: spatialdata"/> + </outputs> + <tests> + <!-- test 1: io MERSCOPE full --> + <test> + <conditional name="method_condi"> + <param name="method" value="merscope"/> + <param name="slide_name" value="Test_MERSCOPE"/> + <param name="region_name" value="sample_region"/> + <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"/> + <param name="z_layers" value="3"/> + <param name="input_micron_to_mosaic" location="https://zenodo.org/records/18746346/files/merscope_micron_to_mosaic_pixel_transform.csv"/> + <param name="cell_by_gene" location="https://zenodo.org/records/18746346/files/merscope_cell_by_gene.csv"/> + <param name="cell_meta" location="https://zenodo.org/records/18746346/files/merscope_cell_metadata.csv"/> + <param name="cells_boundaries" location="https://zenodo.org/records/18746346/files/merscope_cellpose2_micron_space.parquet"/> + <param name="transcripts" location="https://zenodo.org/records/18746346/files/merscope_detected_transcripts.csv"/> + </conditional> + <assert_stdout> + <has_text text="z_layers=[3]"/> + <has_text text="'Test_MERSCOPE_sample_region_polygons': GeoDataFrame shape: (928, 9)"/> + <has_text text="'table': AnnData (928, 130)"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text=""label": "DAPI""/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 2: io COSMX full --> + <test> + <conditional name="method_condi"> + <param name="method" value="cosmx"/> + <param name="CellComposite" location="https://zenodo.org/records/18746346/files/cosmx_CellComposite_F001.jpg"/> + <param name="CellLabels" location="https://zenodo.org/records/18746346/files/cosmx_CellLabels_F001.tif"/> + <param name="exprMat_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_exprMat_file.csv"/> + <param name="fov_positions_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_fov_positions_file.csv"/> + <param name="metadata_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_metadata_file.csv"/> + <param name="tx_file" location="https://zenodo.org/records/18746346/files/cosmx_dummy_tx_file.csv"/> + <param name="dataset_id" value="cosmx_dummy"/> + <param name="transcripts_bool" value="True"/> + </conditional> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/1_image"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 3: io dbit full--> + <test> + <conditional name="method_condi"> + <param name="method" value="dbit"/> + <param name="barcode_positions" location="https://zenodo.org/records/18746346/files/dbit_barcode_positions.txt"/> + <param name="counts" location="https://zenodo.org/records/18746346/files/dbit_counts.h5ad"/> + <param name="tissue_lowres" location="https://zenodo.org/records/18746346/files/dbit_tissue_lowres.png"/> + </conditional> + <assert_stdout> + <has_text text="'Galaxy': GeoDataFrame shape: (500, 1) (2D shapes)"/> + <has_text text="'table': AnnData (500, 1000)"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/Galaxy_image"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 4: io macsima full--> + <test> + <conditional name="method_condi"> + <param name="method" value="macsima"/> + <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"/> + </conditional> + <assert_stdout> + <has_text text="'input_image': DataTree"/> + <has_text text="'input_table': AnnData (0, 5)"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/input_image"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 5: io VISIUM full --> + <test> + <conditional name="method_condi"> + <param name="method" value="visium"/> + <param name="dataset_id" value="Test_Visium"/> + <param name="feature_bc_matrix" location="https://zenodo.org/records/18746346/files/visium_CytAssist_FFPE_Protein_Expression_Human_Tonsil_filtered_feature_bc_matrix.h5"/> + <param name="matrix_bool" value="false"/> + <param name="scalefactors_json" location="https://zenodo.org/records/18746346/files/visium_scalefactors_json.json"/> + <param name="fullres_image_file" location="https://zenodo.org/records/18746346/files/visium_CytAssist_FFPE_Protein_Expression_Human_Tonsil_image.tif"/> + <param name="tissue_hires_image" location="https://zenodo.org/records/18746346/files/visium_tissue_hires_image.png"/> + <param name="tissue_lowres_image" location="https://zenodo.org/records/18746346/files/visium_tissue_lowres_image.png"/> + <param name="tissue_positions_list" location="https://zenodo.org/records/18746346/files/visium_tissue_positions.csv"/> + </conditional> + <assert_stdout> + <has_text text="'Test_Visium': GeoDataFrame shape: (4194, 2)"/> + <has_text text="'table': AnnData (4194, 18085)"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/Test_Visium_full_image"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 6: io Visium HD full --> + <test> + <conditional name="method_condi"> + <param name="method" value="visium_hd"/> + <param name="dataset_id" value="Test_VisiumHD"/> + <param name="matrix_bool" value="false"/> + <param name="feature_slice" location="https://zenodo.org/records/18746346/files/visiumhd_feature_slice.h5"/> + <conditional name="include_binned_condi"> + <param name="include_binned" value="yes"/> + <section name="bin008"> + <param name="feature_bc_matrix_008" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_008.h5"/> + <param name="tissue_positions_008" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_008.parquet"/> + <param name="scalefactors_json_008" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_008.json"/> + </section> + <section name="bin016"> + <param name="feature_bc_matrix_016" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_016.h5"/> + <param name="tissue_positions_016" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_016.parquet"/> + <param name="scalefactors_json_016" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_016.json"/> + </section> + <conditional name="include_nucleus_seg_condi"> + <param name="include_nucleus_seg" value="yes"/> + <section name="bin002"> + <param name="feature_bc_matrix_002" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_bc_matrix_002.h5"/> + <param name="tissue_positions_002" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_positions_002.parquet"/> + <param name="scalefactors_json_002" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_002.json"/> + </section> + <param name="nucleus_segmentation" location="https://zenodo.org/records/18746346/files/visiumhd_nucleus_segmentations.geojson"/> + <param name="barcode_mappings" location="https://zenodo.org/records/18746346/files/visiumhd_barcode_mappings.parquet"/> + </conditional> + </conditional> + <conditional name="segmentation_conditional"> + <param name="enable_segmentation" value="yes"/> + <param name="feature_bc_matrix_seg" location="https://zenodo.org/records/18746346/files/visiumhd_filtered_feature_cell_matrix_seg.h5"/> + <param name="cell_segmentation" location="https://zenodo.org/records/18746346/files/visiumhd_cell_segmentations.geojson"/> + <param name="scalefactors_json_seg" location="https://zenodo.org/records/18746346/files/visiumhd_scalefactors_json_seg.json"/> + </conditional> + <section name="images"> + <param name="tissue_hires" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_hires_image.png"/> + <param name="tissue_lowres" location="https://zenodo.org/records/18746346/files/visiumhd_tissue_lowres_image.png"/> + <conditional name="cytassist_image_condi"> + <param name="include_cytassist" value="yes"/> + <param name="cytassist_image" location="https://zenodo.org/records/18746346/files/visiumhd_cytassist_image.tiff"/> + </conditional> + </section> + <param name="bins_as_squares_bool" value="true"/> + <param name="annotate_table_by_labels_bool" value="false"/> + <param name="var_names_make_unique_bool" value="true"/> + </conditional> + <assert_stdout> + <has_text text="'Test_VisiumHD"/> + <has_text text="Tables"/> + <has_text text="'cell_segmentations': AnnData"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 7: io XENIUM full --> + <test> + <conditional name="method_condi"> + <param name="method" value="xenium"/> + <param name="cell_feature_matrix" location="https://zenodo.org/records/18746346/files/xenium_cell_feature_matrix.h5"/> + <param name="cells" location="https://zenodo.org/records/18746346/files/xenium_cells.parquet"/> + <param name="cells_zarr" location="https://zenodo.org/records/18746346/files/xenium_cells.zarr.zip"/> + <param name="experiment_xenium" location="https://zenodo.org/records/18746346/files/xenium_experiment.xenium"/> + <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"/> + <param name="cell_boundaries" location="https://zenodo.org/records/18746346/files/xenium_cell_boundaries.parquet"/> + <param name="nucleus_boundaries" location="https://zenodo.org/records/18746346/files/xenium_nucleus_boundaries.parquet"/> + <param name="transcripts" location="https://zenodo.org/records/18746346/files/xenium_transcripts.parquet"/> + <conditional name="add_hne_condi"> + <param name="add_hne" value="yes"/> + <param name="hne_image" location="https://zenodo.org/records/18746346/files/xenium_he_image.ome.tif"/> + </conditional> + </conditional> + <assert_stdout> + <has_text text="'cell_labels': DataTree"/> + <has_text text="'table': AnnData (358, 405)"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/morphology_focus"/> + </has_archive_member> + </assert_contents> + </output> + </test> + <!-- test 8: io XENIUM full accurate--> + <test> + <conditional name="method_condi"> + <param name="method" value="xenium"/> + <param name="cell_feature_matrix" location="https://zenodo.org/records/18746346/files/xenium_cell_feature_matrix.h5"/> + <param name="cells" location="https://zenodo.org/records/18746346/files/xenium_cells.parquet"/> + <param name="cells_zarr" location="https://zenodo.org/records/18746346/files/xenium_cells.zarr.zip"/> + <param name="experiment_xenium" location="https://zenodo.org/records/18746346/files/xenium_experiment.xenium"/> + <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"/> + <param name="cell_boundaries" location="https://zenodo.org/records/18746346/files/xenium_cell_boundaries.parquet"/> + <param name="nucleus_boundaries" location="https://zenodo.org/records/18746346/files/xenium_nucleus_boundaries.parquet"/> + <param name="transcripts" location="https://zenodo.org/records/18746346/files/xenium_transcripts.parquet"/> + <conditional name="add_hne_condi"> + <param name="add_hne" value="yes_accurate"/> + <param name="hne_image" location="https://zenodo.org/records/18746346/files/xenium_he_image.ome.tif"/> + <param name="image_alignment" location="https://zenodo.org/records/18746346/files/xenium_he_image_alignment.csv"/> + </conditional> + </conditional> + <assert_stdout> + <has_text text="'cell_labels': DataTree"/> + <has_text text="'table': AnnData (358, 405)"/> + <has_text text="xenium_aligned_image"/> + </assert_stdout> + <output name="spatialdata_output"> + <assert_contents> + <has_archive_member path="spatialdata/zarr.json"> + <has_text text=""zarr_format": 3"/> + <has_text text="images/morphology_focus"/> + </has_archive_member> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +**What it does** + +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. + +----- + +**Supported Technologies** + +- **10x Genomics Visium**: Standard Visium spatial gene expression data +- **10x Genomics Visium HD**: High-definition Visium with multiple bin sizes and segmentation data +- **10x Genomics Xenium**: In situ spatial transcriptomics with subcellular resolution +- **CosMx SMI (Nanostring)**: Spatial molecular imaging platform +- **MERSCOPE (Vizgen)**: Multiplexed error-robust fluorescence in situ hybridization +- **MACSima (Miltenyi)**: Multiplexed antibody-based imaging for cyclic staining +- **DBiT-seq**: Deterministic Barcoding in Tissue for spatial omics + +----- + +**Output** + +The tool produces a SpatialData object saved as a compressed Zarr archive (.spatialdata.zip). This archive contains: + +- **Images**: H&E, staining images +- **Labels**: Pixel-level segmentation +- **Shapes**: Cell/nucleus boundaries, subcellular structures, anatomical annotations, regions of interest (ROIs) +- **Points**: Transcripts locations with gene information, landmarks points +- **Tables**: AnnData objects with gene expression matrices and metadata + +The SpatialData format enables downstream analysis with tools like squidpy, spatialdata-plot, and napari for interactive visualization. + +----- + +**More Information** + +- `SpatialData documentation <https://spatialdata.scverse.org/projects/io/en/stable/>`__ + + + ]]></help> + <expand macro="citations" /> +</tool> \ No newline at end of file
