comparison plot.xml @ 0:397d2c97af05 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 92f85afaed0097d1879317a9f513093fce5481d6
author iuc
date Mon, 04 Mar 2019 10:14:25 -0500
parents
children e4c0f5ee8e17
comparison
equal deleted inserted replaced
-1:000000000000 0:397d2c97af05
1 <tool id="scanpy_plot" name="Plot with scanpy" version="@galaxy_version@">
2 <description></description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <stdio>
8 <regex match="... storing" source="stderr" level="warning"/>
9 </stdio>
10 <expand macro="version_command"/>
11 <command detect_errors="exit_code"><![CDATA[
12 @CMD@
13 ]]></command>
14 <configfiles>
15 <configfile name="script_file"><![CDATA[
16 @CMD_imports@
17 @CMD_read_inputs@
18
19 sc.settings.figdir = '.'
20
21 #if $method.method == 'pl.scatter'
22
23 sc.pl.scatter(
24 @CMD_param_plot_inputs@
25 #if $method.type.type == 'xy'
26 x='$method.type.x',
27 y='$method.type.y',
28 layers=('$method.type.layer_x', '$method.type.layer_y', '$method.type.layer_color'),
29 #else
30 basis='$method.type.basis',
31 #if str($method.type.color) != ''
32 #set $color = ([x.strip() for x in str($method.type.color).split(',')])
33 color=$color,
34 #else
35 color=None,
36 #end if
37 #end if
38 use_raw=$method.use_raw,
39 sort_order=$method.sort_order,
40 @CMD_params_pl_groups@
41 @CMD_params_pl_components@
42 projection='$method.plot.projection',
43 legend_loc='$method.plot.legend_loc',
44 legend_fontsize=$method.plot.legend_fontsize,
45 legend_fontweight='$method.plot.legend_fontweight',
46 color_map='$method.plot.color_map',
47 palette='$method.plot.palette',
48 frameon=$method.plot.frameon,
49 #if $method.plot.title
50 title='$method.plot.title',
51 #end if
52 size=$method.plot.size)
53
54 #elif $method.method == 'pl.heatmap'
55 sc.pl.heatmap(
56 @CMD_param_plot_inputs@
57 @CMD_params_plots@
58 swap_axes=$method.swap_axes,
59 show_gene_labels=$method.show_gene_labels,
60 cmap='$method.matplotlib_pyplot_imshow.cmap',
61 interpolation='$method.matplotlib_pyplot_imshow.interpolation',
62 #if $method.matplotlib_pyplot_imshow.alpha
63 alpha=$method.matplotlib_pyplot_imshow.alpha,
64 #end if
65 #if $method.matplotlib_pyplot_imshow.vmin
66 vmin=$method.matplotlib_pyplot_imshow.vmin,
67 #end if
68 #if $method.matplotlib_pyplot_imshow.vmax
69 vmax=$method.matplotlib_pyplot_imshow.vmax,
70 #end if
71 origin='$method.matplotlib_pyplot_imshow.origin')
72
73 #elif $method.method == 'pl.dotplot'
74 sc.pl.dotplot(
75 @CMD_param_plot_inputs@
76 @CMD_params_plots@
77 color_map='$method.color_map',
78 #if $method.dot_max
79 dot_max=$method.dot_max,
80 #end if
81 #if $method.dot_min
82 dot_min=$method.dot_min,
83 #end if
84 @CMD_params_matplotlib_pyplot_scatter@)
85
86 #elif $method.method == 'pl.violin'
87 sc.pl.violin(
88 @CMD_param_plot_inputs@
89 #if $method.key_variables.type == "var_names"
90 #set $key_list = adata.var_names
91 #elif $method.key_variables.type == "obs"
92 #set $key_list = adata.obs.select_dtypes(exclude=['category']).columns
93 #elif $method.key_variables.type == "custom"
94 #set $key_list=([x.strip() for x in str($method.key_variables.keys).split(',')])
95 #end if
96 keys=$key_list,
97 #if $method.groupby
98 groupby='$method.groupby',
99 #end if
100 log=$method.log,
101 use_raw=$method.use_raw,
102 sstripplot=$method.violin_plot.stripplot.stripplot,
103 #if $method.violin_plot.stripplot.stripplot == "True"
104 jitter=$method.violin_plot.stripplot.jitter.jitter,
105 #if $method.violin_plot.stripplot.jitter.jitter == "True"
106 size=$method.violin_plot.stripplot.jitter.size,
107 #end if
108 #end if
109 multi_panel=$method.violin_plot.multi_panel.multi_panel,
110 scale='$method.violin_plot.scale',
111 #if $method.xlabel
112 xlabel='$method.xlabel',
113 #end if
114 #if $method.rotation
115 rotation=$method.rotation,
116 #end if
117 @CMD_params_seaborn_violinplot@)
118
119 #elif $method.method == 'pl.matrixplot'
120 sc.pl.matrixplot(
121 @CMD_param_plot_inputs@
122 @CMD_params_plots@
123 swap_axes=$method.swap_axes,
124 cmap='$method.matplotlib_pyplot_pcolor.cmap',
125 #if $method.matplotlib_pyplot_pcolor.vmin
126 vmin=$method.matplotlib_pyplot_pcolor.vmin,
127 #end if
128 #if $method.matplotlib_pyplot_pcolor.vmax
129 vmax=$method.matplotlib_pyplot_pcolor.vmax,
130 #end if
131 edgecolors='$method.matplotlib_pyplot_pcolor.edgecolors',
132 #if $method.matplotlib_pyplot_pcolor.alpha
133 alpha=$method.matplotlib_pyplot_pcolor.alpha,
134 #end if
135 snap=$method.matplotlib_pyplot_pcolor.snap)
136
137 #elif $method.method == 'pl.clustermap'
138 sc.pl.clustermap(
139 #if str($method.use_raw) == 'True'
140 adata=adata.X,
141 #else
142 adata=adata,
143 #end if
144 show=False,
145 obs_keys='$method.obs_keys',
146 use_raw=$method.use_raw,
147 method='$method.seaborn_clustermap.method',
148 metric='$method.seaborn_clustermap.metric',
149 #if str($method.seaborn_clustermap.z_score) == 'None'
150 z_score=None,
151 #else
152 z_score=$method.seaborn_clustermap.z_score,
153 #end if
154 #if str($method.seaborn_clustermap.standard_scale) == 'None'
155 standard_scale=None,
156 #else
157 standard_scale=$method.seaborn_clustermap.standard_scale,
158 #end if
159 col_cluster=$method.seaborn_clustermap.col_cluster,
160 row_cluster=$method.seaborn_clustermap.row_cluster).savefig(fname="output.$format")
161
162 #elif $method.method == 'pl.highest_expr_genes'
163 sc.pl.highest_expr_genes(
164 @CMD_param_plot_inputs@
165 n_top=$method.n_top,
166 #if str($method.gene_symbols) != ''
167 gene_symbols='$method.gene_symbols',
168 #end if
169 #if str($method.setseaborn_boxplot.color) != ''
170 color='$method.setseaborn_boxplot.color',
171 #end if
172 #if str($method.setseaborn_boxplot.palette) != 'None'
173 palette='$method.setseaborn_boxplot.palette',
174 #end if
175 saturation=$method.setseaborn_boxplot.saturation)
176
177 #elif $method.method == 'pl.pca'
178 sc.pl.pca(
179 @CMD_param_plot_inputs@
180 @CMD_param_color@
181 use_raw=$method.use_raw,
182 sort_order=$method.sort_order,
183 @CMD_params_pl_groups@
184 @CMD_params_pl_components@
185 @CMD_pl_attribute_section@
186 @CMD_params_matplotlib_pyplot_scatter@)
187
188 #elif $method.method == 'pl.pca_loadings'
189 sc.pl.pca_loadings(
190 @CMD_param_plot_inputs@
191 #set $components = ([int(x.strip()) for x in str($method.components).split(',')])
192 components=$components)
193
194 #elif $method.method == 'pl.pca_variance_ratio'
195 sc.pl.pca_variance_ratio(
196 @CMD_param_plot_inputs@
197 n_pcs=$method.n_pcs,
198 log=$method.log)
199
200 #elif $method.method == 'pl.pca_overview'
201 sc.pl.pca_overview(
202 @CMD_param_plot_inputs@
203 @CMD_param_color@
204 use_raw=$method.use_raw,
205 sort_order=$method.sort_order,
206 @CMD_params_pl_groups@
207 @CMD_params_pl_components@
208 @CMD_pl_attribute_section@
209 @CMD_params_matplotlib_pyplot_scatter@)
210
211 #elif $method.method == 'pl.tsne'
212 sc.pl.tsne(
213 @CMD_param_plot_inputs@
214 @CMD_param_color@
215 use_raw=$method.use_raw,
216 @CMD_pl_edges@
217 arrows=$method.arrows,
218 sort_order=$method.sort_order,
219 @CMD_params_pl_groups@
220 @CMD_params_pl_components@
221 @CMD_pl_attribute_section@
222 @CMD_params_matplotlib_pyplot_scatter@)
223
224 #elif $method.method == 'pl.umap'
225 sc.pl.umap(
226 @CMD_param_plot_inputs@
227 @CMD_param_color@
228 use_raw=$method.use_raw,
229 @CMD_pl_edges@
230 arrows=$method.arrows,
231 sort_order=$method.sort_order,
232 @CMD_params_pl_groups@
233 @CMD_params_pl_components@
234 @CMD_pl_attribute_section@
235 @CMD_params_matplotlib_pyplot_scatter@)
236
237 #elif $method.method == 'pl.diffmap'
238 sc.pl.diffmap(
239 @CMD_param_plot_inputs@
240 @CMD_param_color@
241 use_raw=$method.use_raw,
242 sort_order=$method.sort_order,
243 @CMD_params_pl_groups@
244 @CMD_params_pl_components@
245 @CMD_pl_attribute_section@
246 @CMD_params_matplotlib_pyplot_scatter@)
247
248 #elif $method.method == 'pl.dpt_groups_pseudotime'
249 sc.pl.dpt_groups_pseudotime(
250 @CMD_param_plot_inputs@
251 color_map='$method.color_map')
252
253 #elif $method.method == 'pl.dpt_timeseries'
254 sc.pl.dpt_timeseries(
255 @CMD_param_plot_inputs@
256 #if $method.heatmap.as_heatmap == "True"
257 color_map='$method.heatmap.color_map',
258 #end if
259 as_heatmap=$method.heatmap.as_heatmap)
260
261 #elif $method.method == 'pl.paga'
262 sc.pl.paga(
263 @CMD_param_plot_inputs@
264 @CMD_params_pl_paga@)
265 #end if
266 ]]></configfile>
267 </configfiles>
268 <inputs>
269 <expand macro="inputs_anndata"/>
270 <expand macro="param_plot_format"/>
271 <conditional name="method">
272 <param argument="method" type="select" label="Method used for plotting">
273 <option value="pl.scatter">Generic: Scatter plot along observations or variables axes, using `pl.scatter`</option>
274 <option value="pl.heatmap">Generic: Heatmap of the expression values of set of genes, using `pl.heatmap`</option>
275 <option value="pl.dotplot">Generic: Makes a dot plot of the expression values, using `pl.dotplot`</option>
276 <option value="pl.violin">Generic: Violin plot, using `pl.violin`</option>
277 <!--<option value="pl.stacked_violin">Generic: </option>!-->
278 <option value="pl.matrixplot">Generic: Heatmap of the mean expression values per cluster, using `pl.matrixplot`</option>
279 <option value="pl.clustermap">Generic: Hierarchically-clustered heatmap, using `pl.clustermap`</option>
280 <!--<option value="pl.ranking">Generic: </option>!-->
281 <option value="pl.highest_expr_genes">Preprocessing: Plot the fraction of counts assigned to each gene over all cells, using `pl.highest_expr_genes`</option>
282 <!--<option value="pl.filter_genes_dispersion">Preprocessing: Plot dispersions versus means for genes, using `pl.filter_genes_dispersion`</option>-->
283 <!--<option value="pl.highly_variable_genes">Preprocessing: </option>!-->
284 <!--<option value="pl.calculate_qc_metrics">Preprocessing: </option>!-->
285 <option value="pl.pca">PCA: Scatter plot in PCA coordinates, using `pl.pca`</option>
286 <option value="pl.pca_loadings">PCA: Rank genes according to contributions to PCs, using `pl.pca_loadings`</option>
287 <option value="pl.pca_variance_ratio">PCA: Scatter plot in PCA coordinates, using `pl.pca_variance_ratio`</option>
288 <option value="pl.pca_overview">PCA: Plot PCA results, using `pl.pca_overview`</option>
289 <option value="pl.tsne">Embeddings: Scatter plot in tSNE basis, using `pl.tsne`</option>
290 <option value="pl.umap">Embeddings: Scatter plot in UMAP basis, using `pl.umap`</option>
291 <option value="pl.diffmap">Embeddings: Scatter plot in Diffusion Map basis, using `pl.diffmap`</option>
292 <!--<option value="pl.draw_graph">Embeddings: </option>!-->
293 <option value="pl.dpt_groups_pseudotime">Branching trajectories and pseudotime, clustering: Plot groups and pseudotime, using `pl.dpt_groups_pseudotime`</option>
294 <option value="pl.dpt_timeseries">Branching trajectories and pseudotime, clustering: Heatmap of pseudotime series, using `pl.dpt_timeseries`</option>
295 <option value="pl.paga">Branching trajectories and pseudotime, clustering: Plot the abstracted graph through thresholding low-connectivity edges, using `pl.paga`</option>
296 <!--<option value="pl.paga_compare">Branching trajectories and pseudotime, clustering: </option>!-->
297 <!--<option value="pl.paga_path">Branching trajectories and pseudotime, clustering: </option>!-->
298 <!--<option value="pl.rank_gene_groups">Marker genes: Plot ranking of genes using dotplot plot, using `pl.rank_gene_groups`</option>!-->
299 <!--<option value="pl.rank_genes_groups_dotplot">Marker genes: </option>!-->
300 <!--<option value="pl.rank_genes_groups_heatmap">Marker genes: </option>!-->
301 <!--<option value="pl.rank_genes_groups_matrixplot">Marker genes: </option>!-->
302 <!--<option value="pl.rank_genes_groups_stacked_violin">Marker genes: </option>!-->
303 <!--<option value="pl.rank_genes_groups_violin">Marker genes: </option>!-->
304 <!--<option value="pl.phate">Misc: </option>!-->
305 <!--<option value="pl.matrix">Misc: </option>!-->
306 <!--<option value="pl.paga_adjacency">Misc: </option>!-->
307 <!--<option value="pl.timeseries">Misc: </option>!-->
308 <!--<option value="pl.timeseries_as_heatmap">Misc: </option>!-->
309 <!--<option value="pl.timeseries_subplot">Misc: </option>!-->
310 </param>
311 <when value="pl.scatter">
312 <conditional name="type">
313 <param name="type" type="select" label="Plotting tool that computed coordinates" help="">
314 <option value="xy">Using coordinates</option>
315 <option value="basis">Using tool that computes coordinates</option>
316 </param>
317 <when value="xy">
318 <param argument="x" type="text" value="" label="x coordinate" help="Index or key from either `.obs` or `.var`"/>
319 <param argument="y" type="text" value="" label="y coordinate" help="Index or key from either `.obs` or `.var`"/>
320 <param argument="layer_x" type="text" value="X" label="Layers for x coordinate" help="Use the `layers` attribute of `adata` if present"/>
321 <param argument="layer_y" type="text" value="X" label="Layers for y coordinate" help="Use the `layers` attribute of `adata` if present"/>
322 <param argument="layer_color" type="text" value="X" label="Layers for color" help="Use the `layers` attribute of `adata` if present"/>
323 </when>
324 <when value="basis">
325 <param argument="basis" type="select" label="Plotting tool that computes coordinates" help="">
326 <option value="pca">pca (need to run on `tl.pca` output)</option>
327 <option value="tsne">tsne (need to run on `tl.tsne` output)</option>
328 <option value="umap">umap (need to run on `tl.umap` output)</option>
329 <option value="diffmap">diffmap (need to run on `tl.diffmap` output)</option>
330 <option value="draw_graph_fr">draw_graph_fr (need to run on `tl.draw_graph` output)</option>
331 </param>
332 <expand macro="param_color"/>
333 </when>
334 </conditional>
335 <expand macro="param_use_raw"/>
336 <param argument="sort_order" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Plot data points with higher values on top of others?" help="For continuous annotations used as color parameter"/>
337 <expand macro="pl_groups"/>
338 <section name="plot" title="Plot attributes">
339 <expand macro="pl_components"/>
340 <expand macro="param_projection"/>
341 <expand macro="param_legend_loc"/>
342 <expand macro="param_legend_fontsize"/>
343 <expand macro="param_legend_fontweight"/>
344 <expand macro="param_color_map"/>
345 <expand macro="param_palette"/>
346 <expand macro="param_frameon"/>
347 <expand macro="param_size"/>
348 <expand macro="param_title"/>
349 </section>
350 </when>
351 <when value="pl.heatmap">
352 <expand macro="params_plots"/>
353 <expand macro="param_swap_axes"/>
354 <param argument="show_gene_labels" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Show gene labels?" help="By default gene labels are shown when there are 50 or less genes. Otherwise the labels are removed."/>
355 <section name="matplotlib_pyplot_imshow" title="Parameters for matplotlib.pyplot.imshow">
356 <expand macro="param_cmap"/>
357 <param name="interpolation" type="select" label="Interpolation method" help="">
358 <option value="none">none</option>
359 <option value="nearest">nearest</option>
360 <option value="bilinear">bilinear</option>
361 <option value="bicubic">bicubic</option>
362 <option value="spline16">spline16</option>
363 <option value="spline36">spline36</option>
364 <option value="hanning">hanning</option>
365 <option value="hamming">hamming</option>
366 <option value="hermite">hermite</option>
367 <option value="kaiser">kaiser</option>
368 <option value="quadric">quadric</option>
369 <option value="catrom">catrom</option>
370 <option value="gaussian">gaussian</option>
371 <option value="bessel">bessel</option>
372 <option value="sinc">sinc</option>
373 <option value="mitchell">mitchell</option>
374 <option value="lanczos">lanczos</option>
375 </param>
376 <expand macro="param_alpha"/>
377 <expand macro="param_vmin"/>
378 <expand macro="param_vmax"/>
379 <param name="origin" type="select" label="Place the [0,0] index of the array in the upper left or lower left corner of the axes" help=" The convention 'upper' is typically used for matrices and images.">
380 <option value="upper">Upper</option>
381 <option value="lower">Lower</option>
382 </param>
383 </section>
384 </when>
385 <when value="pl.dotplot">
386 <expand macro="params_plots"/>
387 <param argument="color_map" type="select" label="Color palette">
388 <expand macro="matplotlib_pyplot_colormap"/>
389 </param>
390 <param argument="dot_max" type="float" value="" min="0" max="1" optional="true" label="Maximum dot size" help="If none, the maximum dot size is set to the maximum fraction value found (e.g. 0.6). If given, the value should be a number between 0 and 1. All fractions larger than dot_max are clipped to this value."/>
391 <param argument="dot_min" type="float" value="" min="0" max="1" optional="true" label="Minimum dot size" help="If none, the minimum dot size is set to 0. If given, the value should be a number between 0 and 1. All fractions smaller than dot_min are clipped to this value."/>
392 <expand macro="section_matplotlib_pyplot_scatter"/>
393 </when>
394 <when value="pl.violin">
395 <conditional name="key_variables">
396 <param name="type" type="select" label="Keys for accessing variables">
397 <option value="var_names">All variables in `.var_names`</option>
398 <option value="obs">All fields in `.obs`</option>
399 <option value="custom">Subset of variables in `adata.var_names` or fields of `.obs`"</option>
400 </param>
401 <when value="var_names"/>
402 <when value="obs"/>
403 <when value="custom">
404 <param argument="keys" type="text" value="" label="Keys for accessing variables" help="One or a list of comma-separated index or key from `.var_names` or fields of `.obs`"/>
405 </when>
406 </conditional>
407 <expand macro="param_groupby"/>
408 <expand macro="param_log"/>
409 <expand macro="param_use_raw"/>
410 <expand macro="section_violin_plots"/>
411 <param argument="xlabel" type="text" value="" optional="true" label="Label of the x axis" help="Defaults to `groupby` if `rotation` is `None`, otherwise, no label is shown."/>
412 <param argument="rotation" type="float" value="" optional="true" label="Rotation of xtick labels" help=""/>
413 <expand macro="seaborn_violinplot"/>
414 </when>
415 <when value="pl.matrixplot">
416 <expand macro="params_plots"/>
417 <expand macro="param_swap_axes"/>
418 <section name="matplotlib_pyplot_pcolor" title="Parameters for matplotlib.pyplot.pcolor">
419 <param argument="cmap" type="select" label="Color palette">
420 <expand macro="seaborn_color_palette_options"/>
421 </param>
422 <param argument="vmin" type="float" value="" optional="true" label="Minimum value to anchor the colormap" help=""/>
423 <param argument="vmax" type="float" value="" optional="true" label="Maximum value to anchor the colormap" help=""/>
424 <expand macro="param_matplotlib_pyplot_edgecolors"/>
425 <expand macro="param_alpha"/>
426 <param argument="snap" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Snap the mesh to pixel boundaries?" help=""/>
427 </section>
428 </when>
429 <when value="pl.clustermap">
430 <param argument="obs_keys" type="text" value="" label="Categorical annotation to plot with a different color map" help="Currently, only a single key is supported."/>
431 <expand macro="param_use_raw"/>
432 <section name="seaborn_clustermap" title="Parameters for seaborn.clustermap">
433 <param name="method" type="select" label="Linkage method to use for calculating clusters" help="More details in https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html">
434 <option value="single">single: Nearest Point Algorithm</option>
435 <option value="complete">complete: Farthest Point Algorithm or Voor Hees Algorithm</option>
436 <option value="average">average: UPGMA algorithm</option>
437 <option value="weighted">weighted: WPGMA algorithm</option>
438 <option value="centroid">centroid: UPGMC algorithm</option>
439 <option value="median">median: WPGMC algorithm</option>
440 <option value="ward">ward: incremental algorithm</option>
441 </param>
442 <param name="metric" type="select" label="Distance metric to use for the data" help="See scipy.spatial.distance.pdist documentation for more options https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.pdist.html">
443 <expand macro="distance_metric_options"/>
444 </param>
445 <param name="z_score" type="select" label="Calculate z-scores for the rows or the columns?" help="Z scores are: z = (x - mean)/std, so values in each row (column) will get the mean of the row (column) subtracted, then divided by the standard deviation of the row (column). This ensures that each row (column) has mean of 0 and variance of 1.">
446 <option value="None">No Z-score</option>
447 <option value="0">Rows</option>
448 <option value="1">Columns</option>
449 </param>
450 <param name="standard_scale" type="select" label="Standardize a dimension?" help="It means for each row or column, subtract the minimum and divide each by its maximum.">
451 <option value="None">No standardization</option>
452 <option value="0">Rows</option>
453 <option value="1">Columns</option>
454 </param>
455 <param name="col_cluster" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Cluster the columns?" help=""/>
456 <param name="row_cluster" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Cluster the rows?" help=""/>
457 </section>
458 </when>
459 <when value="pl.highest_expr_genes">
460 <param argument="n_top" type="integer" min="0" value="30" label="Number of top genes" help=""/>
461 <param argument="gene_symbols" type="text" optional="true" label="Key for field in `.var` that stores gene symbols" help="Fill it if you do not want to use `.var_names`."/>
462 <section name="setseaborn_boxplot" title="Plot settings" expanded="false">
463 <param argument="color" type="text" value="" optional="true" label="Color for all of the elements, or seed for a gradient palette" help=""/>
464 <param argument="palette" type="select" optional="true" label="Colors to use for the different levels of the hue variable" help="See https://seaborn.pydata.org/tutorial/color_palettes.html for more details.">
465 <expand macro="seaborn_color_palette_options"/>
466 </param>
467 <param argument="saturation" type="float" value="1" label="Proportion of the original saturation to draw colors at" help="Large patches often look better with slightly desaturated colors, but set this to 1 if you want the plot colors to perfectly match the input color spec."/>
468 </section>
469 </when>
470 <when value="pl.pca">
471 <expand macro="param_color"/>
472 <expand macro="param_use_raw"/>
473 <expand macro="param_sort_order"/>
474 <expand macro="pl_groups"/>
475 <expand macro="pl_attribute_section"/>
476 <expand macro="section_matplotlib_pyplot_scatter"/>
477 </when>
478 <when value="pl.pca_loadings">
479 <param argument="components" type="text" value="1,2,3" label="Lsit of comma-separated components" help="1, 2, 3 means first, second and third principal components"/>
480 </when>
481 <when value="pl.pca_variance_ratio">
482 <param argument="n_pcs" type="integer" min="0" value="30" label="Number of PCs to show" help=""/>
483 <expand macro="param_log"/>
484 </when>
485 <when value="pl.pca_overview">
486 <expand macro="param_color"/>
487 <expand macro="param_use_raw"/>
488 <expand macro="param_sort_order"/>
489 <expand macro="pl_groups"/>
490 <expand macro="pl_attribute_section"/>
491 <expand macro="section_matplotlib_pyplot_scatter"/>
492 </when>
493 <when value="pl.tsne">
494 <expand macro="param_color"/>
495 <expand macro="param_use_raw"/>
496 <expand macro="pl_edges"/>
497 <expand macro="param_arrows"/>
498 <expand macro="param_sort_order"/>
499 <expand macro="pl_groups"/>
500 <expand macro="pl_attribute_section"/>
501 <expand macro="section_matplotlib_pyplot_scatter"/>
502 </when>
503 <when value="pl.umap">
504 <expand macro="param_color"/>
505 <expand macro="param_use_raw"/>
506 <expand macro="pl_edges"/>
507 <expand macro="param_arrows"/>
508 <expand macro="param_sort_order"/>
509 <expand macro="pl_groups"/>
510 <expand macro="pl_attribute_section"/>
511 <expand macro="section_matplotlib_pyplot_scatter"/>
512 </when>
513 <when value="pl.diffmap">
514 <expand macro="param_color"/>
515 <expand macro="param_use_raw"/>
516 <expand macro="param_sort_order"/>
517 <expand macro="pl_groups"/>
518 <expand macro="pl_attribute_section"/>
519 <expand macro="section_matplotlib_pyplot_scatter"/>
520 </when>
521 <when value="pl.dpt_groups_pseudotime">
522 <expand macro="param_color_map"/>
523 </when>
524 <when value="pl.dpt_timeseries">
525 <conditional name="heatmap">
526 <param argument="as_heatmap" type="select" label="Plot the timeseries as heatmap?" help="">
527 <option value="True">Yes</option>
528 <option value="False">No</option>
529 </param>
530 <when value="True">
531 <expand macro="param_color_map"/>
532 </when>
533 <when value="False" />
534 </conditional>
535 </when>
536 <when value="pl.paga">
537 <expand macro="inputs_paga"/>
538 </when>
539 </conditional>
540 </inputs>
541 <outputs>
542 <data name="out_png" format="png" from_work_dir="*.png" label="${tool.name} on ${on_string}">
543 <filter>format == 'png'</filter>
544 </data>
545 <data name="out_pdf" format="pdf" from_work_dir="*.pdf" label="${tool.name} on ${on_string}">
546 <filter>format == 'pdf'</filter>
547 </data>
548 <data name="out_svg" format="svg" from_work_dir="*.svg" label="${tool.name} on ${on_string}">
549 <filter>format == 'svg'</filter>
550 </data>
551 </outputs>
552 <tests>
553 <test>
554 <!-- Test pl.scatter !-->
555 <conditional name="input">
556 <param name="format" value="h5ad" />
557 <param name="adata" value="pp.pca.krumsiek11.h5ad" />
558 </conditional>
559 <param name="format" value="png"/>
560 <conditional name="method">
561 <param name="method" value="pl.scatter"/>
562 <conditional name="type">
563 <param name="type" value="basis"/>
564 <param name="basis" value="pca"/>
565 <param name="color" value="EgrNab, Gata2"/>
566 </conditional>
567 <param name="use_raw" value="False"/>
568 <param name="sort_order" value="True"/>
569 <section name="plot">
570 <param name="projection" value="2d"/>
571 <param name="legend_loc" value="right margin"/>
572 <param name="legend_fontsize" value="1"/>
573 <param name="legend_fontweight" value="normal"/>
574 <param name="color_map" value="inferno"/>
575 <param name="palette" value="inferno"/>
576 <param name="frameon" value="True"/>
577 <param name="size" value="1"/>
578 </section>
579 </conditional>
580 <assert_stdout>
581 <has_text_matching expression="sc.pl.scatter"/>
582 <has_text_matching expression="basis='pca'" />
583 <has_text_matching expression="color=\['EgrNab', 'Gata2'\]"/>
584 <has_text_matching expression="use_raw=False"/>
585 <has_text_matching expression="sort_order=True"/>
586 <has_text_matching expression="groups=None"/>
587 <has_text_matching expression="components=None"/>
588 <has_text_matching expression="projection='2d'"/>
589 <has_text_matching expression="legend_loc='right margin'"/>
590 <has_text_matching expression="legend_fontsize=1"/>
591 <has_text_matching expression="legend_fontweight='normal'"/>
592 <has_text_matching expression="color_map='inferno'"/>
593 <has_text_matching expression="palette='inferno'"/>
594 <has_text_matching expression="frameon=True"/>
595 <has_text_matching expression="size=1.0"/>
596 </assert_stdout>
597 <output name="out_png" file="pl.scatter.pca.krumsiek11.png" ftype="png" compare="sim_size"/>
598 </test>
599 <test>
600 <!-- Test pl.scatter !-->
601 <conditional name="input">
602 <param name="format" value="h5ad" />
603 <param name="adata" value="krumsiek11.h5ad" />
604 </conditional>
605 <param name="format" value="png"/>
606 <conditional name="method">
607 <param name="method" value="pl.scatter"/>
608 <conditional name="type">
609 <param name="type" value="xy"/>
610 <param name="x" value="EKLF"/>
611 <param name="y" value="Cebpa"/>
612 <param name="layer_x" value="X"/>
613 <param name="layer_y" value="X"/>
614 <param name="layer_color" value="X"/>
615 </conditional>
616 <param name="use_raw" value="False"/>
617 <param name="sort_order" value="True"/>
618 <section name="plot">
619 <param name="projection" value="2d"/>
620 <param name="legend_loc" value="right margin"/>
621 <param name="legend_fontsize" value="1"/>
622 <param name="legend_fontweight" value="normal"/>
623 <param name="palette" value="bwr"/>
624 <param name="frameon" value="False"/>
625 <param name="size" value="1"/>
626 <param name="title" value="A title"/>
627 </section>
628 </conditional>
629 <assert_stdout>
630 <has_text_matching expression="sc.pl.scatter"/>
631 <has_text_matching expression="x='EKLF'" />
632 <has_text_matching expression="y='Cebpa'"/>
633 <has_text_matching expression="layers=\('X', 'X', 'X'\)"/>
634 <has_text_matching expression="use_raw=False"/>
635 <has_text_matching expression="sort_order=True"/>
636 <has_text_matching expression="groups=None,"/>
637 <has_text_matching expression="components=None,"/>
638 <has_text_matching expression="projection='2d'"/>
639 <has_text_matching expression="legend_loc='right margin'"/>
640 <has_text_matching expression="legend_fontsize=1"/>
641 <has_text_matching expression="legend_fontweight='normal'"/>
642 <has_text_matching expression="color_map='viridis'"/>
643 <has_text_matching expression="palette='bwr'"/>
644 <has_text_matching expression="frameon=False"/>
645 <has_text_matching expression="size=1.0"/>
646 <has_text_matching expression="title='A title'"/>
647 </assert_stdout>
648 <output name="out_png" file="pl.scatter.krumsiek11.png" ftype="png" compare="sim_size"/>
649 </test>
650 <test>
651 <!-- test pl.heatmap !-->
652 <conditional name="input">
653 <param name="format" value="h5ad" />
654 <param name="adata" value="krumsiek11.h5ad" />
655 </conditional>
656 <param name="format" value="png"/>
657 <conditional name="method">
658 <param name="method" value="pl.heatmap"/>
659 <conditional name="var_names">
660 <param name="type" value="all"/>
661 </conditional>
662 <param name="groupby" value="cell_type"/>
663 <param name="log" value="False"/>
664 <param name="use_raw" value="False"/>
665 <param name="num_categories" value="7"/>
666 <conditional name="figsize">
667 <param name="test" value="yes"/>
668 <param name="width" value="10" />
669 <param name="height" value="3"/>
670 </conditional>
671 <param name="dendrogram" value="True"/>
672 <param name="swap_axes" value="True"/>
673 <param name="show_gene_labels" value="False"/>
674 <section name="matplotlib_pyplot_imshow">
675 <param name="cmap" value="YlGnBu"/>
676 <param name="interpolation" value="none"/>
677 <param name="origin" value="upper"/>
678 </section>
679 </conditional>
680 <assert_stdout>
681 <has_text_matching expression="sc.pl.heatmap"/>
682 <has_text_matching expression="var_names=adata.var_names" />
683 <has_text_matching expression="groupby='cell_type'"/>
684 <has_text_matching expression="log=False"/>
685 <has_text_matching expression="use_raw=False"/>
686 <has_text_matching expression="num_categories=7"/>
687 <has_text_matching expression="dendrogram=True"/>
688 <has_text_matching expression="var_group_positions=None"/>
689 <has_text_matching expression="var_group_labels=None"/>
690 <has_text_matching expression="figsize=\(10, 3\)"/>
691 <has_text_matching expression="swap_axes=True"/>
692 <has_text_matching expression="show_gene_labels=False"/>
693 <has_text_matching expression="interpolation='none'"/>
694 <has_text_matching expression="cmap='YlGnBu'"/>
695 <has_text_matching expression="origin='upper'"/>
696 </assert_stdout>
697 <output name="out_png" file="pl.heatmap.krumsiek11.png" ftype="png" compare="sim_size"/>
698 </test>
699 <test>
700 <!-- test pl.dotplot !-->
701 <conditional name="input">
702 <param name="format" value="h5ad" />
703 <param name="adata" value="pbmc68k_reduced.h5ad" />
704 </conditional>
705 <param name="format" value="png"/>
706 <conditional name="method">
707 <param name="method" value="pl.dotplot"/>
708 <conditional name="var_names">
709 <param name="type" value="custom"/>
710 <param name="var_names" value="CD79A, MS4A1, CD8A, CD8B, LYZ, GNLY, NKG7, RP3-467N11.1, FCGR3A, FCER1A, CST3, POU2AF1, LINC00402"/>
711 </conditional>
712 <param name="groupby" value="louvain"/>
713 <param name="log" value="False"/>
714 <param name="use_raw" value="False"/>
715 <param name="num_categories" value="7"/>
716 <param name="dendrogram" value="True"/>
717 <conditional name="figsize">
718 <param name="test" value="no"/>
719 </conditional>
720 <param name="dendrogram" value="False"/>
721 <repeat name="var_group_positions">
722 <param name="start" value="0"/>
723 <param name="end" value="1"/>
724 <param name="label" value="B cells"/>
725 </repeat>
726 <repeat name="var_group_positions">
727 <param name="start" value="11"/>
728 <param name="end" value="12"/>
729 <param name="label" value="dendritic"/>
730 </repeat>
731 <param name="color_map" value="hot"/>
732 <param name="dot_max" value="0.7"/>
733 <param name="dot_min" value="0.1"/>
734 <section name="matplotlib_pyplot_scatter">
735 <param name="linewidths" value="0" />
736 <param name="edgecolors" value="face"/>
737 </section>
738 </conditional>
739 <assert_stdout>
740 <has_text_matching expression="sc.pl.dotplot"/>
741 <has_text_matching expression="var_names=\['CD79A', 'MS4A1', 'CD8A', 'CD8B', 'LYZ', 'GNLY', 'NKG7', 'RP3-467N11.1', 'FCGR3A', 'FCER1A', 'CST3', 'POU2AF1', 'LINC00402'\]" />
742 <has_text_matching expression="groupby='louvain'"/>
743 <has_text_matching expression="log=False"/>
744 <has_text_matching expression="use_raw=False"/>
745 <has_text_matching expression="num_categories=7"/>
746 <has_text_matching expression="dendrogram=False"/>
747 <has_text_matching expression="var_group_positions=\[\(0, 1\), \(11, 12\)\]"/>
748 <has_text_matching expression="var_group_labels=\['B cells', 'dendritic'\]"/>
749 <has_text_matching expression="color_map='hot'"/>
750 <has_text_matching expression="dot_max=0.7"/>
751 <has_text_matching expression="dot_min=0.1"/>
752 <has_text_matching expression="linewidths=0.0"/>
753 <has_text_matching expression="edgecolors='face'"/>
754 </assert_stdout>
755 <output name="out_png" file="pl.dotplot.krumsiek11.png" ftype="png" compare="sim_size"/>
756 </test>
757 <test>
758 <!-- test pl.violin !-->
759 <conditional name="input">
760 <param name="format" value="h5ad" />
761 <param name="adata" value="pbmc68k_reduced.h5ad" />
762 </conditional>
763 <param name="format" value="png"/>
764 <conditional name="method">
765 <param name="method" value="pl.violin"/>
766 <conditional name="key_variables">
767 <param name="type" value="custom"/>
768 <param name="keys" value="n_genes, percent_mito, n_counts" />
769 </conditional>
770 <param name="log" value="False"/>
771 <param name="use_raw" value="False"/>
772 <section name="violin_plot">
773 <conditional name="stripplot">
774 <param name="stripplot" value="True"/>
775 <param name="jitter" value="True"/>
776 <param name="size" value="1"/>
777 </conditional>
778 <conditional name="multi_panel">
779 <param name="multi_panel" value="True"/>
780 <param name="width" value="20"/>
781 <param name="height" value="20"/>
782 </conditional>
783 <param name="scale" value="width"/>
784 </section>
785 <section name="seaborn_violinplot">
786 <param name="bw" value="scott"/>
787 <param name="linewidth" value="0"/>
788 <param name="color" value="AliceBlue"/>
789 <param name="palette" value="viridis"/>
790 <param name="saturation" value="0.75"/>
791 </section>
792 </conditional>
793 <assert_stdout>
794 <has_text_matching expression="sc.pl.violin"/>
795 <has_text_matching expression="keys=\['n_genes', 'percent_mito', 'n_counts'\]" />
796 <has_text_matching expression="log=False"/>
797 <has_text_matching expression="use_raw=False"/>
798 <has_text_matching expression="sstripplot=True"/>
799 <has_text_matching expression="jitter=True"/>
800 <has_text_matching expression="size=1"/>
801 <has_text_matching expression="multi_panel=True"/>
802 <has_text_matching expression="scale='width'"/>
803 <has_text_matching expression="bw='scott'"/>
804 <has_text_matching expression="scale='width'"/>
805 <has_text_matching expression="linewidth=0.0"/>
806 <has_text_matching expression="color='AliceBlue'"/>
807 <has_text_matching expression="palette='viridis'"/>
808 <has_text_matching expression="saturation=0.75"/>
809 </assert_stdout>
810 <output name="out_png" file="pl.violin.pbmc68k_reduced_custom.png" ftype="png" compare="sim_size"/>
811 </test>
812 <test>
813 <!-- test pl.matrixplot !-->
814 <conditional name="input">
815 <param name="format" value="h5ad" />
816 <param name="adata" value="krumsiek11.h5ad" />
817 </conditional>
818 <param name="format" value="png"/>
819 <conditional name="method">
820 <param name="method" value="pl.matrixplot"/>
821 <conditional name="var_names">
822 <param name="type" value="all"/>
823 </conditional>
824 <param name="groupby" value="cell_type"/>
825 <param name="log" value="False"/>
826 <param name="use_raw" value="False"/>
827 <param name="num_categories" value="7"/>
828 <param name="dendrogram" value="True"/>
829 <conditional name="figsize">
830 <param name="test" value="no"/>
831 </conditional>
832 <param name="swap_axes" value="True"/>
833 <section name="matplotlib_pyplot_pcolor">
834 <param name="cmap" value="viridis"/>
835 <param name="edgecolors" value="face"/>
836 <param name="snap" value="False"/>
837 </section>
838 </conditional>
839 <assert_stdout>
840 <has_text_matching expression="sc.pl.matrixplot"/>
841 <has_text_matching expression="var_names=adata.var_names" />
842 <has_text_matching expression="groupby='cell_type'"/>
843 <has_text_matching expression="log=False"/>
844 <has_text_matching expression="use_raw=False"/>
845 <has_text_matching expression="num_categories=7"/>
846 <has_text_matching expression="dendrogram=True"/>
847 <has_text_matching expression="var_group_positions=None"/>
848 <has_text_matching expression="var_group_labels=None"/>
849 <has_text_matching expression="swap_axes=True"/>
850 <has_text_matching expression="cmap='viridis'"/>
851 <has_text_matching expression="edgecolors='face'"/>
852 <has_text_matching expression="snap=False"/>
853 </assert_stdout>
854 <output name="out_png" file="pl.matrixplot.krumsiek11.png" ftype="png" compare="sim_size"/>
855 </test>
856 <test>
857 <!-- test pl.clustermap !-->
858 <conditional name="input">
859 <param name="format" value="h5ad" />
860 <param name="adata" value="krumsiek11.h5ad" />
861 </conditional>
862 <param name="format" value="png"/>
863 <conditional name="method">
864 <param name="method" value="pl.clustermap"/>
865 <param name="obs_keys" value="cell_type"/>
866 <param name="use_raw" value="False"/>
867 <section name="seaborn_clustermap">
868 <param name="method" value="single"/>
869 <param name="metric" value="braycurtis"/>
870 <param name="z_score" value="None"/>
871 <param name="standard_scale" value="None"/>
872 <param name="col_cluster" value="False"/>
873 <param name="row_cluster" value="False"/>
874 </section>
875 </conditional>
876 <assert_stdout>
877 <has_text_matching expression="sc.pl.clustermap"/>
878 <has_text_matching expression="adata=adata" />
879 <has_text_matching expression="obs_keys='cell_type'" />
880 <has_text_matching expression="use_raw=False"/>
881 <has_text_matching expression="method='single'"/>
882 <has_text_matching expression="metric='braycurtis'"/>
883 <has_text_matching expression="z_score=None"/>
884 <has_text_matching expression="standard_scale=None"/>
885 <has_text_matching expression="col_cluster=False"/>
886 <has_text_matching expression="row_cluster=False"/>
887 </assert_stdout>
888 <output name="out_png" file="pl.clustermap.krumsiek11.png" ftype="png" compare="sim_size"/>
889 </test>
890 <test>
891 <!-- test pl.highest_expr_genes !-->
892 <conditional name="input">
893 <param name="format" value="h5ad" />
894 <param name="adata" value="pp.filter_genes_dispersion.krumsiek11-seurat.h5ad" />
895 </conditional>
896 <param name="format" value="png"/>
897 <conditional name="method">
898 <param name="method" value="pl.highest_expr_genes"/>
899 <param name="n_top" value="30"/>
900 <param name="gene_symbols" value="means"/>
901 <section name="setseaborn_boxplot">
902 <param name="color" value="blue"/>
903 <param name="saturation" value="0.5"/>
904 </section>
905 </conditional>
906 <assert_stdout>
907 <has_text_matching expression="sc.pl.highest_expr_genes"/>
908 <has_text_matching expression="n_top=30" />
909 <has_text_matching expression="gene_symbols='means'" />
910 <has_text_matching expression="color='blue'"/>
911 <has_text_matching expression="saturation=0.5"/>
912 </assert_stdout>
913 <output name="out_png" file="pl.highest_expr_genes.filter_genes_dispersion.krumsiek11-seurat.png" ftype="png" compare="sim_size"/>
914 </test>
915 <test>
916 <!-- test pl.pca !-->
917 <conditional name="input">
918 <param name="format" value="h5ad" />
919 <param name="adata" value="pbmc68k_reduced.h5ad" />
920 </conditional>
921 <param name="format" value="pdf"/>
922 <conditional name="method">
923 <param name="method" value="pl.pca"/>
924 <param name="color" value="CD3D,CD79A"/>
925 <param name="use_raw" value="False"/>
926 <param name="sort_order" value="True"/>
927 <section name="plot">
928 <repeat name="components">
929 <param name="axis1" value="1"/>
930 <param name="axis2" value="2"/>
931 </repeat>
932 <repeat name="components">
933 <param name="axis1" value="1"/>
934 <param name="axis2" value="3"/>
935 </repeat>
936 <param name="projection" value="2d"/>
937 <param name="legend_loc" value="right margin"/>
938 <param name="legend_fontsize" value="1"/>
939 <param name="legend_fontweight" value="normal"/>
940 <param name="size" value="1"/>
941 <param name="palette" value="viridis"/>
942 <param name="frameon" value="True"/>
943 <param name="ncols" value="2"/>
944 <param name="wspace" value="0.1"/>
945 <param name="hspace" value="0.25"/>
946 </section>
947 <section name="matplotlib_pyplot_scatter">
948 <param name="linewidths" value="0"/>
949 <param name="edgecolors" value="face"/>
950 </section>
951 </conditional>
952 <assert_stdout>
953 <has_text_matching expression="sc.pl.pca"/>
954 <has_text_matching expression="save='.pdf'" />
955 <has_text_matching expression="color=\['CD3D', 'CD79A'\]" />
956 <has_text_matching expression="use_raw=False" />
957 <has_text_matching expression="sort_order=True" />
958 <has_text_matching expression="groups=None" />
959 <has_text_matching expression="components=\['1,2', '1,3'\]" />
960 <has_text_matching expression="projection='2d'" />
961 <has_text_matching expression="legend_loc='right margin'" />
962 <has_text_matching expression="legend_fontsize=1" />
963 <has_text_matching expression="legend_fontweight='normal'" />
964 <has_text_matching expression="size=1.0" />
965 <has_text_matching expression="palette='viridis'" />
966 <has_text_matching expression="frameon=True" />
967 <has_text_matching expression="ncols=2" />
968 <has_text_matching expression="wspace=0.1" />
969 <has_text_matching expression="hspace=0.25" />
970 <has_text_matching expression="linewidths=0.0" />
971 <has_text_matching expression="edgecolors='face" />
972 </assert_stdout>
973 <output name="out_pdf" file="pl.pca.pbmc68k_reduced.CD3D_CD79A_components_2d.pdf" ftype="pdf" compare="sim_size"/>
974 </test>
975 <test>
976 <!-- test pl.pca_loadings !-->
977 <conditional name="input">
978 <param name="format" value="h5ad" />
979 <param name="adata" value="pp.pca.krumsiek11.h5ad" />
980 </conditional>
981 <param name="format" value="png"/>
982 <conditional name="method">
983 <param name="method" value="pl.pca_loadings"/>
984 <param name="components" value="1,2,3"/>
985 </conditional>
986 <assert_stdout>
987 <has_text_matching expression="sc.pl.pca_loadings"/>
988 <has_text_matching expression="components=\[1, 2, 3\]" />
989 </assert_stdout>
990 <output name="out_png" file="pl.pca_loadings.pp.pca.krumsiek11.png"/>
991 </test>
992 <test>
993 <!-- test pl.pca_variance_ratio !-->
994 <conditional name="input">
995 <param name="format" value="h5ad" />
996 <param name="adata" value="pp.pca.krumsiek11.h5ad" />
997 </conditional>
998 <param name="format" value="png"/>
999 <conditional name="method">
1000 <param name="method" value="pl.pca_variance_ratio"/>
1001 <param name="n_pcs" value="5"/>
1002 <param name="log" value="False"/>
1003 </conditional>
1004 <assert_stdout>
1005 <has_text_matching expression="sc.pl.pca_variance_ratio"/>
1006 <has_text_matching expression="n_pcs=5" />
1007 <has_text_matching expression="log=False" />
1008 </assert_stdout>
1009 <output name="out_png" file="pl.pca_variance_ratio.pp.pca.krumsiek11.png"/>
1010 </test>
1011 <test>
1012 <!-- test pl.pca_overview !-->
1013 <conditional name="input">
1014 <param name="format" value="h5ad" />
1015 <param name="adata" value="pp.pca.krumsiek11.h5ad" />
1016 </conditional>
1017 <param name="format" value="png"/>
1018 <conditional name="method">
1019 <param name="method" value="pl.pca_overview"/>
1020 <param name="color" value="cell_type"/>
1021 <param name="use_raw" value="False"/>
1022 <param name="sort_order" value="True"/>
1023 <section name="plot">
1024 <param name="projection" value="3d"/>
1025 <param name="legend_loc" value="right margin"/>
1026 <param name="legend_fontsize" value="1"/>
1027 <param name="legend_fontweight" value="normal"/>
1028 <param name="size" value="1"/>
1029 <param name="palette" value="viridis"/>
1030 <param name="frameon" value="True"/>
1031 <param name="ncols" value="4"/>
1032 <param name="wspace" value="0.1"/>
1033 <param name="hspace" value="0.25"/>
1034 </section>
1035 <section name="matplotlib_pyplot_scatter">
1036 <param name="linewidths" value="0"/>
1037 <param name="edgecolors" value="face"/>
1038 <param name="vmin" value="-5"/>
1039 <param name="vmax" value="5"/>
1040 <param name="edgecolors" value="face"/>
1041 </section>
1042 </conditional>
1043 <assert_stdout>
1044 <has_text_matching expression="sc.pl.pca_overview"/>
1045 <has_text_matching expression="color=\['cell_type'\]"/>
1046 <has_text_matching expression="use_raw=False"/>
1047 <has_text_matching expression="sort_order=True"/>
1048 <has_text_matching expression="groups=None"/>
1049 <has_text_matching expression="components=None"/>
1050 <has_text_matching expression="projection='3d'"/>
1051 <has_text_matching expression="legend_loc='right margin'"/>
1052 <has_text_matching expression="legend_fontsize=1"/>
1053 <has_text_matching expression="legend_fontweight='normal'"/>
1054 <has_text_matching expression="size=1.0"/>
1055 <has_text_matching expression="palette='viridis'"/>
1056 <has_text_matching expression="frameon=True"/>
1057 <has_text_matching expression="ncols=4"/>
1058 <has_text_matching expression="wspace=0.1"/>
1059 <has_text_matching expression="hspace=0.25"/>
1060 <has_text_matching expression="vmin=-5.0"/>
1061 <has_text_matching expression="vmax=5.0"/>
1062 <has_text_matching expression="linewidths=0.0"/>
1063 <has_text_matching expression="edgecolors='face'"/>
1064 </assert_stdout>
1065 <output name="out_png" file="pl.pca_overview.pp.pca.krumsiek11.png" compare="sim_size"/>
1066 </test>
1067 <test>
1068 <!-- test pl.tsne !-->
1069 <conditional name="input">
1070 <param name="format" value="h5ad" />
1071 <param name="adata" value="tl.tsne.krumsiek11.h5ad" />
1072 </conditional>
1073 <param name="format" value="png"/>
1074 <conditional name="method">
1075 <param name="method" value="pl.tsne"/>
1076 <param name="use_raw" value="False"/>
1077 <conditional name="edges">
1078 <param name="edges" value="False" />
1079 </conditional>
1080 <param name="arrows" value="False" />
1081 <param name="sort_order" value="True"/>
1082 <section name="plot">
1083 <param name="projection" value="2d"/>
1084 <param name="legend_loc" value="right margin"/>
1085 <param name="legend_fontsize" value="1"/>
1086 <param name="legend_fontweight" value="normal"/>
1087 <param name="palette" value="viridis"/>
1088 <param name="frameon" value="True"/>
1089 <param name="size" value="1"/>
1090 <param name="ncols" value="4"/>
1091 <param name="wspace" value="0.1"/>
1092 <param name="hspace" value="0.25"/>
1093 </section>
1094 <section name="matplotlib_pyplot_scatter">
1095 <param name="linewidths" value="0"/>
1096 <param name="edgecolors" value="face"/>
1097 </section>
1098 </conditional>
1099 <assert_stdout>
1100 <has_text_matching expression="sc.pl.tsne"/>
1101 <has_text_matching expression="color=None"/>
1102 <has_text_matching expression="use_raw=False"/>
1103 <has_text_matching expression="edges=False"/>
1104 <has_text_matching expression="arrows=False"/>
1105 <has_text_matching expression="sort_order=True"/>
1106 <has_text_matching expression="groups=None"/>
1107 <has_text_matching expression="components=None"/>
1108 <has_text_matching expression="projection='2d'"/>
1109 <has_text_matching expression="legend_loc='right margin'"/>
1110 <has_text_matching expression="legend_fontsize=1"/>
1111 <has_text_matching expression="legend_fontweight='normal'"/>
1112 <has_text_matching expression="size=1.0"/>
1113 <has_text_matching expression="palette='viridis'"/>
1114 <has_text_matching expression="frameon=True"/>
1115 <has_text_matching expression="ncols=4"/>
1116 <has_text_matching expression="wspace=0.1"/>
1117 <has_text_matching expression="hspace=0.25"/>
1118 <has_text_matching expression="linewidths=0.0"/>
1119 <has_text_matching expression="edgecolors='face'"/>
1120 </assert_stdout>
1121 <output name="out_png" file="pl.tsne.krumsiek11.png" ftype="png" compare="sim_size"/>
1122 </test>
1123 <test>
1124 <!-- test pl.umap !-->
1125 <conditional name="input">
1126 <param name="format" value="h5ad" />
1127 <param name="adata" value="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
1128 </conditional>
1129 <param name="format" value="png"/>
1130 <conditional name="method">
1131 <param name="method" value="pl.umap"/>
1132 <param name="color" value="paul15_clusters"/>
1133 <param name="use_raw" value="False"/>
1134 <conditional name="edges">
1135 <param name="edges" value="True" />
1136 <param name="edges_width" value="0.1" />
1137 <param name="edges_color" value="AliceBlue"/>
1138 </conditional>
1139 <param name="arrows" value="False" />
1140 <section name="plot">
1141 <param name="projection" value="2d"/>
1142 <param name="legend_loc" value="right margin"/>
1143 <param name="legend_fontsize" value="1"/>
1144 <param name="legend_fontweight" value="normal"/>
1145 <param name="size" value="1"/>
1146 <param name="palette" value="viridis"/>
1147 <param name="frameon" value="True"/>
1148 <param name="ncols" value="4"/>
1149 <param name="wspace" value="0.1"/>
1150 <param name="hspace" value="0.25"/>
1151 </section>
1152 <section name="matplotlib_pyplot_scatter">
1153 <param name="linewidths" value="0"/>
1154 <param name="edgecolors" value="face"/>
1155 </section>
1156 </conditional>
1157 <assert_stdout>
1158 <has_text_matching expression="sc.pl.umap"/>
1159 <has_text_matching expression="color=\['paul15_clusters'\]"/>
1160 <has_text_matching expression="use_raw=False"/>
1161 <has_text_matching expression="edges=True"/>
1162 <has_text_matching expression="edges_width=0.1"/>
1163 <has_text_matching expression="edges_color='AliceBlue'"/>
1164 <has_text_matching expression="arrows=False"/>
1165 <has_text_matching expression="sort_order=True"/>
1166 <has_text_matching expression="groups=None"/>
1167 <has_text_matching expression="components=None"/>
1168 <has_text_matching expression="projection='2d'"/>
1169 <has_text_matching expression="legend_loc='right margin'"/>
1170 <has_text_matching expression="legend_fontsize=1"/>
1171 <has_text_matching expression="legend_fontweight='normal'"/>
1172 <has_text_matching expression="size=1.0"/>
1173 <has_text_matching expression="palette='viridis'"/>
1174 <has_text_matching expression="frameon=True"/>
1175 <has_text_matching expression="ncols=4"/>
1176 <has_text_matching expression="wspace=0.1"/>
1177 <has_text_matching expression="hspace=0.25"/>
1178 <has_text_matching expression="linewidths=0.0"/>
1179 <has_text_matching expression="edgecolors='face'"/>
1180 </assert_stdout>
1181 <output name="out_png" file="pl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
1182 </test>
1183 <test>
1184 <!-- test pl.diffmap !-->
1185 <conditional name="input">
1186 <param name="format" value="h5ad" />
1187 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
1188 </conditional>
1189 <param name="format" value="png"/>
1190 <conditional name="method">
1191 <param name="method" value="pl.diffmap"/>
1192 <param name="color" value="paul15_clusters"/>
1193 <param name="use_raw" value="False"/>
1194 <param name="sort_order" value="True"/>
1195 <section name="plot">
1196 <param name="projection" value="2d"/>
1197 <param name="legend_loc" value="right margin"/>
1198 <param name="legend_fontsize" value="1"/>
1199 <param name="legend_fontweight" value="normal"/>
1200 <param name="size" value="1"/>
1201 <param name="palette" value="viridis"/>
1202 <param name="frameon" value="True"/>
1203 <param name="ncols" value="4"/>
1204 <param name="wspace" value="0.1"/>
1205 <param name="hspace" value="0.25"/>
1206 </section>
1207 <section name="matplotlib_pyplot_scatter">
1208 <param name="linewidths" value="0"/>
1209 <param name="edgecolors" value="face"/>
1210 </section>
1211 </conditional>
1212 <assert_stdout>
1213 <has_text_matching expression="sc.pl.diffmap"/>
1214 <has_text_matching expression="color=\['paul15_clusters'\]"/>
1215 <has_text_matching expression="use_raw=False"/>
1216 <has_text_matching expression="sort_order=True"/>
1217 <has_text_matching expression="groups=None"/>
1218 <has_text_matching expression="components=None"/>
1219 <has_text_matching expression="projection='2d'"/>
1220 <has_text_matching expression="legend_loc='right margin'"/>
1221 <has_text_matching expression="legend_fontsize=1"/>
1222 <has_text_matching expression="legend_fontweight='normal'"/>
1223 <has_text_matching expression="size=1.0"/>
1224 <has_text_matching expression="palette='viridis'"/>
1225 <has_text_matching expression="frameon=True"/>
1226 <has_text_matching expression="ncols=4"/>
1227 <has_text_matching expression="wspace=0.1"/>
1228 <has_text_matching expression="hspace=0.25"/>
1229 <has_text_matching expression="linewidths=0.0"/>
1230 <has_text_matching expression="edgecolors='face'"/>
1231 </assert_stdout>
1232 <output name="out_png" file="pl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
1233 </test>
1234 <!--<test>
1235 < test pl.dpt_groups_pseudotime >
1236 <conditional name="input">
1237 <param name="format" value="h5ad" />
1238 <param name="adata" value="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
1239 </conditional>
1240 <param name="format" value="png"/>
1241 <conditional name="method">
1242 <param name="method" value="pl.dpt_groups_pseudotime"/>
1243 <param name="color_map" value="viridis"/>
1244 </conditional>
1245 <assert_stdout>
1246 <has_text_matching expression="sc.pl.dpt_groups_pseudotime"/>
1247 <has_text_matching expression="color_map='viridis'"/>
1248 </assert_stdout>
1249 <output name="out_png" file="pl.dpt_groups_pseudotime.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
1250 </test>!-->
1251 <test>
1252 <!-- test pl.dpt_timeseries !-->
1253 <conditional name="input">
1254 <param name="format" value="h5ad" />
1255 <param name="adata" value="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
1256 </conditional>
1257 <param name="format" value="png"/>
1258 <conditional name="method">
1259 <param name="method" value="pl.dpt_timeseries"/>
1260 <conditional name="heatmap">
1261 <param name="as_heatmap" value="True"/>
1262 <param name="color_map" value="viridis"/>
1263 </conditional>
1264 </conditional>
1265 <assert_stdout>
1266 <has_text_matching expression="sc.pl.dpt_timeseries"/>
1267 <has_text_matching expression="color_map='viridis'"/>
1268 <has_text_matching expression="as_heatmap=True"/>
1269 </assert_stdout>
1270 <output name="out_png" file="pl.dpt_timeseries.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
1271 </test>
1272 <!--<test>
1273 test pl.paga
1274 <conditional name="input">
1275 <param name="format" value="h5ad" />
1276 <param name="adata" value="tl.paga.neighbors.paul15_gauss_braycurtis.h5ad" />
1277 </conditional>
1278 <param name="format" value="png"/>
1279 <conditional name="method">
1280 <param name="method" value="pl.paga"/>
1281 <param name="threshold" value="0.01"/>
1282 <param name="color" value="paul15_clusters"/>
1283 <param name="labels" value="label" />
1284 <param name="layout" value="fr"/>
1285 <param name="random_state" value="0"/>
1286 <param name="solid_edges" value="connectivities"/>
1287 <param name="single_component" value="False"/>
1288 <param name="fontsize" value="1"/>
1289 <param name="node_size_scale" value="1.0"/>
1290 <param name="node_size_power" value="0.5"/>
1291 <param name="edge_width_scale" value="5"/>
1292 <param name="arrowsize" value="30"/>
1293 <param name="normalize_to_color" value="False"/>
1294 <param name="cmap" value="viridis"/>
1295 <param name="frameon" value="True"/>
1296 </conditional>
1297 <output name="out_png" file="pl.paga.paul15_gauss_braycurtis.png" ftype="png" compare="sim_size"/>
1298 </test>!-->
1299 </tests>
1300 <help><![CDATA[
1301 Generic: Scatter plot along observations or variables axes (`pl.scatter`)
1302 =========================================================================
1303
1304 Color the plot using annotations of observations (`.obs`), variables
1305 (`.var`) or expression of genes (`.var_names`).
1306
1307 More details on the `scanpy documentation
1308 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.scatter.html>`__
1309
1310 Generic: Heatmap of the expression values of set of genes (`pl.heatmap`)
1311 ========================================================================
1312
1313 If `groupby` is given, the heatmap is ordered by the respective group. For
1314 example, a list of marker genes can be plotted, ordered by clustering. If
1315 the `groupby` observation annotation is not categorical the observation
1316 annotation is turned into a categorical by binning the data into the number
1317 specified in `num_categories`.
1318
1319 More details on the `scanpy documentation
1320 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.heatmap.html>`__
1321
1322 Generic: Makes a dot plot of the expression values (`pl.dotplot`)
1323 =================================================================
1324
1325 For each var_name and each `groupby` category a dot is plotted. Each dot
1326 represents two values: mean expression within each category (visualized by
1327 color) and fraction of cells expressing the var_name in the
1328 category. (visualized by the size of the dot). If groupby is not given, the
1329 dotplot assumes that all data belongs to a single category. A gene is not
1330 considered expressed if the expression value in the adata (or adata.raw) is
1331 equal to zero.
1332
1333 For instance, for each marker gene, the mean value and the percentage of cells
1334 expressing the gene can be visualized for each cluster.
1335
1336 More details on the `scanpy documentation
1337 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dotplot.html>`__
1338
1339 Generic: Violin plot (`pl.violin`)
1340 ==================================
1341
1342 Wraps `seaborn.violinplot` for `anndata.AnnData`.
1343
1344 More details on the `scanpy documentation
1345 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.stacked_violin.html>`__
1346
1347 Generic: Heatmap of the mean expression values per cluster (`pl.matrixplot`)
1348 ============================================================================
1349
1350 Creates a heatmap of the mean expression values per cluster of each var_names
1351
1352 If groupby is not given, the matrixplot assumes that all data belongs to a single
1353 category.
1354
1355 More details on the `scanpy documentation
1356 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.matrixplot.html>`__
1357
1358 Generic: Hierarchically-clustered heatmap (`pl.clustermap`)
1359 ===========================================================
1360
1361 Wraps `seaborn.clustermap
1362 <https://seaborn.pydata.org/generated/seaborn.clustermap.html>`__ for
1363 `anndata.AnnData`.
1364
1365 The returned object has a savefig() method that should be used if you want
1366 to save the figure object without clipping the dendrograms.
1367
1368 To access the reordered row indices, use:
1369 clustergrid.dendrogram_row.reordered_ind
1370
1371 Column indices, use: clustergrid.dendrogram_col.reordered_ind
1372
1373 More details on the `scanpy documentation
1374 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.clustermap.html>`__
1375
1376 Preprocessing: Plot the fraction of counts assigned to each gene over all cells (`pl.highest_expr_genes`)
1377 =========================================================================================================
1378
1379 Computes, for each gene, the fraction of counts assigned to that gene within
1380 a cell. The `n_top` genes with the highest mean fraction over all cells are
1381 plotted as boxplots.
1382
1383 This plot is similar to the `scater` package function `plotHighestExprs(type= "highest-expression")`, see `here
1384 <https://bioconductor.org/packages/devel/bioc/vignettes/scater/inst/doc/vignette-qc.html>`__.
1385 -- Davis McCarthy and Aaron Lun
1386
1387 More details on the `scanpy documentation
1388 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.highest_expr_genes.html>`__
1389
1390 PCA: Scatter plot in PCA coordinates (`pl.pca`)
1391 ===============================================
1392
1393 More details on the `scanpy documentation
1394 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca.html>`__
1395
1396 PCA: Rank genes according to contributions to PCs (`pl.pca_loadings`)
1397 =====================================================================
1398
1399 More details on the `scanpy documentation
1400 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_loadings.html>`__
1401
1402 PCA: Plot the variance ratio (`pl.pca_variance_ratio`)
1403 ======================================================
1404
1405 More details on the `scanpy documentation
1406 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_variance_ratio.html>`__
1407
1408 PCA: Plot PCA results (`pl.pca_overview`)
1409 =========================================
1410
1411 The parameters are the ones of the scatter plot. Call pca_ranking separately
1412 if you want to change the default settings.
1413
1414 More details on the `scanpy documentation
1415 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_overview.html>`__
1416
1417 Embedding: Scatter plot in tSNE basis (`pl.tsne`)
1418 =================================================
1419
1420 More details on the `scanpy documentation
1421 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.tsne.html>`__
1422
1423 Embeddings: Scatter plot in UMAP basis (`pl.umap`)
1424 ==================================================
1425
1426 More details on the `scanpy documentation
1427 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.umap.html>`__
1428
1429 Embeddings: Scatter plot in Diffusion Map basis (`pl.diffmap`)
1430 ==============================================================
1431
1432 More details on the `scanpy documentation
1433 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.diffmap.html>`__
1434
1435 Branching trajectories and pseudotime, clustering: Plot groups and pseudotime (`pl.dpt_groups_pseudotime`)
1436 ===========================================================================================================
1437
1438 More details on the `scanpy documentation
1439 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dpt_groups_pseudotime.html>`__
1440
1441 Branching trajectories and pseudotime, clustering: Heatmap of pseudotime series (`pl.dpt_timeseries`)
1442 =====================================================================================================
1443
1444 More details on the `scanpy documentation
1445 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dpt_timeseries.html>`__
1446
1447
1448 Branching trajectories and pseudotime, clustering: Plot the abstracted graph through thresholding low-connectivity edges (`pl.paga`)
1449 ====================================================================================================================================
1450
1451 This uses ForceAtlas2 or igraph's layout algorithms for most layouts.
1452
1453 When initializing the positions, note that - for some reason - igraph
1454 mirrors coordinates along the x axis... that is, you should increase the
1455 `maxiter` parameter by 1 if the layout is flipped.
1456
1457 More details on the `scanpy documentation
1458 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.paga.html>`__
1459
1460
1461 ]]></help>
1462 <expand macro="citations"/>
1463 </tool>