Mercurial > repos > goeckslab > squidpy_spatial
comparison squidpy_spatial.xml @ 0:5b17a47d1ade draft
planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy commit 721eaced787aa3b04d96ad91f6b4540f26b23949
author | goeckslab |
---|---|
date | Thu, 11 Jul 2024 22:22:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:5b17a47d1ade |
---|---|
1 <tool id="squidpy_spatial" name="Analyze and visualize spatial multi-omics data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
2 <description>with Squidpy</description> | |
3 <macros> | |
4 <import>main_macros.xml</import> | |
5 </macros> | |
6 <edam_operations> | |
7 <edam_operation>operation_3443</edam_operation> | |
8 </edam_operations> | |
9 <expand macro="squidpy_requirements"/> | |
10 <expand macro="macro_stdio" /> | |
11 <version_command>echo "@TOOL_VERSION@"</version_command> | |
12 <command detect_errors="aggressive"> | |
13 <![CDATA[ | |
14 export TQDM_DISABLE=True && | |
15 python '$__tool_directory__/squidpy_spatial.py' | |
16 --inputs '$inputs' | |
17 --anndata '$anndata' | |
18 --output '$output' | |
19 #if $analyses.selected_tool in ['nhood_enrichment', 'centrality_scores', 'interaction_matrix', 'ligrec', 'ripley', 'co_occurrence']: | |
20 --output_plot image.png | |
21 #end if | |
22 ]]> | |
23 </command> | |
24 <configfiles> | |
25 <inputs name="inputs" data_style="paths"/> | |
26 </configfiles> | |
27 <inputs> | |
28 <param name="anndata" type="data" format="h5ad" label="Select the input anndata" /> | |
29 <conditional name="analyses"> | |
30 <param name="selected_tool" type="select" label="Select an analysis"> | |
31 <option value="spatial_neighbors" selected="true">Spatial neighbors -- Create a graph from spatial coordinates</option> | |
32 <option value="nhood_enrichment">nhood_enrichment -- Compute neighborhood enrichment by permutation test.</option> | |
33 <option value="co_occurrence" >co_occurrence -- Compute co-occurrence probability of clusters</option> | |
34 <option value="centrality_scores">centrality_scores -- Compute centrality scores per cluster or cell type</option> | |
35 <option value="interaction_matrix">interaction_matrix -- Compute interaction matrix for clusters</option> | |
36 <option value="ripley">ripley -- Calculate various Ripley’s statistics for point processes</option> | |
37 <option value="ligrec">ligrec -- Perform the permutation test as described in [Efremova et al., 2020]</option> | |
38 <option value="spatial_autocorr">spatial_autocorr -- Calculate Global Autocorrelation Statistic (Moran’s I or Geary’s C)</option> | |
39 <option value="sepal">sepal -- Identify spatially variable genes with Sepal</option> | |
40 </param> | |
41 <when value="spatial_neighbors"> | |
42 <expand macro="squidpy_spatial_options"> | |
43 <param argument="spatial_key" type="text" value="spatial" optional="false" label="The Key where spatial coordinates are stored" help="Key in `anndata.AnnData.obsm`." /> | |
44 <param argument="coord_type" type="select" label="Type of coordinate system"> | |
45 <option value="grid" selected="true">grid</option> | |
46 <option value="generic">generic</option> | |
47 <option value="none">None - use `grid` when `spatial_key` is in `anndata.AnnData.uns with `n_neighs` = 6 (Visium), otherwise `generic`</option> | |
48 </param> | |
49 <param argument="n_neighs" type="integer" value="6" label="Number of neighboring tiles" help="When the `coord_type` is generic, this's number of neighborhoods for non-grid data and only used when `delaunay` is False." /> | |
50 <param argument="radius" type="text" value="" optional="true" label="Radius" help="Only available when coord_type = 'generic'. If float, this is the neighborhood radius to compute the graph; if tuple, this is edge range [min(radius), max(radius)] used prune the final graph." /> | |
51 <param argument="delaunay" type="boolean" checked="false" optional="true" label="Whether to compute the graph from Delaunay triangulation" help="Only used when coord_type = 'generic'." /> | |
52 <param argument="n_rings" type="integer" value="1" label="Number of rings of neighbors for grid data" help="Only used when coord_type = 'grid'." /> | |
53 <param argument="transform" type="select" label="Type of adjacency matrix transform"> | |
54 <option value="none" selected="true">None</option> | |
55 <option value="spectral">spectral</option> | |
56 <option value="cosine">cosine</option> | |
57 </param> | |
58 <param argument="set_diag" type="boolean" checked="false" label="Whether to set the diagonal of the spatial connectivities to 1.0" /> | |
59 <param argument="key_added" type="text" value="spatial" label="The column name used in anndata to store the returned data" /> | |
60 </expand> | |
61 </when> | |
62 <when value="nhood_enrichment"> | |
63 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
64 <expand macro="squidpy_spatial_options"> | |
65 <param argument="connectivity_key" type="text" value="" optional="true" label="Key in anndata.AnnData.obsp where spatial connectivities are stored" /> | |
66 <param argument="n_perms" type="integer" value="1000" label="Number of permutations for the permutation test" /> | |
67 <param argument="seed" type="integer" value="" optional="true" label="Randomness seed" /> | |
68 </expand> | |
69 <expand macro="squidpy_plotting_options_more"> | |
70 <param argument="mode" type="select" label="Choose one result from gr.nhood_enrichment to plot"> | |
71 <option value="zscore" selected="true">zscore</option> | |
72 <option value="count">count</option> | |
73 </param> | |
74 </expand> | |
75 </when> | |
76 <when value="co_occurrence"> | |
77 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
78 <expand macro="squidpy_spatial_options"> | |
79 <param argument="spatial_key" type="text" value="spatial" optional="false" label="The Key where spatial coordinates are stored" help="Key in `anndata.AnnData.obsm`." /> | |
80 <param argument="interval" type="integer" value="50" label="Number of distance thresholds at which co-occurrence is computed" /> | |
81 <param argument="n_splits" type="integer" value="" optional="true" label="Number of splits in which to divide the spatial coordinates" help="In anndata.AnnData.obsm ['{spatial_key}']." /> | |
82 </expand> | |
83 <expand macro="squidpy_plotting_options"> | |
84 <expand macro="squidpy_plotting_option_palette" /> | |
85 </expand> | |
86 </when> | |
87 <when value="centrality_scores"> | |
88 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
89 <expand macro="squidpy_spatial_options"> | |
90 <param argument="score" type="select" label="Centrality measures as described in networkx.algorithms.centrality" help="Refer to [Hagberg et al., 2008]." > | |
91 <option value="none" selected="true">None</option> | |
92 <option value="closeness_centrality">closeness_centrality -- measure of how close the group is to other nodes</option> | |
93 <option value="average_clustering">average_clustering -- measure of the degree to which nodes cluster together</option> | |
94 <option value="degree_centrality">degree_centrality -- fraction of non-group members connected to group members</option> | |
95 </param> | |
96 <param argument="connectivity_key" type="text" value="" optional="true" label="Key in anndata.AnnData.obsp where spatial connectivities are stored" /> | |
97 </expand> | |
98 <expand macro="squidpy_plotting_options"> | |
99 <param argument="score" type="text" value="" optional="true" label="The scores to plot" help="Comma delimited for multiple. If None, plot all scores." /> | |
100 <expand macro="squidpy_plotting_option_palette" /> | |
101 </expand> | |
102 </when> | |
103 <when value="interaction_matrix"> | |
104 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
105 <expand macro="squidpy_spatial_options"> | |
106 <param argument="connectivity_key" type="text" value="" optional="true" label="Key in anndata.AnnData.obsp where spatial connectivities are stored" /> | |
107 <param argument="normalized" type="boolean" checked="false" label="Whether to normalize the sum of each row to 1" /> | |
108 <param argument="weights" type="boolean" checked="false" label="Whether to use edge weights or binarize" /> | |
109 </expand> | |
110 <expand macro="squidpy_plotting_options_more"/> | |
111 </when> | |
112 <when value="ripley"> | |
113 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
114 <expand macro="squidpy_spatial_options"> | |
115 <param argument="mode" type="select" label="Which Ripley’s statistic to compute"> | |
116 <option value="F" selected="true">F</option> | |
117 <option value="G">G</option> | |
118 <option value="L">L</option> | |
119 </param> | |
120 <param argument="spatial_key" type="text" value="spatial" optional="false" label="The Key where spatial coordinates are stored" help="Key in `anndata.AnnData.obsm`." /> | |
121 <param argument="metric" type="select" label="Which metric to use for computing distances" help="Refer to `sklearn.neighbors.DistanceMetric`." > | |
122 <option value="euclidean" selected="true">euclidean</option> | |
123 <option value="manhattan">manhattan</option> | |
124 <option value="chebyshev">chebyshev</option> | |
125 <option value="minkowski">minkowski</option> | |
126 <option value="wminkowski">wminkowski</option> | |
127 <option value="seuclidean">seuclidean</option> | |
128 <option value="mahalanobis">mahalanobis</option> | |
129 <option value="haversine">haversine</option> | |
130 <option value="hamming">hamming</option> | |
131 <option value="canberra">canberra</option> | |
132 <option value="braycurtis">braycurtis</option> | |
133 </param> | |
134 <param argument="n_neigh" type="integer" value="2" label="Number of neighbors to consider for the KNN graph" /> | |
135 <param argument="n_simulations" type="integer" value="100" label="Number of simulations to run for computing p-values" /> | |
136 <param argument="n_observations" type="integer" value="1000" label="Number of observations to generate for the Spatial Poisson Point Process" /> | |
137 <param argument="max_dist" type="float" value="" optional="true" label="Maximum distances for the support" help="If None, max_dist is the square root of area/2."/> | |
138 <param argument="n_steps" type="integer" value="50" label="Number of steps for the support" /> | |
139 <param argument="seed" type="integer" value="" optional="true" label="Randomness seed" /> | |
140 </expand> | |
141 <expand macro="squidpy_plotting_options"> | |
142 <param argument="mode" type="select" label="Ripley’s statistics to be plotted"> | |
143 <option value="F" selected="true">F</option> | |
144 <option value="G">G</option> | |
145 <option value="L">L</option> | |
146 </param> | |
147 <param argument="plot_sims" type="boolean" checked="true" label="Whether to overlay simulations in the plot" /> | |
148 <expand macro="squidpy_plotting_option_palette" /> | |
149 </expand> | |
150 </when> | |
151 <when value="ligrec"> | |
152 <param argument="cluster_key" type="text" value="" optional="false" label="Key in anndata.AnnData.obs where clustering is stored" /> | |
153 <expand macro="squidpy_spatial_options"> | |
154 <param argument="use_raw" type="boolean" checked="true" label="Whether to access anndata.AnnData.raw" /> | |
155 <param argument="interactions" type="data" format="tabular" optional="true" label="Select the dataset containing interaction to test" help="Must contain at least 2 columns named ‘source’ and ‘target’. Can be null, a condition under which the interactions are extracted from omnipath." /> | |
156 <param argument="complex_policy" type="select" label="Policy on how to handle complexes"> | |
157 <option value="min" selected="true">min -- select gene with the minimum average expression</option> | |
158 <option value="all">all -- select all possible combinations between ‘source’ and ‘target’ complexes</option> | |
159 </param> | |
160 <param argument="n_perms" type="integer" value="" optional="true" label="Number of permutations for the permutation test." /> | |
161 <param argument="threshold" type="float" value="0.01" label="Do not perform permutation test if any of the interacting components is being expressed in less than threshold percent of cells within a given cluster" /> | |
162 <param argument="corr_method" type="select" label="Correction method for multiple testing"> | |
163 <option value="none" selected="true">None</option> | |
164 <option value="bonferroni">bonferroni</option> | |
165 <option value="sidak">sidak</option> | |
166 <option value="holm-sidak">holm-sidak</option> | |
167 <option value="holm">holm</option> | |
168 <option value="simes-hochberg">simes-hochberg</option> | |
169 <option value="hommel">hommel</option> | |
170 <option value="fdr_bh">fdr_bh</option> | |
171 <option value="fdr_by">fdr_by</option> | |
172 <option value="fdr_tsbh">fdr_tsbh</option> | |
173 <option value="fdr_tsbky">fdr_tsbky</option> | |
174 </param> | |
175 <param argument="corr_axis" type="select" label="Axis over which to perform the FDR correction" help="Only used when corr_method != None."> | |
176 <option value="clusters" selected="true">clusters -- correct clusters by performing FDR correction across the interactions</option> | |
177 <option value="interactions">interactions -- correct interactions by performing FDR correction across the clusters</option> | |
178 </param> | |
179 <param argument="key_added" type="text" value="" optional="true" label="Key in anndata to store the result" help="In `anndata.AnnData.uns`. If None, '{cluster_key}_ligrec' will be used." /> | |
180 <param argument="gene_symbols" type="text" value="" optional="true" label="Key in anndata.AnnData.var to use instead of anndata.AnnData.var_names" help="Optional." /> | |
181 <param argument="seed" type="integer" value="" label="Randomness seed" /> | |
182 </expand> | |
183 <expand macro="squidpy_plotting_options"> | |
184 <param argument="source_groups" type="text" value="" optional="true" label="Source interaction clusters" help="Comma delimited. If None, select all clusters." /> | |
185 <param argument="target_groups" type="text" value="" optional="true" label="Target interaction clusters" help="Comma delimited. If None, select all clusters." /> | |
186 <param argument="means_range" type="text" value="(-inf, inf)" label="Only show interactions whose means are within this closed interval" help="Tuple of floats. e.g.: (-10, 10)." /> | |
187 <param argument="pvalue_threshold" type="float" value="1.0" label="Only show interactions with p-value less than this threshold" /> | |
188 <param argument="remove_empty_interactions" type="boolean" checked="true" label="Whether to remove rows and columns that only contain interactions with NaN values?" /> | |
189 <param argument="remove_nonsig_interactions" type="boolean" checked="false" label="Whether to remove rows and columns that only contain interactions that are larger than `alpha`? " /> | |
190 <param argument="dendrogram" type="select" label="How to cluster based on the p-values?"> | |
191 <option value="none" selected="true">None</option> | |
192 <option value="interacting_molecules">interacting_molecules</option> | |
193 <option value="interacting_clusters">interacting_clusters</option> | |
194 <option value="both">both</option> | |
195 </param> | |
196 <param argument="alpha" type="float" value="0.001" label="Significance threshold" help="All elements with p-values less than alpha will be marked by tori instead of dots." /> | |
197 <param argument="swap_axes" type="boolean" checked="false" label="Whether to show the cluster combinations as rows and the interacting pairs as columns" /> | |
198 </expand> | |
199 </when> | |
200 <when value="spatial_autocorr"> | |
201 <expand macro="squidpy_spatial_options"> | |
202 <param argument="connectivity_key" type="text" value="spatial_connectivities" label="Key in anndata.AnnData.obsp where spatial connectivities are stored" /> | |
203 <param argument="genes" type="text" value="" optional="true" label="List of gene names, as stored in anndata.AnnData.var_names" help="Comma delitimited. Used to compute global spatial autocorrelation statistic. If None, it’s computed anndata.AnnData.var ['highly_variable']." /> | |
204 <param argument="mode" type="select"> | |
205 <option value="moran" selected="true">moran</option> | |
206 <option value="geary">geary</option> | |
207 </param> | |
208 <param argument="transformation" type="boolean" checked="true" label="Whether to perform row-normalization on weights in anndata.AnnData.obsp ['spatial_connectivities']" /> | |
209 <param argument="n_perms" type="integer" value="" optional="true" label="Number of permutations for the permutation test." help="If None, only p-values under normality assumption are computed"/> | |
210 <param argument="two_tailed" type="boolean" checked="false" label="Are the p-values two-tailed?" help="One-tailed, if False." /> | |
211 <param argument="corr_method" type="select" label="Correction method for multiple testing"> | |
212 <option value="none" selected="true">None</option> | |
213 <option value="bonferroni">bonferroni</option> | |
214 <option value="sidak">sidak</option> | |
215 <option value="holm-sidak">holm-sidak</option> | |
216 <option value="holm">holm</option> | |
217 <option value="simes-hochberg">simes-hochberg</option> | |
218 <option value="hommel">hommel</option> | |
219 <option value="fdr_bh">fdr_bh</option> | |
220 <option value="fdr_by">fdr_by</option> | |
221 <option value="fdr_tsbh">fdr_tsbh</option> | |
222 <option value="fdr_tsbky">fdr_tsbky</option> | |
223 </param> | |
224 <param argument="layer" type="text" value="" optional="true" label="Layer in anndata.AnnData.layers to use" help="If None, use anndata.AnnData.X." /> | |
225 <param argument="seed" type="integer" value="" optional="true" label="Randomness seed" /> | |
226 </expand> | |
227 </when> | |
228 <when value="sepal"> | |
229 <expand macro="squidpy_spatial_options"> | |
230 <param argument="max_neighs" type="select" label="Maximum number of neighbors of a node in the graph"> | |
231 <option value="4" selected="true">4 -- for a square-grid (ST, Dbit-seq)</option> | |
232 <option value="6">6 -- for a hexagonal-grid (Visium)</option> | |
233 </param> | |
234 <param argument="genes" type="text" value="" optional="true" label="List of gene names, as stored in anndata.AnnData.var_names" help="Comma delitimited. Used to compute global spatial autocorrelation statistic. If None, it’s computed anndata.AnnData.var ['highly_variable']." /> | |
235 <param argument="n_iter" type="integer" value="30000" optional="true" label="Maximum number of iterations for the diffusion simulation" /> | |
236 <param argument="dt" type="float" value="0.001" label="Time step in diffusion simulation" /> | |
237 <param argument="thresh" type="float" value="1e-8" label="Entropy threshold for convergence of diffusion simulation" /> | |
238 <param argument="spatial_key" type="text" value="spatial" optional="false" label="The Key where spatial coordinates are stored" help="Key in `anndata.AnnData.obsm`." /> | |
239 <param argument="connectivity_key" type="text" value="spatial_connectivities" label="Key in anndata.AnnData.obsp where spatial connectivities are stored" /> | |
240 <param argument="layer" type="text" value="" optional="true" label="Layer in anndata.AnnData.layers to use" help="If None, use anndata.AnnData.X." /> | |
241 <param argument="use_raw" type="boolean" checked="true" label="Whether to access anndata.AnnData.raw" /> | |
242 </expand> | |
243 </when> | |
244 </conditional> | |
245 </inputs> | |
246 <outputs> | |
247 <data format="h5ad" name="output" label="Squidpy.gr.${analyses.selected_tool} on ${on_string}" /> | |
248 <data from_work_dir="figures/image.png" format="png" name="output_plot" label="Squidpy.pl.${analyses.selected_tool} on ${on_string}" > | |
249 <filter>analyses['selected_tool'] in ['nhood_enrichment', 'centrality_scores', 'interaction_matrix', 'ligrec', 'ripley', 'co_occurrence']</filter> | |
250 </data> | |
251 </outputs> | |
252 <tests> | |
253 <test expect_num_outputs="1"> | |
254 <param name="anndata" value="imc.h5ad" ftype="h5ad" /> | |
255 <param name="selected_tool" value="spatial_neighbors" /> | |
256 <output name="output"> | |
257 <assert_contents> | |
258 <has_h5_keys keys="uns/spatial_neighbors" /> | |
259 </assert_contents> | |
260 </output> | |
261 </test> | |
262 <test expect_num_outputs="2"> | |
263 <param name="anndata" value="imc_sn.h5ad" ftype="h5ad" /> | |
264 <param name="selected_tool" value="nhood_enrichment" /> | |
265 <param name="cluster_key" value="cell type" /> | |
266 <output name="output"> | |
267 <assert_contents> | |
268 <has_h5_keys keys="uns/cell type_nhood_enrichment" /> | |
269 </assert_contents> | |
270 </output> | |
271 <output name="output_plot" file="imc_nhood_enrichment.png" compare="sim_size" delta="2000" /> | |
272 </test> | |
273 <test expect_num_outputs="2"> | |
274 <param name="anndata" value="imc_sn.h5ad" ftype="h5ad" /> | |
275 <param name="selected_tool" value="co_occurrence" /> | |
276 <param name="cluster_key" value="cell type" /> | |
277 <output name="output"> | |
278 <assert_contents> | |
279 <has_h5_keys keys="uns/cell type_co_occurrence" /> | |
280 </assert_contents> | |
281 </output> | |
282 <output name="output_plot" file="imc_co_occurrence.png" compare="sim_size" delta="2000" /> | |
283 </test> | |
284 <test expect_num_outputs="2"> | |
285 <param name="anndata" value="imc_sn.h5ad" ftype="h5ad" /> | |
286 <param name="selected_tool" value="centrality_scores" /> | |
287 <param name="cluster_key" value="cell type" /> | |
288 <output name="output"> | |
289 <assert_contents> | |
290 <has_h5_keys keys="uns/cell type_centrality_scores" /> | |
291 </assert_contents> | |
292 </output> | |
293 <output name="output_plot" file="imc_centrality_scores.png" compare="sim_size" delta="2000" /> | |
294 </test> | |
295 <test expect_num_outputs="2"> | |
296 <param name="anndata" value="imc_sn.h5ad" ftype="h5ad" /> | |
297 <param name="selected_tool" value="interaction_matrix" /> | |
298 <param name="cluster_key" value="cell type" /> | |
299 <output name="output"> | |
300 <assert_contents> | |
301 <has_h5_keys keys="uns/cell type_interactions" /> | |
302 </assert_contents> | |
303 </output> | |
304 <output name="output_plot" file="imc_interaction_matrix.png" compare="sim_size" delta="2000" /> | |
305 </test> | |
306 <test expect_num_outputs="2"> | |
307 <param name="anndata" value="imc_sn.h5ad" ftype="h5ad" /> | |
308 <param name="selected_tool" value="ripley" /> | |
309 <param name="cluster_key" value="cell type" /> | |
310 <output name="output"> | |
311 <assert_contents> | |
312 <has_h5_keys keys="uns/cell type_ripley_F" /> | |
313 </assert_contents> | |
314 </output> | |
315 <output name="output_plot" file="imc_ripley.png" compare="sim_size" delta="2000" /> | |
316 </test> | |
317 </tests> | |
318 <help> | |
319 <![CDATA[ | |
320 **What it does** | |
321 | |
322 This tool includes various of single cell spatial analysis utils provided by Squidpy. | |
323 | |
324 **Input** | |
325 | |
326 *AnnData* | |
327 | |
328 **Output** | |
329 | |
330 *Anndata* | |
331 | |
332 *Plotting (PNG) if applicable* | |
333 | |
334 | |
335 ]]> | |
336 </help> | |
337 <expand macro="citations" /> | |
338 </tool> |