comparison macros.xml @ 0:4341b8ff2a46 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seurat_v5 commit a9214c07b0cc929a51fd92a369bb89c675b6c88d
author iuc
date Wed, 11 Sep 2024 10:20:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4341b8ff2a46
1 <macros>
2 <token name="@TOOL_VERSION@">5.0</token>
3 <token name="@VERSION_SUFFIX@">0</token>
4 <token name="@PROFILE@">23.0</token>
5 <xml name="requirements">
6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">r-seurat</requirement>
8 <requirement type="package" version="1.2.1">fit-sne</requirement>
9 <requirement type="package" version="3.58.1">bioconductor-limma</requirement>
10 <requirement type="package" version="1.28.0">bioconductor-mast</requirement>
11 <requirement type="package" version="1.42.0">bioconductor-deseq2</requirement>
12 <requirement type="package" version="2.1.3">r-svglite</requirement>
13 <requirement type="package" version="1.1">r-metap</requirement>
14 <requirement type="package" version="1.14.0">bioconductor-glmGamPoi</requirement>
15 <requirement type="package" version="0.5.3">umap-learn</requirement> <!-- https://github.com/satijalab/seurat/issues/8283 -->
16 <requirement type="package" version="0.10.2">leidenalg</requirement>
17 <requirement type="package" version="1.2.0">r-harmony</requirement>
18 <requirement type="package" version="1.18.0">bioconductor-batchelor</requirement>
19 <requirement type="package" version="2.0.0">numpy</requirement>
20 <requirement type="package" version="2.2.2">pandas</requirement>
21 </requirements>
22 </xml>
23 <xml name="citations">
24 <citations>
25 <citation type="doi">10.1038/s41587-023-01767-y</citation>
26 </citations>
27 </xml>
28 <xml name="sanitize_query" token_validinitial="string.printable">
29 <sanitizer>
30 <valid initial="@VALIDINITIAL@">
31 <remove value="&apos;" />
32 </valid>
33 </sanitizer>
34 </xml>
35 <xml name="sanitize_vectors" token_validinitial="string.digits">
36 <sanitizer>
37 <valid initial="@VALIDINITIAL@">
38 <add value=","/>
39 </valid>
40 </sanitizer>
41 </xml>
42 <xml name="version_command">
43 <version_command><![CDATA[
44 echo $(R --version | grep version | grep -v GNU)", Seurat version" $(R --vanilla --slave -e "library(Seurat); cat(sessionInfo()\$otherPkgs\$DESeq2\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
45 ]]></version_command>
46 </xml>
47
48 <token name="@CMD_imports@"><![CDATA[
49 library(Seurat)
50 ]]>
51 </token>
52 <token name="@reticulate_hack@"><![CDATA[
53 library(reticulate)
54 ## HACK: CI biocontainers do not contain a useable conda binary, just the env.
55 ## see: https://github.com/galaxyproject/tools-iuc/issues/5585#issuecomment-1803773923
56 is_biocontainer = grepl("^# cmd: /opt/conda/bin/",
57 paste0(reticulate:::python_info_condaenv_find("/usr/local/"),
58 "-none"))
59 if (is_biocontainer) {
60 ## conda detection false positive
61 assignInNamespace("is_conda_python", function(x) FALSE, ns="reticulate")
62 use_python("/usr/local/bin/python")
63 } else {
64 conda_path = Sys.getenv("CONDA_PREFIX")
65 if (conda_path != "") {
66 ## Active conda env found
67 use_python(file.path(conda_path, "bin", "python3"))
68 } else {
69 ## Not biocontainer or conda, assume system python
70 use_python("/usr/bin/python3")
71 }
72 }]]>
73 </token>
74 <xml name="input_rds">
75 <param name="seurat_rds" type="data" format="rds" label="Input file with the Seurat object"/>
76 </xml>
77 <token name="@CMD_read_inputs@"><![CDATA[
78 seurat_obj = readRDS('seurat.rds')
79 ]]>
80 </token>
81 <token name="@CMD_read_expression_matrix@"><![CDATA[
82 counts<-read.table("matrix.tab", header=TRUE, row.names=1, sep="\t")
83 ]]>]
84 </token>
85 <token name="@CMD@"><![CDATA[
86 cp '$seurat_rds' seurat.rds &&
87 cat '$script_file' > $hidden_output &&
88 Rscript '$script_file' >> $hidden_output
89 ]]>
90 </token>
91 <xml name="inputs_common_advanced">
92 <section name="advanced_common" title="Advanced Output" expanded="false">
93 <param name="show_log" type="boolean" checked="false" label="Output Log?" />
94 </section>
95 </xml>
96 <xml name="outputs_common_advanced">
97 <data name="hidden_output" format="txt" label="Log file" >
98 <filter>advanced_common['show_log']</filter>
99 </data>
100 </xml>
101 <xml name="seurat_outputs">
102 <data name="rds_out" format="rds" from_work_dir="seurat.rds" label="${tool.name} (${method.method}) on ${on_string}: RDS">
103 <filter>method['method'] != 'Inspect'</filter>
104 </data>
105 <expand macro="outputs_common_advanced"/>
106 </xml>
107 <token name="@CMD_rds_write_outputs@"><![CDATA[
108 saveRDS(seurat_obj, 'seurat.rds')
109 ]]>
110 </token>
111 <xml name="variable_out">
112 <data name="variable_tabular" format="txt" from_work_dir="variable_out.txt" label="${tool.name} (${method.method}) on ${on_string}: Top variable features list">
113 <filter>method['method'] == 'FindVariableFeatures' or method['method'] == 'SCTransform'</filter>
114 <filter>method['output_topN']['output_topN'] == 'true'</filter>
115 </data>
116 </xml>
117 <token name="@CMD_write_variable_tab@"><![CDATA[
118 write.table(top_N, 'variable_out.txt', sep= "\t", col.names = FALSE, quote = FALSE)
119 ]]>
120 </token>
121 <xml name="markers_out">
122 <data name="markers_tabular" format="csv" from_work_dir="markers_out.csv" label="${tool.name} (${method.method}) on ${on_string}: Markers list">
123 <filter>method['method'] == 'FindAllMarkers' or method['method'] == 'FindMarkers' or method['method'] == 'FindConservedMarkers'</filter>
124 </data>
125 </xml>
126 <token name="@CMD_write_markers_tab@"><![CDATA[
127 write.csv(seurat_obj, 'markers_out.csv', quote = FALSE)
128 ]]>
129 </token>
130 <xml name="print_top_pcs">
131 <data name="top_pcs" format="txt" from_work_dir="print_pcs.txt" label="${tool.name} Print PCs on ${on_string}">
132 <filter>method['method'] == 'RunPCA' and method['print_pcs']['print_pcs'] == 'true'</filter>
133 </data>
134 </xml>
135 <xml name="inspect_out">
136 <data name="inspect_tabular" format="tabular" from_work_dir="inspect_out.tab" label="${tool.name} Inspect (${method.inspect.inspect}) on ${on_string}">
137 <filter>method['method'] == 'Inspect' and method['inspect']['inspect'] != 'General'</filter>
138 </data>
139 <data name="inspect_general" format="txt" from_work_dir="inspect.txt" label="${tool.name} Inspect General on ${on_string}">
140 <filter>method['method'] == 'Inspect' and method['inspect']['inspect'] == 'General'</filter>
141 </data>
142 </xml>
143 <token name="@CMD_inspect_rds_outputs@"><![CDATA[
144 write.table(inspect, 'inspect_out.tab', sep="\t", col.names = col.names, row.names = row.names, quote = FALSE)
145 ]]>
146 </token>
147 <xml name="plot_out">
148 <data name="plot_out_png" format="png" from_work_dir="plot.png" label="${tool.name} (${method.method}) on ${on_string}: png plot">
149 <filter>plot_format == 'png'</filter>
150 </data>
151 <data name="plot_out_pdf" format="pdf" from_work_dir="plot.pdf" label="${tool.name} (${method.method}) on ${on_string}: pdf plot">
152 <filter>plot_format == 'pdf'</filter>
153 </data>
154 <data name="plot_out_svg" format="svg" from_work_dir="plot.svg" label="${tool.name} (${method.method}) on ${on_string}: svg plot">
155 <filter>plot_format == 'svg'</filter>
156 </data>
157 <data name="plot_out_jpeg" format="jpeg" from_work_dir="plot.jpeg" label="${tool.name} (${method.method}) on ${on_string}: jpeg plot">
158 <filter>plot_format == 'jpeg'</filter>
159 </data>
160 <data name="plot_out_tex" format="tex" from_work_dir="plot.tex" label="${tool.name} (${method.method}) on ${on_string}: tex plot">
161 <filter>plot_format == 'tex'</filter>
162 </data>
163 <data name="plot_out_tiff" format="tiff" from_work_dir="plot.tiff" label="${tool.name} (${method.method}) on ${on_string}: tiff plot">
164 <filter>plot_format == 'tiff'</filter>
165 </data>
166 <data name="plot_out_eps" format="eps" from_work_dir="plot.eps" label="${tool.name} (${method.method}) on ${on_string}: eps plot">
167 <filter>plot_format == 'eps'</filter>
168 </data>
169 </xml>
170 <xml name="param_eps" tokens="eps_value">
171 <param argument="eps" type="float" value="@EPS_VALUE@" label="Small number to avoid numerical errors"/>
172 </xml>
173 <xml name="valid_name">
174 <validator type="regex" message="Please only use letters, numbers, or _ - .">^[\w\-.]+$</validator>
175 </xml>
176 <xml name="valid_reduction_key">
177 <validator type="regex" message="Please only use letters and _">^[A-Za-z_]+$</validator>
178 </xml>
179 <xml name="valid_list">
180 <validator type="regex" message="Please only use letters, numbers, or _ - . ,">^[\w\-., ]+$</validator>
181 </xml>
182 <xml name="valid_cell_name">
183 <validator type="regex" message="Please only use letters, numbers, or punctuation marks">^[\w[:punct:]]+$</validator>
184 </xml>
185 <xml name="valid_cell_list">
186 <validator type="regex" message="Please only use letters, numbers, or punctuation marks">^[\w[:punct:]]+$</validator>
187 </xml>
188 <xml name="select_assay">
189 <param argument="assay" type="text" optional="true" value="" label="Name of assay to use" help="leave blank to use default assay">
190 <expand macro="valid_name"/>
191 </param>
192 </xml>
193 <xml name="select_assay_RNA">
194 <param argument="assay" type="text" value="RNA" label="Name of assay to use">
195 <expand macro="valid_name"/>
196 </param>
197 </xml>
198 <xml name="select_slot_data">
199 <param argument="slot" type="select" label="Slot to pull data from">
200 <option value="counts">counts</option>
201 <option value="data" selected="true">data</option>
202 <option value="scale.data">scale.data</option>
203 <option value="raw.data">raw.data</option>
204 </param>
205 </xml>
206 <xml name="select_slot_scale">
207 <param argument="slot" type="select" label="Slot to pull data from">
208 <option value="counts">counts</option>
209 <option value="data">data</option>
210 <option value="scale.data" selected="true">scale.data</option>
211 <option value="raw.data">raw.data</option>
212 </param>
213 </xml>
214 <xml name="select_slot_counts">
215 <param argument="slot" type="select" label="Slot to pull data from">
216 <option value="counts" selected="true">counts</option>
217 <option value="data">data</option>
218 <option value="scale.data">scale.data</option>
219 <option value="raw.data">raw.data</option>
220 </param>
221 </xml>
222 <xml name="select_layer">
223 <param argument="layer" type="text" optional="true" value="" label="Layer to pull data from" help="leave blank to use default">
224 <expand macro="valid_name"/>
225 </param>
226 </xml>
227 <xml name="select_reduction_pca">
228 <param argument="reduction" type="text" value="pca" label="Name of reduction to use" help="default is pca">
229 <expand macro="valid_name"/>
230 </param>
231 </xml>
232 <xml name="select_reduction_umap">
233 <param argument="reduction" type="text" value="umap" label="Name of reduction to use" help="first defaults to umap, then tsne, then pca">
234 <expand macro="valid_name"/>
235 </param>
236 </xml>
237 <xml name="set_topN">
238 <param name="topN" type="integer" value="10" label="Number to show"/>
239 </xml>
240 <xml name="set_dims">
241 <param argument="dims" type="integer" optional="true" value="10" label="Number of dimensions from reduction to use as input"/>
242 </xml>
243 <xml name="normalize">
244 <conditional name="normalization_method">
245 <param name="normalization_method" type="select" label="Method for normalization" help="(normalization.method)">
246 <option value="LogNormalize" selected="true">LogNormalize</option>
247 <option value="CLR">CLR</option>
248 <option value="RC">RC</option>
249 </param>
250 <when value="LogNormalize"></when>
251 <when value="CLR">
252 <param argument="margin" type="select" checked="true" label="Normalize across features (1) or cells (2)">
253 <option value="1" selected="true">features</option>
254 <option value="2">cells</option>
255 </param>
256 </when>
257 <when value="RC"></when>
258 </conditional>
259 <param name="scale_factor" type="integer" value="10000" label="Set scale factor for normalization" help="(scale.factor)"/>
260 <param name="block_size" type="integer" optional="true" value="" label="Number of cells to run in each block" help="(block.size)"/>
261 </xml>
262 <xml name="integration_inputs">
263 <param argument="dims" type="integer" value="30" label="Number of dimensions from reduction to use for integration"/>
264 <param name="dims_to_integrate" type="integer" optional="true" value="" label="Number of dimensions to return integrated values for" help="(dims.to.integrate)"/>
265 <param name="k_weight" type="integer" value="100" label="Number of neighbors to consider when weighting anchors" help="(k.weight)"/>
266 <param name="weight_reduction" type="text" optional="true" value="" label="Name of reduction(s) to use for calculating anchor weights" help="leave blank to use full corrected space (weight.reduction)">
267 <expand macro="valid_list"/>
268 </param>
269 <param name="sd_weight" type="float" value="1" label="Controls bandwidth of Gaussian kernel for weighting"/>
270 <param name="preserve_order" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Preserve order" help="do not reorder objects based on size for each pairwise integration (preserve.order)"/>
271 </xml>
272 <xml name="markers_inputs">
273 <param argument="features" type="data" format="txt,tabular" optional="true" value="" label="Features to test" help="text file with one feature on each line, leave empty to use all genes"/>
274 <param name="logfc_threshold" type="float" value="0.1" label="Minimum log-fold difference to test" help="(logfc.threshold)"/>
275 <conditional name="test_use">
276 <param name="test_use" type="select" label="Select test to run" help="(test.use)">
277 <option value="wilcox" selected="true">wilcox</option>
278 <option value="wilcox_limma">wilcox_limma</option>
279 <option value="bimod">bimod</option>
280 <option value="roc">roc</option>
281 <option value="t">t</option>
282 <option value="negbinom">negbinom</option>
283 <option value="poisson">poisson</option>
284 <option value="LR">LR</option>
285 <option value="MAST">MAST</option>
286 <option value="DESeq2">DESeq2</option>
287 </param>
288 <when value="wilcox">
289 <expand macro="select_slot_data"/>
290 </when>
291 <when value="wilcox_limma">
292 <expand macro="select_slot_data"/>
293 </when>
294 <when value="bimod">
295 <expand macro="select_slot_data"/>
296 </when>
297 <when value="roc">
298 <expand macro="select_slot_data"/>
299 <param name="return_thresh" type="float" value="0.01" min="0.0" max="1.0" label="Only return markers with a p-value below or power above this threshold" help="(return.thresh)"/>
300 </when>
301 <when value="t">
302 <expand macro="select_slot_data"/>
303 </when>
304 <when value="negbinom">
305 <expand macro="select_slot_counts"/>
306 <param name="latent_vars" type="text" optional="true" value="" label="Select variables to test" help="(latent.vars)"/>
307 <param name="min_cells_feature" type="integer" value="3" label="Minimum number of cells expressing the feature in at least one cluster" help="(min.cells.feature)"/>
308 </when>
309 <when value="poisson">
310 <expand macro="select_slot_counts"/>
311 <param name="latent_vars" type="text" optional="true" value="" label="Select variables to test" help="(latent.vars)"/>
312 <param name="min_cells_feature" type="integer" value="3" label="Minimum number of cells expressing the feature in at least one cluster" help="(min.cells.feature)"/>
313 </when>
314 <when value="LR">
315 <expand macro="select_slot_data"/>
316 <param name="latent_vars" type="text" optional="true" value="" label="Select variables to test" help="(latent.vars)"/>
317 </when>
318 <when value="MAST">
319 <expand macro="select_slot_data"/>
320 <param name="latent_vars" type="text" optional="true" value="" label="Select variables to test" help="(latent.vars)"/>
321 </when>
322 <when value="DESeq2">
323 <expand macro="select_slot_counts"/>
324 </when>
325 </conditional>
326 </xml>
327 <xml name="advanced_markers_inputs">
328 <expand macro="select_assay"/>
329 <param name="fc_name" type="text" optional="true" value="" label="Choose a name for the fold change, average difference, or custom function column" help="(fc.name)">
330 <expand macro="valid_name"/>
331 </param>
332 <param name="min_pct" type="float" value="0.01" min="0" max="100" label="Minimum percentage of cells genes must be present in to be tested" help="(min.pct)"/>
333 <param name="min_diff_pct" type="float" optional="true" value="" label="Minimum difference in percentage of expression between groups for genes to be tested" help="defaults to -Inf (min.diff.pct)"/>
334 <param name="only_pos" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Only return positive markers" help="(only.pos)"/>
335 <param name="max_cells_per_ident" type="integer" optional="true" value="" label="Downsample each identity class to a max number of cells" help="defaults to Inf for no downsampling (max.cells.per.ident)"/>
336 <param name="random_seed" type="integer" optional = "true" value="1" label="Set a random seed for downsampling" help="(random.seed)"/>
337 <param name="min_cells_group" type="integer" value="3" label="Minimum number of cells in one group" help="(min.cells.group)"/>
338 <param argument="densify" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Convert to dense matrix before running DE test"/>
339 </xml>
340 <xml name="plot_types">
341 <param name="plot_format" type="select" label="Format of plot to produce">
342 <option value="png">png</option>
343 <option value="pdf">pdf</option>
344 <option value="svg">svg</option>
345 <option value="jpeg">jpeg</option>
346 <option value="tex">tex</option>
347 <option value="tiff">tiff</option>
348 <option value="eps">eps</option>
349 </param>
350 </xml>
351 <xml name="plot_sizes">
352 <conditional name="resize">
353 <param name="resize" type="select" label="Change size of plot">
354 <option value="false" selected="true">No</option>
355 <option value="true">Yes</option>
356 </param>
357 <when value="false"></when>
358 <when value="true">
359 <param argument="width" type="integer" value="2100" label="Width of plot in pixels"/>
360 <param argument="height" type="integer" value="2100" label="Height of plot in pixels"/>
361 </when>
362 </conditional>
363 </xml>
364 <xml name="plot_cols">
365 <param argument="cols" type="text" optional="true" value="" label="Colours to use for plotting" help="comma separated list">
366 <expand macro="valid_list"/>
367 </param>
368 </xml>
369 <xml name="plot_log_scale">
370 <param argument="log" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Plot on a log scale"/>
371 </xml>
372 <xml name="plot_2_dims">
373 <param name="dims_1" type="integer" value="1" label="Dimension to plot on x axis"/>
374 <param name="dims_2" type="integer" value="2" label="Dimension to plot on y axis"/>
375 </xml>
376 <xml name="plot_projected_and_balanced">
377 <param argument="projected" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Use reduction values for full dataset" help="i.e. projected dimensional reduction values"/>
378 <param argument="balanced" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Return an equal number of genes with + and - scores"/>
379 </xml>
380 <xml name="plot_disp_min_max">
381 <param name="disp_min" type="float" optional="true" value="-2.5" label="Minimum display value" help="all values below are clipped (disp.min)"/>
382 <param name="disp_max" type="float" optional="true" value="" label="Maximum display value" help="all values above are clipped. Defaults to 2.5 if slot is scale.data, otherwise defaults to 6 (disp.max)"/>
383 </xml>
384 <xml name="plot_shuffle_and_seed">
385 <conditional name="shuffle">
386 <param argument="shuffle" type="select" label="Randomly shuffle order of points" help="can help with crowded plots if points of interest are hidden">
387 <option value="TRUE">Yes</option>
388 <option value="FALSE" selected="true">No</option>
389 </param>
390 <when value="TRUE">
391 <param argument="seed" type="integer" value="1" label="Set random seed for shuffling"/>
392 </when>
393 <when value="FALSE"></when>
394 </conditional>
395 </xml>
396 <xml name="plot_order">
397 <param argument="order" type="text" optional="true" value="" label="Specify the order of plotting for the idents" help="a full comma-separated list or the ident to be plotted last on the top">
398 <expand macro="valid_list"/>
399 </param>
400 </xml>
401 <xml name="plot_group_by">
402 <param name="group_by" type="text" optional="true" value="" label="Factor to group cells by" help="(group.by)"/>
403 </xml>
404 <xml name="plot_split_by">
405 <param name="split_by" type="text" optional="true" value="" label="Factor or identity to split the plot by" help="(split.by)"/>
406 </xml>
407 <xml name="plot_alpha">
408 <param argument="alpha" type="integer" value="1" label="Alpha value for points"/>
409 </xml>
410 <xml name="plot_pt_size">
411 <param name="pt_size" type="float" optional="true" value="" label="Point size for plot" help="(pt.size)"/>
412 </xml>
413 <xml name="plot_smooth">
414 <param argument="smooth" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Smooth the graph"/>
415 </xml>
416 <xml name="plot_ncol">
417 <param argument="ncol" type="integer" optional="true" value="" label="Number of columns to display"/>
418 </xml>
419 <xml name="raster_select">
420 <conditional name="raster">
421 <param argument="raster" type="select" label="Convert points to raster format" help="NULL will automatically use raster if more than 100,000 points plotted">
422 <option value="NULL" selected="true">NULL</option>
423 <option value="TRUE">TRUE</option>
424 <option value="FALSE">FALSE</option>
425 </param>
426 <when value="NULL"></when>
427 <when value="TRUE">
428 <param name="raster_x" type="integer" value="512" label="Horizontal length of raster plot (pixels)"/>
429 <param name="raster_y" type="integer" value="512" label="Vertical height of raster plot (pixels)"/>
430 </when>
431 <when value="FALSE"></when>
432 </conditional>
433 </xml>
434 <xml name="raster_boolean">
435 <param argument="raster" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Convert to raster format"/>
436 </xml>
437 </macros>