comparison macros.xml @ 17:178242b82297 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 91121b1e72696f17478dae383badaa71e9f96dbb
author iuc
date Sat, 14 Sep 2024 12:45:46 +0000
parents f9353ee6a0d4
children 38db3fef7aad
comparison
equal deleted inserted replaced
16:f9353ee6a0d4 17:178242b82297
1 <macros> 1 <macros>
2 <token name="@TOOL_VERSION@">1.9.6</token> 2 <token name="@TOOL_VERSION@">1.10.2</token>
3 <token name="@VERSION_SUFFIX@">4</token> 3 <token name="@VERSION_SUFFIX@">0</token>
4 <token name="@profile@">21.09</token> 4 <token name="@PROFILE@">21.09</token>
5 <xml name="requirements"> 5 <xml name="requirements">
6 <requirements> 6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">scanpy</requirement> 7 <requirement type="package" version="@TOOL_VERSION@">scanpy</requirement>
8 <requirement type="package" version="3.0.6">loompy</requirement> 8 <requirement type="package" version="0.10.3">anndata</requirement>
9 <requirement type="package" version="0.10.1">leidenalg</requirement> 9 <requirement type="package" version="1.26.4">numpy</requirement>
10 <requirement type="package" version="0.8.1">louvain</requirement> 10 <requirement type="package" version="2.2.2">pandas</requirement>
11 <requirement type="package" version="1.5.3">pandas</requirement> 11 <requirement type="package" version="1.14.1">scipy</requirement>
12 <requirement type="package" version="3.7">matplotlib</requirement> 12 <requirement type="package" version="0.14.2">statsmodels</requirement>
13 <requirement type="package" version="0.12.2">seaborn</requirement>
14 <requirement type="package" version="3.0.0">magic-impute</requirement>
15 <yield /> 13 <yield />
16 </requirements> 14 </requirements>
17 </xml> 15 </xml>
18 <xml name="bio_tools"> 16 <xml name="bio_tools">
19 <xrefs> 17 <xrefs>
20 <xref type="bio.tools">scanpy</xref> 18 <xref type="bio.tools">scanpy</xref>
21 </xrefs> 19 </xrefs>
22 </xml> 20 </xml>
23 <xml name="creators"> 21 <xml name="creators">
24 <creator> 22 <creator>
25 <organization name="European Galaxy Team" url="https://galaxyproject.org/eu/" /> 23 <organization name="European Galaxy Team" url="https://galaxyproject.org/eu/"/>
26 </creator> 24 </creator>
27 </xml> 25 </xml>
28 <xml name="citations"> 26 <xml name="citations">
29 <citations> 27 <citations>
30 <citation type="doi">10.1186/s13059-017-1382-0</citation> 28 <citation type="doi">10.1186/s13059-017-1382-0</citation>
31 <citation type="doi">10.1093/gigascience/giaa102</citation> 29 <citation type="doi">10.1093/gigascience/giaa102</citation>
32 </citations> 30 </citations>
33 </xml> 31 </xml>
34 <xml name="version_command"> 32
35 <version_command><![CDATA[python -c "import scanpy as sc;print('scanpy version: %s' % sc.__version__)"]]></version_command> 33
36 </xml> 34 <!-- param macros -->
37 <token name="@CMD@"><![CDATA[
38 cp '$adata' 'anndata.h5ad' &&
39 cat '$script_file' > '$hidden_output' &&
40 python '$script_file' >> '$hidden_output' &&
41 ls . >> '$hidden_output' &&
42 touch 'anndata_info.txt' &&
43 cat 'anndata_info.txt' @CMD_prettify_stdout@
44 ]]>
45 </token>
46 <token name="@CMD_imports@"><![CDATA[
47 import scanpy as sc
48 import pandas as pd
49 import numpy as np
50 ]]>
51 </token>
52 <xml name="sanitize_query" token_validinitial="string.printable"> 35 <xml name="sanitize_query" token_validinitial="string.printable">
53 <sanitizer> 36 <sanitizer>
54 <valid initial="@VALIDINITIAL@"> 37 <valid initial="@VALIDINITIAL@">
55 <remove value="&apos;" /> 38 <remove value="&apos;"/>
56 </valid> 39 </valid>
57 </sanitizer> 40 </sanitizer>
58 </xml> 41 </xml>
59 <xml name="sanitize_vectors" token_validinitial="string.digits"> 42 <xml name="sanitize_vectors" token_validinitial="string.digits">
60 <sanitizer> 43 <sanitizer>
61 <valid initial="@VALIDINITIAL@"> 44 <valid initial="@VALIDINITIAL@">
62 <add value=","/> 45 <add value=","/>
63 </valid> 46 </valid>
64 </sanitizer> 47 </sanitizer>
65 </xml> 48 </xml>
66 <xml name="inputs_anndata"> 49 <xml name="inputs_anndata">
67 <param name="adata" type="data" format="h5ad" label="Annotated data matrix"/> 50 <param name="adata" type="data" format="h5ad" label="Annotated data matrix"/>
68 </xml> 51 </xml>
69 <token name="@CMD_read_inputs@"><![CDATA[
70 adata = sc.read_h5ad('anndata.h5ad')
71 ]]>
72 </token>
73 <xml name="inputs_common_advanced"> 52 <xml name="inputs_common_advanced">
74 <section name="advanced_common" title="Advanced Options" expanded="false"> 53 <section name="advanced_common" title="Advanced Options" expanded="false">
75 <param name="show_log" type="boolean" checked="false" label="Output Log?" /> 54 <param name="show_log" type="boolean" checked="false" label="Output Log?"/>
76 </section> 55 </section>
77 </xml> 56 </xml>
78 <xml name="anndata_outputs"> 57 <xml name="anndata_outputs">
79 <data name="anndata_out" format="h5ad" from_work_dir="anndata.h5ad" label="${tool.name} (${method.method}) on ${on_string}: Annotated data matrix"/> 58 <data name="anndata_out" format="h5ad" from_work_dir="anndata.h5ad" label="${tool.name} (${method.method}) on ${on_string}: Annotated data matrix">
80 <data name="hidden_output" format="txt" label="Log file" > 59 <yield />
60 </data>
61 <data name="hidden_output" format="txt" label="Log file" >
81 <filter>advanced_common['show_log']</filter> 62 <filter>advanced_common['show_log']</filter>
82 </data> 63 </data>
83 </xml> 64 </xml>
84 <token name="@CMD_anndata_write_outputs@"><![CDATA[ 65 <xml name="param_use_rep">
85 adata.write_h5ad('anndata.h5ad') 66 <param argument="use_rep" type="text" value="" optional="true" label="Use the indicated representation" help="If not set, the representation is chosen automatically: for n_vars below 50, X is used, otherwise X_pca (uns) is used. If X_pca is not present, it's computed with default parameter">
86 with open('anndata_info.txt','w', encoding='utf-8') as ainfo: 67 <expand macro="sanitize_query"/>
87 print(adata, file=ainfo) 68 </param>
88 ]]> 69 </xml>
89 </token>
90 <token name="@CMD_prettify_stdout@"><![CDATA[ | sed -r '1 s|AnnData object with (.+) = (.*)\s*|\1: \2|g' | sed "s|'||g" | sed -r 's|^\s*(.*):\s(.*)|[\1]\n- \2|g' | sed 's|, |\n- |g'
91 ]]></token>
92 <xml name="svd_solver"> 70 <xml name="svd_solver">
93 <param name="svd_solver" type="select" label="SVD solver to use" help=""> 71 <param name="svd_solver" type="select" optional="true" label="SVD solver to use">
94 <option value="auto">Automatically chosen depending on the size of the problem</option> 72 <option value="auto">Automatically chosen depending on the size of the problem</option>
95 <option value="arpack">ARPACK wrapper in SciPy</option> 73 <option value="arpack">ARPACK wrapper in SciPy</option>
96 <option value="randomized">Randomized algorithm due to Halko (2009)</option> 74 <option value="randomized">Randomized algorithm due to Halko (2009)</option>
75 <option value="lobpcg">An alternative SciPy solver. Not available with dask arrays.</option>
76 <option value="tsqr">Only available with dask arrays. “tsqr” algorithm from Benson et. al. (2013).</option>
97 </param> 77 </param>
98 </xml> 78 </xml>
99 <xml name="pca_random_state"> 79 <xml name="pca_random_state">
100 <param name="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/> 80 <param name="random_state" type="integer" value="0" label="Initial states for the optimization"/>
101 </xml> 81 </xml>
102 <xml name="param_plot_format"> 82 <xml name="param_plot_format">
103 <param name="format" type="select" label="Format for saving figures"> 83 <param name="format" type="select" label="Format for saving figures">
104 <option value="png">png</option> 84 <option value="png" selected="true">png</option>
105 <option value="pdf">pdf</option> 85 <option value="pdf">pdf</option>
106 <option value="svg">svg</option> 86 <option value="svg">svg</option>
107 </param> 87 </param>
108 </xml> 88 </xml>
109 <xml name="numeric_distance_metric_options"> 89 <xml name="numeric_distance_metric_options">
90 <option value="euclidean" selected="true">euclidean</option>
110 <option value="braycurtis">braycurtis</option> 91 <option value="braycurtis">braycurtis</option>
111 <option value="canberra">canberra</option> 92 <option value="canberra">canberra</option>
112 <option value="chebyshev">chebyshev</option> 93 <option value="chebyshev">chebyshev</option>
113 <option value="cityblock">cityblock</option> 94 <option value="cityblock">cityblock</option>
114 <option value="correlation">correlation</option> 95 <option value="correlation">correlation</option>
115 <option value="cosine">cosine</option> 96 <option value="cosine">cosine</option>
116 <option value="euclidean" selected="true">euclidean</option>
117 <option value="mahalanobis">mahalanobis</option> 97 <option value="mahalanobis">mahalanobis</option>
118 <option value="matching">matching</option> 98 <option value="matching">matching</option>
119 <option value="minkowski">minkowski</option> 99 <option value="minkowski">minkowski</option>
120 <option value="seuclidean">seuclidean</option> 100 <option value="seuclidean">seuclidean</option>
121 <option value="sqeuclidean">sqeuclidean</option> 101 <option value="sqeuclidean">sqeuclidean</option>
391 <option value="rainbow">rainbow (Miscellaneous)</option> 371 <option value="rainbow">rainbow (Miscellaneous)</option>
392 <option value="jet">jet (Miscellaneous)</option> 372 <option value="jet">jet (Miscellaneous)</option>
393 <option value="nipy_spectral">nipy_spectral (Miscellaneous)</option> 373 <option value="nipy_spectral">nipy_spectral (Miscellaneous)</option>
394 <option value="gist_ncar">gist_ncar (Miscellaneous)</option> 374 <option value="gist_ncar">gist_ncar (Miscellaneous)</option>
395 </xml> 375 </xml>
396 <xml name="param_groupby">
397 <param argument="groupby" type="text" value="" optional="true" label="The key of the observation grouping to consider" help="If it is given, the plot is ordered by the respective group. It is expected that to be a categorical. If it is not a categorical observation, it would be subdivided into 'num_categories'.">
398 <expand macro="sanitize_query" />
399 </param>
400 </xml>
401 <xml name="param_use_raw">
402 <param argument="use_raw" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use 'raw' attribute of input if present" help=""/>
403 </xml>
404 <xml name="param_log">
405 <param argument="log" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use the log of the values?"/>
406 </xml>
407 <xml name="pl_figsize">
408 <conditional name="figsize">
409 <param name="test" type="select" label="Custom figure size" >
410 <option value="yes">Yes</option>
411 <option value="no" selected="true">No: the figure width is set based on the number of variable names and the height is set to 10.</option>
412 </param>
413 <when value="yes">
414 <param argument="width" type="integer" min="0" value="10" label="Figure width" help=""/>
415 <param argument="height" type="integer" min="0" value="10" label="Figure height" help=""/>
416 </when>
417 <when value="no"/>
418 </conditional>
419 </xml>
420 <token name="@CMD_params_figsize@"><![CDATA[
421
422 ]]></token>
423 <xml name="pl_var_names">
424 <conditional name="var_names">
425 <param name="type" type="select" label="Variables to plot (columns of the heatmaps)" >
426 <option value="all">All variables in 'adata.var_names'</option>
427 <option value="custom">Subset of variables in 'adata.var_names'</option>
428 <option value="customfile">Subset of variables as a tabular file</option>
429 </param>
430 <when value="all"/>
431 <when value="custom">
432 <param argument="var_names" type="text" value="" label="List of variables to plot" help="They should be a valid subset of 'adata.var_names', and separated by comma">
433 <expand macro="sanitize_query" />
434 </param>
435 </when>
436 <when value="customfile">
437 <param argument="var_names" type="data" format="tabular" label="List of variables to plot" help="This should be a tsv where row = group (e.g. celltypes) and columns = variables."></param>
438 <param name="header" type="select" label="Header in the list of markers?">
439 <option value="included">Header incldued</option>
440 <option value="not_included">Header not included</option>
441 </param>
442 </when>
443 </conditional>
444 </xml>
445 <xml name="param_num_categories">
446 <param argument="num_categories" type="integer" min="0" value="7" label="Number of categories" help="It is only used if groupby observation is not categorical. This value determines the number of groups into which the groupby observation should be subdivided."/>
447 </xml>
448 <xml name="param_dendrogram">
449 <param argument="dendrogram" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Compute and plot a dendrogram?" help="groupby categories are reordered accoring to the dendrogram order. If groups of var_names are set and those groups correspond to the groupby categories, those groups are also reordered. The ‘person’ method is used to compute the pairwise correlation between categories using all var_names in raw if use_raw is None, otherwise all adata.var_names are used. The linkage method used is complete."/>
450 </xml>
451 <xml name="pl_var_group_positions">
452 <repeat name="var_group_positions" title="Group of variables to highlight" help="This will draw a 'bracket' on top of the plot between the given start and end positions. If a label is given, it will be added on top of the bracket. ">
453 <param name="start" type="integer" min="0" value="" label="Start" help=""/>
454 <param name="end" type="integer" min="0" value="" label="End" help=""/>
455 <param argument="label" type="text" value="" label="Label" help="">
456 <expand macro="sanitize_query" />
457 </param>
458 </repeat>
459 </xml>
460 <xml name="param_var_group_rotation">
461 <param argument="var_group_rotation" type="float" value="" optional="true" label="Label rotation degrees" help="By default, labels larger than 4 characters are rotated 90 degrees"/>
462 </xml>
463 <xml name="param_layer">
464 <param argument="layer" type="text" value="" label="Name of the AnnData object layer that wants to be plotted" help="By default 'adata.raw.X' is plotted. If 'use_raw=False' is set, then 'adata.X' is plotted. If layer is set to a valid layer name, then the layer is plotted. layer takes precedence over 'use_raw'.">
465 <expand macro="sanitize_query" />
466 </param>
467 </xml>
468 <token name="@CMD_param_plot_inputs@"><![CDATA[
469 adata,
470 save='.$format',
471 show=False,
472 ]]></token>
473 <xml name="params_inputs">
474 <expand macro="pl_var_names"/>
475 <expand macro="param_groupby"/>
476 <expand macro="param_num_categories"/>
477 </xml>
478 <token name="@CMD_var_names_header_check@"><![CDATA[
479 header='infer'
480 #if $method.var_names.type == 'customfile' and $method.var_names.header == 'not_included' :
481 header=None
482 #end if
483 ]]></token>
484 <token name="@CMD_params_inputs@"><![CDATA[
485 #if $method.var_names.type == 'custom'
486 #set $var_names = ([x.strip() for x in str($method.var_names.var_names).split(',')])
487 var_names=$var_names,
488 #else if $method.var_names.type == 'customfile'
489 var_names={key: [v for v in list(value.values()) if pd.notna(v)] for key, value in pd.read_csv('$var_names', sep='\t', index_col=0).to_dict(orient='index').items()},
490 #else
491 var_names=adata.var_names,
492 #end if
493 #if $method.groupby
494 groupby='$method.groupby',
495 #end if
496 num_categories=$method.num_categories,
497 ]]></token>
498 <xml name="params_plots">
499 <expand macro="param_log"/>
500 <expand macro="param_use_raw"/>
501 <expand macro="param_dendrogram"/>
502 <expand macro="pl_var_group_positions"/>
503 <expand macro="param_var_group_rotation"/>
504 <expand macro="pl_figsize"/>
505 <expand macro="param_layer"/>
506 </xml>
507 <token name="@CMD_params_plots@"><![CDATA[
508 log=$method.log,
509 use_raw=$method.use_raw,
510 dendrogram=$method.dendrogram,
511 #if len($method.var_group_positions) > 0:
512 #set $var_group_positions=[]
513 #set $var_group_labels=[]
514 #for $i, $s in enumerate($method.var_group_positions)
515 #silent $var_group_positions.append((int($s.start), int($s.end)))
516 #silent $var_group_labels.append(str($s.label))
517 #end for
518 var_group_positions=$var_group_positions,
519 var_group_labels=$var_group_labels,
520 #end if
521 #if str($method.var_group_rotation) != ''
522 var_group_rotation=$method.var_group_rotation,
523 #end if
524 #if $method.figsize.test == 'yes'
525 figsize=($method.figsize.width, $method.figsize.height),
526 #end if
527 #if $method.layer
528 layer='$method.layer',
529 #end if
530 ]]></token>
531 <xml name="matplotlib_color"> 376 <xml name="matplotlib_color">
532 <option value="AliceBlue">AliceBlue</option> 377 <option value="AliceBlue">AliceBlue</option>
533 <option value="AntiqueWhite">AntiqueWhite</option> 378 <option value="AntiqueWhite">AntiqueWhite</option>
534 <option value="Aqua">Aqua</option> 379 <option value="Aqua">Aqua</option>
535 <option value="Aquamarine">Aquamarine</option> 380 <option value="Aquamarine">Aquamarine</option>
677 <option value="WhiteSmoke">WhiteSmoke</option> 522 <option value="WhiteSmoke">WhiteSmoke</option>
678 <option value="Yellow">Yellow</option> 523 <option value="Yellow">Yellow</option>
679 <option value="YellowGreen">YellowGreen</option> 524 <option value="YellowGreen">YellowGreen</option>
680 </xml> 525 </xml>
681 <xml name="param_matplotlib_pyplot_edgecolors"> 526 <xml name="param_matplotlib_pyplot_edgecolors">
682 <param argument="edgecolors" type="select" optional="true" label="Edge color of the marker" help=""> 527 <param argument="edgecolors" type="select" optional="true" label="Edge color of the marker">
683 <option value="face">The edge color will always be the same as the face color</option> 528 <option value="face">The edge color will always be the same as the face color</option>
684 <expand macro="matplotlib_color"/> 529 <expand macro="matplotlib_color"/>
685 </param> 530 </param>
686 </xml> 531 </xml>
687 <xml name="param_alpha"> 532 <xml name="param_swap_axes">
688 <param argument="alpha" type="float" value="" min="0" max="1" optional="true" label="Alpha blending value" help="Between 0 (transparent) and 1 (opaque)"/> 533 <param argument="swap_axes" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Swap axes?" help="By default, the x axis contains 'var_names' (e.g. genes) and the y axis the 'groupby' categories (if any). By setting 'swap_axes' then x are the 'groupby' categories and y the 'var_names'."/>
689 </xml> 534 </xml>
690 <xml name="param_vmin"> 535 <xml name="param_cmap">
691 <param argument="vmin" type="float" value="" optional="true" label="Minimum value to normalize luminance data" help="If not set, it is inferred from the data and other keyword arguments"/> 536 <param argument="cmap" type="select" optional="true" label="Colors to use for plotting categorical annotation groups">
692 </xml> 537 <expand macro="matplotlib_pyplot_colormap"/>
693 <xml name="param_vmax"> 538 </param>
694 <param argument="vmax" type="float" value="" optional="true" label="Maximum value to normalize luminance data" help="If not set, it is inferred from the data and other keyword arguments"/> 539 </xml>
695 </xml> 540 <xml name="param_sort_order">
696 <xml name="section_matplotlib_pyplot_scatter"> 541 <param argument="sort_order" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Sort order?" help="For continuous annotations used as color parameter, plot data points with higher values on top of others."/>
697 <section name="matplotlib_pyplot_scatter" title="Parameters for matplotlib.pyplot.scatter"> 542 </xml>
698 <!--<param argument="marker" type="select" label="Marker style" help=""> 543 <xml name="param_arrows">
699 <option value="o">o</option> 544 <param argument="arrows" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Show arrows?" help="It requires to run 'tl.rna_velocity' before."/>
700 <option value="v">v</option> 545 </xml>
701 <option value="^">^</option> 546 <!-- param macros -->
702 <option value="8">8</option> 547
703 <option value="s">s</option> 548
704 <option value="p">p</option> 549
705 <option value="*">*</option> 550 <!-- command macros -->
706 <option value="h">h</option> 551 <xml name="version_command">
707 <option value="H">H</option> 552 <version_command><![CDATA[python -c "import scanpy as sc;print('scanpy version: %s' % sc.__version__)"]]></version_command>
708 <option value="D">D</option> 553 </xml>
709 <option value="d">d</option> 554 <token name="@CMD_PRETTIFY_STDOUT@"><![CDATA[
710 <option value="P">P</option> 555 | sed -r '1 s|AnnData object with (.+) = (.*)\s*|\1: \2|g' | sed "s|'||g" | sed -r 's|^\s*(.*):\s(.*)|[\1]\n- \2|g' | sed 's|, |\n- |g'
711 <option value="X">X</option> 556 ]]>
712 </param>--> 557 </token>
713 <expand macro="param_alpha"/> 558 <token name="@CMD_READ_INPUTS@"><![CDATA[
714 <expand macro="param_vmin"/> 559 adata = sc.read_h5ad('anndata.h5ad')
715 <expand macro="param_vmax"/> 560 ]]>
716 <param argument="linewidths" type="float" value="0" label="Linewidth of the marker edges" help=""/> 561 </token>
717 <expand macro="param_matplotlib_pyplot_edgecolors"/> 562 <!-- ln -s doesn't work here because the output is overwritten to the same file -->
718 </section> 563 <token name="@CMD@"><![CDATA[
719 </xml> 564 cp '$adata' 'anndata.h5ad' &&
720 <token name="@CMD_params_matplotlib_pyplot_scatter@"><![CDATA[ 565 cat '$script_file' > '$hidden_output' &&
721 #if str($method.matplotlib_pyplot_scatter.vmin) != '' 566 python '$script_file' >> '$hidden_output' &&
722 vmin=$method.matplotlib_pyplot_scatter.vmin, 567 ls . >> '$hidden_output' &&
723 #end if 568 touch 'anndata_info.txt' &&
724 #if str($method.matplotlib_pyplot_scatter.vmax) != '' 569 cat 'anndata_info.txt' @CMD_PRETTIFY_STDOUT@
725 vmax=$method.matplotlib_pyplot_scatter.vmax, 570 ]]>
726 #end if 571 </token>
727 #if str($method.matplotlib_pyplot_scatter.alpha) != '' 572 <token name="@CMD_IMPORTS@"><![CDATA[
728 alpha=$method.matplotlib_pyplot_scatter.alpha, 573 import scanpy as sc
729 #end if 574 import pandas as pd
730 lw=$method.matplotlib_pyplot_scatter.linewidths, 575 import numpy as np
731 #if $method.matplotlib_pyplot_scatter.edgecolors 576 ]]>
732 ec='$method.matplotlib_pyplot_scatter.edgecolors' 577 </token>
733 #end if 578 <token name="@CMD_ANNDATA_WRITE_OUTPUTS@"><![CDATA[
734 ]]></token> 579 adata.write_h5ad('anndata.h5ad', compression='gzip')
735 <xml name="conditional_stripplot"> 580 with open('anndata_info.txt','w', encoding='utf-8') as ainfo:
736 <conditional name="stripplot"> 581 print(adata, file=ainfo)
737 <param argument="stripplot" type="select" label="Add a stripplot on top of the violin plot" help=""> 582 ]]>
738 <option value="True">Yes</option> 583 </token>
739 <option value="False">No</option> 584 <token name="@CMD_PARAM_PLOT_INPUTS@"><![CDATA[
740 </param> 585 adata,
741 <when value="True"> 586 save='.$format',
742 <conditional name="jitter"> 587 ]]>
743 <param argument="jitter" type="select" label="Add a jitter to the stripplot" help=""> 588 </token>
744 <option value="True">Yes</option> 589 <token name="@CMD_SHOW_NONE@"><![CDATA[
745 <option value="False">No</option> 590 show=None
746 </param> 591 ]]>
747 <when value="True"> 592 </token>
748 <param argument="size" type="float" min="0" value="1" label="Size of the jitter points" help=""/> 593 <token name="@CMD_VAR_NAMES_HEADER_CHECK@"><![CDATA[
749 </when> 594 header='infer'
750 <when value="False"/> 595 #if $method.var_names.type == 'customfile' and $method.var_names.header == 'not_included' :
751 </conditional> 596 header=None
752 </when>
753 <when value="False"/>
754 </conditional>
755 </xml>
756 <token name="@CMD_conditional_stripplot@"><![CDATA[
757 stripplot=$method.violin_plot.stripplot.stripplot,
758 #if $method.violin_plot.stripplot.stripplot == "True"
759 jitter=$method.violin_plot.stripplot.jitter.jitter,
760 #if $method.violin_plot.stripplot.jitter.jitter == "True"
761 size=$method.violin_plot.stripplot.jitter.size,
762 #end if
763 #end if 597 #end if
764 ]]></token> 598 ]]>
765 <xml name="param_scale"> 599 </token>
766 <param argument="scale" type="select" label="Method used to scale the width of each violin"> 600 <token name="@CMD_PARAMS_VIOLIN_PLOTS@"><![CDATA[
767 <option value="area">area: each violin will have the same area</option> 601 @CMD_CONDITIONAL_STRIPPLOT@
768 <option value="count">count: the width of the violins will be scaled by the number of observations in that bin</option>
769 <option value="width" selected="true">width: each violin will have the same width</option>
770 </param>
771 </xml>
772 <token name="@CMD_params_violin_plots@"><![CDATA[
773 @CMD_conditional_stripplot@
774 multi_panel=$method.violin_plot.multi_panel.multi_panel, 602 multi_panel=$method.violin_plot.multi_panel.multi_panel,
775 #if $method.multi_panel.violin_plot.multi_panel == "True" and str($method.violin_plot.multi_panel.width) != '' and str($method.violin_plot.multi_panel.height) != '' 603 #if $method.multi_panel.violin_plot.multi_panel == "True" and str($method.violin_plot.multi_panel.width) != '' and str($method.violin_plot.multi_panel.height) != ''
776 figsize=($method.violin_plot.multi_panel.width, $method.violin_plot.multi_panel.height) 604 figsize=($method.violin_plot.multi_panel.width, $method.violin_plot.multi_panel.height)
777 #end if 605 #end if
778 scale='$method.violin_plot.scale', 606 density_norm='$method.violin_plot.density_norm',
779 ]]></token> 607 ]]>
780 <xml name="seaborn_violinplot"> 608 </token>
781 <section name="seaborn_violinplot" title="Parameters for seaborn.violinplot"> 609 <!-- command macros -->
782 <param argument="bw" type="select" label="Name of a reference rule when computing the kernel bandwidth"> 610
783 <option value="scott">scott</option> 611
784 <option value="silverman">silverman</option> 612
613 <!-- param and cmd macros -->
614 <xml name="param_standard_scale">
615 <param argument="standard_scale" type="select" label="Standardize a dimension between 0 and 1" help="Each variable or observation is subtracted by the minimum and divided each by its maximum.">
616 <option value="None" selected="true">No standardization</option>
617 <option value="var">Standardization on variable</option>
618 <option value="obs">Standardization on observation</option>
619 </param>
620 </xml>
621 <token name="@CMD_STANDARD_SCALE@"><![CDATA[
622 #if str($method.standard_scale) != 'None':
623 standard_scale='$method.standard_scale',
624 #end if
625 ]]>
626 </token>
627
628 <xml name="param_layer" token_optional="true" token_label="If provided, use adata.layers[layer] for expression values instead of adata.X." token_help="">
629 <param argument="layer" type="text" value="" optional="@OPTIONAL@" label="@LABEL@">
630 <expand macro="sanitize_query"/>
631 </param>
632 </xml>
633 <token name="@CMD_PARAM_LAYER@"><![CDATA[
634 #if str($method.layer) != '':
635 layer='$method.layer',
636 #end if
637 ]]>
638 </token>
639
640 <xml name="param_neighbors_key">
641 <param argument="neighbors_key" type="text" value="" label="Key to look for neighbors settings and connectivities" help="If not specified, looks .uns[‘neighbors’] for neighbors settings and .obsp[‘connectivities’] for connectivities (default storage places for pp.neighbors).">
642 <expand macro="sanitize_query"/>
643 </param>
644 </xml>
645 <token name="@CMD_PARAM_NEIGHBORS_KEY@"><![CDATA[
646 #if $method.neighbors_key != ''
647 neighbors_key='$method.neighbors_key',
648 #end if
649 ]]>
650 </token>
651
652 <xml name="pl_var_names">
653 <conditional name="var_names">
654 <param name="type" type="select" label="Variables to plot (columns of the heatmaps)" >
655 <option value="all" selected="true">All variables in 'adata.var_names'</option>
656 <option value="custom">Subset of variables in 'adata.var_names'</option>
657 <option value="customfile">Subset of variables as a tabular file</option>
785 </param> 658 </param>
786 <param argument="orient" type="select" optional="true" label="Orientation of the plot"> 659 <when value="all"/>
787 <option value="v">vertical</option> 660 <when value="custom">
788 <option value="h">horizontal</option> 661 <param argument="var_names" type="text" value="" label="List of variables to plot" help="They should be a valid subset of 'adata.var_names', and separated by comma">
662 <expand macro="sanitize_query"/>
663 </param>
664 </when>
665 <when value="customfile">
666 <param argument="var_names" type="data" format="tabular" label="List of variables to plot" help="This should be a tsv where row = group (e.g. celltypes) and columns = variables."></param>
667 <param name="header" type="boolean" truevalue="included" falsevalue="not_included" checked="true" label="Header is included in the list of markers?"/>
668 </when>
669 </conditional>
670 </xml>
671 <xml name="param_groupby">
672 <param argument="groupby" type="text" value="" optional="true" label="The key of the observation grouping to consider" help="If it is given, the plot is ordered by the respective group. It is expected that to be a categorical. If it is not a categorical observation, it would be subdivided into 'num_categories'.">
673 <expand macro="sanitize_query"/>
674 </param>
675 </xml>
676 <xml name="param_num_categories">
677 <param argument="num_categories" type="integer" min="0" value="7" label="Number of categories" help="It is only used if groupby observation is not categorical. This value determines the number of groups into which the groupby observation should be subdivided."/>
678 </xml>
679
680 <xml name="params_inputs">
681 <expand macro="pl_var_names"/>
682 <expand macro="param_groupby"/>
683 <expand macro="param_num_categories"/>
684 </xml>
685 <token name="@CMD_PARAMS_INPUTS@"><![CDATA[
686 #if str($method.var_names.type) == 'custom':
687 #set $var_names = ([x.strip() for x in str($method.var_names.var_names).split(',')])
688 var_names=$var_names,
689 #else if str($method.var_names.type) == 'customfile':
690 var_names={key: [v for v in list(value.values()) if pd.notna(v)] for key, value in pd.read_csv('$var_names', sep='\t', index_col=0, header=header).to_dict(orient='index').items()},
691 #else
692 var_names=adata.var_names,
693 #end if
694 #if str($method.groupby) != '':
695 groupby='$method.groupby',
696 #end if
697 num_categories=$method.num_categories,
698 ]]>
699 </token>
700
701 <xml name="pl_figsize">
702 <conditional name="figsize">
703 <param name="custom" type="select" label="Custom figure size" >
704 <option value="no" selected="true">No: the figure width is set based on the number of variable names and the height is set to 10.</option>
705 <option value="yes">Yes</option>
789 </param> 706 </param>
790 <param argument="linewidth" type="float" value="0" label="Width of the gray lines that frame the plot elements" help=""/> 707 <when value="yes">
791 <param argument="color" type="select" optional="true" label="Color for all of the elements" help=""> 708 <param argument="width" type="integer" min="0" value="10" label="Figure width"/>
792 <expand macro="matplotlib_color"/> 709 <param argument="height" type="integer" min="0" value="10" label="Figure height"/>
793 </param> 710 </when>
794 <param argument="saturation" type="float" value="0.75" min="0" max="1" label="Proportion of the original saturation to draw colors at" help=""/> 711 <when value="no"/>
795 </section> 712 </conditional>
796 </xml> 713 </xml>
797 <token name="@CMD_params_seaborn_violinplot@"><![CDATA[ 714 <token name="@CMD_PARAMS_FIGSIZE@"><![CDATA[
798 bw='$method.seaborn_violinplot.bw', 715 #if $method.figsize.custom == 'yes':
799 #if $method.seaborn_violinplot.orient 716 figsize=($method.figsize.width, $method.figsize.height),
800 orient='$method.seaborn_violinplot.orient', 717 #end if
801 #end if 718 ]]>
802 linewidth=$method.seaborn_violinplot.linewidth, 719 </token>
803 #if $method.seaborn_violinplot.color 720
804 color='$method.seaborn_violinplot.color', 721 <xml name="param_log" token_checked="false">
805 #end if 722 <param argument="log" type="boolean" truevalue="True" falsevalue="False" checked="@CHECKED@" label="Use the log of the values?"/>
806 saturation=$method.seaborn_violinplot.saturation 723 </xml>
807 ]]></token> 724 <xml name="param_use_raw" token_falsevalue="False">
808 <xml name="param_color"> 725 <param argument="use_raw" type="boolean" truevalue="True" falsevalue="@FALSEVALUE@" checked="false" label="Use 'raw' attribute of input if present"/>
809 <param argument="color" type="text" value="" optional="true" label="Keys for annotations of observations/cells or variables/genes" help="One or a list of comma-separated index or key from either '.obs' or '.var'"> 726 </xml>
810 <expand macro="sanitize_query" /> 727 <xml name="param_dendrogram">
811 </param> 728 <param argument="dendrogram" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Compute and plot a dendrogram?" help="groupby categories are reordered accoring to the dendrogram order. If groups of var_names are set and those groups correspond to the groupby categories, those groups are also reordered. The ‘person’ method is used to compute the pairwise correlation between categories using all var_names in raw if use_raw is None, otherwise all adata.var_names are used. The linkage method used is complete."/>
812 </xml> 729 </xml>
813 <token name="@CMD_param_color@"><![CDATA[ 730 <xml name="pl_var_group_positions">
814 #if $method.color 731 <repeat name="var_group_positions" title="Group of variables to highlight" help="This will draw a 'bracket' on top of the plot between the given start and end positions. If a label is given, it will be added on top of the bracket. ">
815 #set $color = ([x.strip() for x in str($method.color).split(',')]) 732 <param name="start" type="integer" min="0" value="" label="Start"/>
816 color=$color, 733 <param name="end" type="integer" min="0" value="" label="End"/>
817 #end if 734 <param argument="label" type="text" value="" label="Label">
818 ]]></token> 735 <expand macro="sanitize_query"/>
819 <xml name="param_groups">
820 <param argument="groups" type="text" value="" optional="true" label="Categorical observation annotations to plot" help="Comma-separated">
821 <expand macro="sanitize_query" />
822 </param>
823 </xml>
824 <token name="@CMD_params_groups@"><![CDATA[
825 #if $method.groups
826 #set $groups=([x.strip() for x in str($method.groups).split(',')])
827 groups=$groups,
828 #end if
829 ]]></token>
830 <xml name="pl_components">
831 <repeat name="components" title="Component">
832 <param argument="axis1" type="text" value="1" label="X-Axis" help="">
833 <expand macro="sanitize_query" />
834 </param>
835 <param argument="axis2" type="text" value="2" label="Y-Axis" help="">
836 <expand macro="sanitize_query" />
837 </param> 736 </param>
838 </repeat> 737 </repeat>
839 </xml> 738 </xml>
840 <token name="@CMD_params_pl_components@"><![CDATA[ 739 <xml name="param_var_group_rotation">
841 #if len($method.plot.components) > 0 740 <param argument="var_group_rotation" type="float" value="" optional="true" label="Label rotation degrees" help="By default, labels larger than 4 characters are rotated 90 degrees"/>
842 #set $components=[] 741 </xml>
843 #for $i, $s in enumerate($method.plot.components) 742 <xml name="params_plots">
844 #silent $components.append(str($s.axis1) + ',' + str($s.axis2)) 743 <expand macro="param_log"/>
845 #end for 744 <expand macro="param_use_raw" falsevalue="None"/>
846 components=$components, 745 <expand macro="param_dendrogram"/>
847 #end if 746 <expand macro="pl_var_group_positions"/>
848 ]]> 747 <expand macro="param_var_group_rotation"/>
849 </token> 748 <expand macro="pl_figsize"/>
850 <xml name="param_projection"> 749 <expand macro="param_layer" optional="true" label="Name of the AnnData object layer that wants to be plotted" help="By default 'adata.raw.X' is plotted. If 'use_raw=False' is set, then 'adata.X' is plotted. If layer is set to a valid layer name, then the layer is plotted. layer takes precedence over 'use_raw'."/>
851 <param argument="projection" type="select" label="Projection of plot" help=""> 750 </xml>
852 <option value="2d">2d</option> 751 <token name="@CMD_PARAMS_PLOTS@"><![CDATA[
853 <option value="3d">3d</option> 752 log=$method.log,
854 </param> 753 use_raw=$method.use_raw,
855 </xml> 754 dendrogram=$method.dendrogram,
856 <xml name="param_legend_loc"> 755 #if len($method.var_group_positions) > 0:
857 <param argument="legend_loc" type="select" label="Location of legend" help=""> 756 #set $var_group_positions=[]
858 <option value="none">none</option> 757 #set $var_group_labels=[]
859 <option value="right margin" selected="true">right margin</option> 758 #for $i, $s in enumerate($method.var_group_positions)
860 <option value="on data">on data</option> 759 #silent $var_group_positions.append((int($s.start), int($s.end)))
861 <option value="on data export">on data export</option> 760 #silent $var_group_labels.append(str($s.label))
862 <option value="best">best</option> 761 #end for
863 <option value="upper right">upper right</option> 762 var_group_positions=$var_group_positions,
864 <option value="upper left">upper left</option> 763 var_group_labels=$var_group_labels,
865 <option value="lower left">lower left</option> 764 #end if
866 <option value="lower right">lower right</option> 765 #if str($method.var_group_rotation) != '':
867 <option value="center left">center left</option> 766 var_group_rotation=$method.var_group_rotation,
868 <option value="center right">center right</option> 767 #end if
869 <option value="lower center">lower center</option> 768 @CMD_PARAMS_FIGSIZE@
870 <option value="upper center">upper center</option> 769 @CMD_PARAM_LAYER@
871 <option value="center">center</option> 770 ]]>
872 </param> 771 </token>
873 </xml> 772
874 <xml name="param_legend_fontsize"> 773 <xml name="param_alpha">
875 <param argument="legend_fontsize" type="integer" optional="true" value="" label="Legend font size" help=""/> 774 <param argument="alpha" type="float" value="" min="0" max="1" optional="true" label="Alpha blending value" help="Between 0 (transparent) and 1 (opaque)"/>
876 </xml> 775 </xml>
877 <token name="@CMD_param_legend_fontsize@"><![CDATA[ 776 <xml name="param_vmin" token_label="Minimum value to normalize luminance data" token_help="If not set, it is inferred from the data and other keyword arguments">
878 #if str($method.plot.legend_fontsize) != '' 777 <param argument="vmin" type="float" value="" optional="true" label="@LABEL@" help="@HELP@"/>
879 legend_fontsize=$method.plot.legend_fontsize, 778 </xml>
880 #end if 779 <xml name="param_vmax" token_label="Maximum value to normalize luminance data" token_help="If not set, it is inferred from the data and other keyword arguments">
881 ]]> 780 <param argument="vmax" type="float" value="" optional="true" label="@LABEL@" help="@HELP@"/>
882 </token> 781 </xml>
883 <xml name="param_legend_fontweight"> 782 <xml name="param_vcenter">
884 <param argument="legend_fontweight" type="select" label="Legend font weight" help=""> 783 <param argument="vcenter" type="float" value="" optional="true" label="The value representing the center of the color scale" help="Useful for diverging colormaps."/>
885 <option value="light">light</option> 784 </xml>
886 <option value="normal" selected="true">normal</option> 785 <xml name="section_matplotlib_pyplot_scatter">
887 <option value="medium">medium</option> 786 <section name="matplotlib_pyplot_scatter" title="Parameters for matplotlib.pyplot.scatter">
888 <option value="semibold">semibold</option> 787 <expand macro="param_alpha"/>
889 <option value="bold">bold</option> 788 <expand macro="param_vmin"/>
890 <option value="heavy">heavy</option> 789 <expand macro="param_vmax"/>
891 <option value="black">black</option> 790 <param argument="linewidths" type="float" value="0" label="Linewidth of the marker edges"/>
892 </param> 791 <expand macro="param_matplotlib_pyplot_edgecolors"/>
893 </xml>
894 <xml name="param_palette">
895 <param argument="palette" type="select" optional="true" label="Colors to use for plotting categorical annotation groups" help="">
896 <expand macro="matplotlib_pyplot_colormap"/>
897 </param>
898 </xml>
899 <xml name="param_color_map">
900 <param argument="color_map" type="select" optional="true" label="Color map to use for continous variables" help="">
901 <expand macro="matplotlib_pyplot_colormap"/>
902 </param>
903 </xml>
904 <xml name="param_frameon">
905 <param argument="frameon" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Draw a frame around the scatter plot?" help=""/>
906 </xml>
907 <xml name="param_right_margin">
908 <param argument="right_margin" type="float" value="1" label="Width of the space right of each plotting panel" help=""/>
909 </xml>
910 <xml name="param_left_margin">
911 <param argument="left_margin" type="float" value="1" label="Width of the space left of each plotting panel" help=""/>
912 </xml>
913 <xml name="param_size">
914 <param argument="size" type="float" optional="true" value="" label="Point size" help=""/>
915 </xml>
916 <token name="@CMD_param_size@"><![CDATA[
917 #if str($method.plot.size) != ''
918 size=$method.plot.size,
919 #end if
920 ]]>
921 </token>
922 <xml name="param_title">
923 <param argument="title" type="text" value="" optional="true" label="Title for panels" help="Titles must be separated by a comma">
924 <expand macro="sanitize_query" />
925 </param>
926 </xml>
927 <token name="@CMD_param_title@"><![CDATA[
928 #if $method.plot.title
929 title='$method.plot.title',
930 #end if
931 ]]>
932 </token>
933 <xml name="param_sort_order">
934 <param argument="sort_order" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Sort order?" help="For continuous annotations used as color parameter, plot data points with higher values on top of others."/>
935 </xml>
936 <xml name="param_sort_order">
937 <param argument="sort_order" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Sort order?" help="For continuous annotations used as color parameter, plot data points with higher values on top of others."/>
938 </xml>
939 <xml name="param_ncols">
940 <param argument="ncols" type="integer" min="0" value="4" label="Number of panels per row" help=""/>
941 </xml>
942 <xml name="param_wspace">
943 <param argument="wspace" type="float" min="0" value="0.1" label="Width of the space between multiple panels" help=""/>
944 </xml>
945 <xml name="param_hspace">
946 <param argument="hspace" type="float" min="0" value="0.25" label="Height of the space between multiple panels" help=""/>
947 </xml>
948 <xml name="pl_edges">
949 <conditional name="edges">
950 <param argument="edges" type="select" label="Show edges?">
951 <option value="True">Yes</option>
952 <option value="False" selected="true">No</option>
953 </param>
954 <when value="True">
955 <param argument="edges_width" type="float" min="0" value="0.1" label="Width of edges"/>
956 <param argument="edges_color" type="select" optional="true" label="Color of edges">
957 <expand macro="matplotlib_color"/>
958 </param>
959 </when>
960 <when value="False"/>
961 </conditional>
962 </xml>
963 <token name="@CMD_pl_edges@"><![CDATA[
964 #if str($method.edges.edges) == 'True'
965 edges=True,
966 edges_width=$method.edges.edges_width,
967 #if $method.edges.edges_color
968 edges_color='$method.edges.edges_color',
969 #end if
970 #else
971 edges=False,
972 #end if
973 ]]>
974 </token>
975 <xml name="param_arrows">
976 <param argument="arrows" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Show arrows?" help="It requires to run 'tl.rna_velocity' before."/>
977 </xml>
978 <xml name="param_cmap">
979 <param argument="cmap" type="select" optional="true" label="Colors to use for plotting categorical annotation groups" help="">
980 <expand macro="matplotlib_pyplot_colormap"/>
981 </param>
982 </xml>
983 <xml name="pl_attribute_section">
984 <section name="plot" title="Plot attributes">
985 <expand macro="pl_components"/>
986 <expand macro="param_projection"/>
987 <expand macro="param_legend_loc"/>
988 <expand macro="param_legend_fontsize"/>
989 <expand macro="param_legend_fontweight"/>
990 <expand macro="param_size"/>
991 <expand macro="param_color_map"/>
992 <expand macro="param_palette"/>
993 <expand macro="param_frameon"/>
994 <expand macro="param_ncols"/>
995 <expand macro="param_wspace"/>
996 <expand macro="param_hspace"/>
997 <expand macro="param_title"/>
998 </section> 792 </section>
999 </xml> 793 </xml>
1000 <token name="@CMD_pl_attribute_section@"><![CDATA[ 794 <token name="@CMD_SECTION_MATPLOTLIB_PYPLOT_SCATTER@"><![CDATA[
1001 projection='$method.plot.projection', 795 #if str($method.matplotlib_pyplot_scatter.vmin) != '':
1002 legend_loc='$method.plot.legend_loc', 796 vmin=$method.matplotlib_pyplot_scatter.vmin,
1003 @CMD_param_legend_fontsize@ 797 #end if
1004 legend_fontweight='$method.plot.legend_fontweight', 798 #if str($method.matplotlib_pyplot_scatter.vmax) != '':
1005 @CMD_param_size@ 799 vmax=$method.matplotlib_pyplot_scatter.vmax,
1006 #if $method.plot.color_map 800 #end if
1007 color_map='$method.plot.color_map', 801 #if str($method.matplotlib_pyplot_scatter.alpha) != '':
1008 #end if 802 alpha=$method.matplotlib_pyplot_scatter.alpha,
1009 #if $method.plot.palette 803 #end if
1010 palette='$method.plot.palette', 804 linewidth=$method.matplotlib_pyplot_scatter.linewidths,
1011 #end if 805 #if $method.matplotlib_pyplot_scatter.edgecolors:
1012 frameon=$method.plot.frameon, 806 edgecolor='$method.matplotlib_pyplot_scatter.edgecolors',
1013 ncols=$method.plot.ncols, 807 #end if
1014 wspace=$method.plot.wspace, 808 ]]>
1015 hspace=$method.plot.hspace, 809 </token>
1016 @CMD_param_title@ 810
1017 ]]> 811 <xml name="params_pl_heatmap">
1018 </token>
1019 <xml name="options_layout">
1020 <option value="fa">fa: ForceAtlas2</option>
1021 <option value="fr">fr: Fruchterman-Reingold</option>
1022 <option value="grid_fr">grid_fr: Grid Fruchterman Reingold, faster than "fr"</option>
1023 <option value="kk">kk: Kamadi Kawai’, slower than "fr"</option>
1024 <option value="drl">drl: Distributed Recursive Layout, pretty fast</option>
1025 <option value="rt">rt: Reingold Tilford tree layout</option>
1026 <option value="eq_tree">eq_tree: Equally spaced tree</option>
1027 </xml>
1028 <xml name="param_layout">
1029 <param argument="layout" type="select" label="Plotting layout" optional="false" help="">
1030 <expand macro="options_layout"/>
1031 </param>
1032 </xml>
1033 <xml name="param_root">
1034 <param argument="root" type="text" value="" label="Comma-separated roots" help="If choosing a tree layout, this is the index of the root node or a list of root node indices. If this is a non-empty vector then the supplied node IDs are used as the roots of the trees (or a single tree if the graph is connected). If this is 'None' or an empty list, the root vertices are automatically calculated based on topological sorting.">
1035 <expand macro="sanitize_query" />
1036 </param>
1037 </xml>
1038 <xml name="param_random_state">
1039 <param argument="random_state" type="integer" value="0" label="Random state" help="For layouts with random initialization like 'fr', change this to use different intial states for the optimization. If 'None', the initial state is not reproducible."/>
1040 </xml>
1041 <xml name="inputs_paga">
1042 <param argument="threshold" type="float" min="0" value="0.01" label="Threshold to draw edges" help="Do not draw edges for weights below this threshold. Set to 0 if you want all edges. Discarding low-connectivity edges helps in getting a much clearer picture of the graph."/>
1043 <expand macro="param_groups"/>
1044 <param argument="color" type="text" value="" label="The node colors" help="Gene name or obs. annotation, and also plots the degree of the abstracted graph when passing 'degree_dashed', 'degree_solid'.">
1045 <expand macro="sanitize_query" />
1046 </param>
1047 <param argument="pos" type="data" format="tabular,csv,tsv" optional="true" label="Two-column tabular file storing the x and y coordinates for drawing" help=""/>
1048 <param argument="labels" type="text" value="" label="Comma-separated node labels" help="If none is provided, this defaults to the group labels stored in the categorical for which 'tl.paga' has been computed.">
1049 <expand macro="sanitize_query" />
1050 </param>
1051 <expand macro="param_layout"/>
1052 <param argument="init_pos" type="data" format="tabular,csv,tsv" optional="true" label="Two-column tabular file storing the x and y coordinates for initializing the layout" help=""/>
1053 <expand macro="param_random_state"/>
1054 <expand macro="param_root"/>
1055 <param argument="transitions" type="text" value="" label="Key corresponding to the matrix storing the arrows" help="Key for '.uns['paga']', e.g. 'transistions_confidence'">
1056 <expand macro="sanitize_query" />
1057 </param>
1058 <param argument="solid_edges" type="text" value="connectivities" label="Key corresponding to the matrix storing the edges to be drawn solid black" help="Key for uns/paga">
1059 <expand macro="sanitize_query" />
1060 </param>
1061 <param argument="dashed_edges" type="text" value="" optional="true" label="Key corresponding to the matrix storing the edges to be drawn dashed grey" help="Key for uns/paga. If not set, no dashed edges are drawn.">
1062 <expand macro="sanitize_query" />
1063 </param>
1064 <param argument="single_component" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Restrict to largest connected component?" help=""/>
1065 <param argument="fontsize" type="integer" min="0" value="1" label="Font size for node labels" help=""/>
1066 <param argument="node_size_scale" type="float" min="0" value="1.0" label="Size of the nodes" help=""/>
1067 <param argument="node_size_power" type="float" min="0" value="0.5" label="Power with which groups sizes influence the radius of the nodes" help=""/>
1068 <param argument="edge_width_scale" type="float" min="0" value="5" label="Scale for edge width" help=""/>
1069 <param argument="min_edge_width" type="float" min="0" value="" optional="true" label="Min width of solid edges" help=""/>
1070 <param argument="max_edge_width" type="float" min="0" value="" optional="true" label="Max width of solid and dashed edges" help=""/>
1071 <param argument="arrowsize" type="integer" min="0" value="30" label="Arrow size" help="For directed graphs, choose the size of the arrow head head's length and width."/>
1072 <param argument="normalize_to_color" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Normalize categorical plots to color or the underlying grouping?" help=""/>
1073 <expand macro="param_cmap"/>
1074 <expand macro="param_title"/>
1075 <expand macro="param_frameon"/>
1076 </xml>
1077 <token name="@CMD_params_pl_paga@"><![CDATA[
1078 threshold=$method.threshold,
1079 #if $method.groups
1080 #set $groups=([x.strip() for x in str($method.groups).split(',')])
1081 groups=$groups,
1082 #end if
1083 #if $method.color
1084 #set $color=([x.strip() for x in str($method.color).split(',')])
1085 color=$color,
1086 #end if
1087 #if $method.pos
1088 pos=np.fromfile($method.pos, dtype=dt),
1089 #end if
1090 #if $method.labels
1091 #set $labels=([x.strip() for x in str($method.labels).split(',')])
1092 labels=$labels,
1093 #end if
1094 layout='$method.layout',
1095 #if $method.init_pos
1096 init_pos=np.fromfile($method.init_pos, dtype=dt),
1097 #end if
1098 random_state=$method.random_state,
1099 #if $method.root
1100 #set $root=([int(x.strip()) for x in str($method.root).split(',')])
1101 root=$root,
1102 #end if
1103 #if $method.transitions
1104 transitions='$method.transitions',
1105 #end if
1106 solid_edges='$method.solid_edges',
1107 #if $method.dashed_edges
1108 dashed_edges='$method.dashed_edges',
1109 #end if
1110 single_component=$method.single_component,
1111 fontsize=$method.fontsize,
1112 node_size_scale=$method.node_size_scale,
1113 node_size_power=$method.node_size_power,
1114 edge_width_scale=$method.edge_width_scale,
1115 #if str($method.min_edge_width) != ''
1116 min_edge_width=$method.min_edge_width,
1117 #end if
1118 #if str($method.max_edge_width) != ''
1119 max_edge_width=$method.max_edge_width,
1120 #end if
1121 arrowsize=$method.arrowsize,
1122 normalize_to_color=$method.normalize_to_color,
1123 #if $method.cmap
1124 cmap='$method.cmap',
1125 #end if
1126 #if $method.title
1127 title='$method.title',
1128 #end if
1129 frameon=$method.frameon,
1130 ]]>
1131 </token>
1132 <xml name="param_swap_axes">
1133 <param argument="swap_axes" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Swap axes?" help="By default, the x axis contains 'var_names' (e.g. genes) and the y axis the 'groupby' categories (if any). By setting 'swap_axes' then x are the 'groupby' categories and y the 'var_names'."/>
1134 </xml>
1135 <xml name="gene_symbols">
1136 <param argument="gene_symbols" type="text" value="" optional="true" label="Key for field in '.var' that stores gene symbols">
1137 <expand macro="sanitize_query" />
1138 </param>
1139 </xml>
1140 <xml name="param_n_genes">
1141 <param argument="n_genes" type="integer" min="0" value="10" label="Number of genes to show" help="It is only used if you are not specifying certain variable names"/>
1142 </xml>
1143 <xml name="pl_dotplot">
1144 <param argument="color_map" type="select" optional="true" label="Color palette">
1145 <expand macro="matplotlib_pyplot_colormap"/>
1146 </param>
1147 <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."/>
1148 <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."/>
1149 <expand macro="section_matplotlib_pyplot_scatter"/>
1150 </xml>
1151 <token name="@CMD_pl_dotplot@"><![CDATA[
1152 #if $method.color_map
1153 color_map='$method.color_map',
1154 #end if
1155 #if str($method.dot_max) != ''
1156 dot_max=$method.dot_max,
1157 #end if
1158 #if str($method.dot_min) != ''
1159 dot_min=$method.dot_min,
1160 #end if
1161 @CMD_params_matplotlib_pyplot_scatter@
1162 ]]>
1163 </token>
1164 <xml name="param_key">
1165 <param argument="key" type="text" value="" label="Key used to store the ranking results in 'uns'">
1166 <expand macro="sanitize_query" />
1167 </param>
1168 </xml>
1169 <xml name="pl_heatmap">
1170 <expand macro="param_swap_axes"/> 812 <expand macro="param_swap_axes"/>
1171 <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."/> 813 <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."/>
814 <expand macro="param_standard_scale"/>
1172 <section name="matplotlib_pyplot_imshow" title="Parameters for matplotlib.pyplot.imshow"> 815 <section name="matplotlib_pyplot_imshow" title="Parameters for matplotlib.pyplot.imshow">
1173 <expand macro="param_cmap"/> 816 <expand macro="param_cmap"/>
1174 <param name="interpolation" type="select" label="Interpolation method" help=""> 817 <param name="interpolation" type="select" label="Interpolation method">
1175 <option value="None">none</option> 818 <option value="None" selected="true">none</option>
1176 <option value="nearest">nearest</option> 819 <option value="nearest">nearest</option>
1177 <option value="bilinear">bilinear</option> 820 <option value="bilinear">bilinear</option>
1178 <option value="bicubic">bicubic</option> 821 <option value="bicubic">bicubic</option>
1179 <option value="spline16">spline16</option> 822 <option value="spline16">spline16</option>
1180 <option value="spline36">spline36</option> 823 <option value="spline36">spline36</option>
1192 </param> 835 </param>
1193 <expand macro="param_alpha"/> 836 <expand macro="param_alpha"/>
1194 <expand macro="param_vmin"/> 837 <expand macro="param_vmin"/>
1195 <expand macro="param_vmax"/> 838 <expand macro="param_vmax"/>
1196 <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."> 839 <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.">
1197 <option value="upper">Upper</option> 840 <option value="upper" selected="true">Upper</option>
1198 <option value="lower">Lower</option> 841 <option value="lower">Lower</option>
1199 </param> 842 </param>
1200 </section> 843 </section>
1201 </xml> 844 </xml>
1202 <token name="@CMD_pl_heatmap@"><![CDATA[ 845 <token name="@CMD_PARAMS_PL_HEATMAP@"><![CDATA[
1203 swap_axes=$method.swap_axes, 846 swap_axes=$method.swap_axes,
1204 show_gene_labels=$method.show_gene_labels, 847 show_gene_labels=$method.show_gene_labels,
1205 #if $method.matplotlib_pyplot_imshow.cmap 848 @CMD_STANDARD_SCALE@
849 #if $method.matplotlib_pyplot_imshow.cmap:
1206 cmap='$method.matplotlib_pyplot_imshow.cmap', 850 cmap='$method.matplotlib_pyplot_imshow.cmap',
1207 #end if 851 #end if
1208 #if str($method.matplotlib_pyplot_imshow.interpolation) != 'None' 852 #if str($method.matplotlib_pyplot_imshow.interpolation) != 'None':
1209 interpolation='$method.matplotlib_pyplot_imshow.interpolation', 853 interpolation='$method.matplotlib_pyplot_imshow.interpolation',
1210 #end if 854 #end if
1211 #if str($method.matplotlib_pyplot_imshow.alpha) != '' 855 #if str($method.matplotlib_pyplot_imshow.alpha) != '':
1212 alpha=$method.matplotlib_pyplot_imshow.alpha, 856 alpha=$method.matplotlib_pyplot_imshow.alpha,
1213 #end if 857 #end if
1214 #if str($method.matplotlib_pyplot_imshow.vmin) != '' 858 #if str($method.matplotlib_pyplot_imshow.vmin) != '':
1215 vmin=$method.matplotlib_pyplot_imshow.vmin, 859 vmin=$method.matplotlib_pyplot_imshow.vmin,
1216 #end if 860 #end if
1217 #if str($method.matplotlib_pyplot_imshow.vmax) != '' 861 #if str($method.matplotlib_pyplot_imshow.vmax) != '':
1218 vmax=$method.matplotlib_pyplot_imshow.vmax, 862 vmax=$method.matplotlib_pyplot_imshow.vmax,
1219 #end if 863 #end if
1220 origin='$method.matplotlib_pyplot_imshow.origin' 864 origin='$method.matplotlib_pyplot_imshow.origin',
1221 ]]> 865 ]]>
1222 </token> 866 </token>
1223 <xml name="pl_rank_genes_groups_ext"> 867
1224 <expand macro="param_groups"/> 868 <xml name="params_pl_matrixplot">
1225 <expand macro="param_n_genes"/>
1226 <expand macro="param_key"/>
1227 </xml>
1228 <token name="@CMD_pl_rank_genes_groups_ext@"><![CDATA[
1229 @CMD_params_groups@
1230 n_genes=$method.n_genes,
1231 #if $method.key
1232 key='$method.key',
1233 #end if
1234 ]]>
1235 </token>
1236 <xml name="pl_matrixplot">
1237 <expand macro="param_swap_axes"/> 869 <expand macro="param_swap_axes"/>
1238 <section name="matplotlib_pyplot_pcolor" title="Parameters for matplotlib.pyplot.pcolor"> 870 <section name="matplotlib_pyplot_pcolor" title="Parameters for matplotlib.pyplot.pcolor">
1239 <param argument="cmap" type="select" optional="true" label="Color palette"> 871 <param argument="cmap" type="select" optional="true" label="Color palette">
1240 <expand macro="seaborn_color_palette_options"/> 872 <expand macro="seaborn_color_palette_options"/>
1241 </param> 873 </param>
1242 <param argument="vmin" type="float" value="" optional="true" label="Minimum value to anchor the colormap" help=""/>
1243 <param argument="vmax" type="float" value="" optional="true" label="Maximum value to anchor the colormap" help=""/>
1244 <expand macro="param_matplotlib_pyplot_edgecolors"/> 874 <expand macro="param_matplotlib_pyplot_edgecolors"/>
1245 <expand macro="param_alpha"/> 875 <expand macro="param_alpha"/>
1246 <param argument="snap" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Snap the mesh to pixel boundaries?" help=""/> 876 <param argument="snap" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Snap the mesh to pixel boundaries?"/>
1247 </section> 877 </section>
1248 </xml> 878 <expand macro="param_standard_scale"/>
1249 <token name="@CMD_pl_matrixplot@"><![CDATA[ 879 <expand macro="param_vmin" label="The value representing the lower limit of the color scale" help="Values smaller than vmin are plotted with the same color as vmin."/>
880 <expand macro="param_vmax" label="The value representing the upper limit of the color scale" help="Values larger than vmax are plotted with the same color as vmax."/>
881 <expand macro="param_vcenter"/>
882 </xml>
883 <token name="@CMD_PARAMS_PL_MATRIXPLOT@"><![CDATA[
1250 swap_axes=$method.swap_axes, 884 swap_axes=$method.swap_axes,
1251 #if $method.matplotlib_pyplot_pcolor.cmap 885 #if $method.matplotlib_pyplot_pcolor.cmap:
1252 cmap='$method.matplotlib_pyplot_pcolor.cmap', 886 cmap='$method.matplotlib_pyplot_pcolor.cmap',
1253 #end if 887 #end if
1254 #if str($method.matplotlib_pyplot_pcolor.vmin) != '' 888 #if $method.matplotlib_pyplot_pcolor.edgecolors:
1255 vmin=$method.matplotlib_pyplot_pcolor.vmin, 889 edgecolor='$method.matplotlib_pyplot_pcolor.edgecolors',
1256 #end if 890 #end if
1257 #if str($method.matplotlib_pyplot_pcolor.vmax) != '' 891 #if str($method.matplotlib_pyplot_pcolor.alpha) != '':
1258 vmax=$method.matplotlib_pyplot_pcolor.vmax,
1259 #end if
1260 #if $method.matplotlib_pyplot_pcolor.edgecolors
1261 ec='$method.matplotlib_pyplot_pcolor.edgecolors',
1262 #end if
1263 #if str($method.matplotlib_pyplot_pcolor.alpha) != ''
1264 alpha=$method.matplotlib_pyplot_pcolor.alpha, 892 alpha=$method.matplotlib_pyplot_pcolor.alpha,
1265 #end if 893 #end if
1266 snap=$method.matplotlib_pyplot_pcolor.snap 894 snap=$method.matplotlib_pyplot_pcolor.snap,
1267 ]]> 895 #if str($method.vmin) != '':
1268 </token> 896 vmin=$method.vmin,
1269 <xml name="pl_stacked_violin"> 897 #end if
898 #if str($method.vmax) != '':
899 vmax=$method.vmax,
900 #end if
901 #if str($method.vcenter) != '':
902 vcenter=$method.vcenter,
903 #end if
904 @CMD_STANDARD_SCALE@
905 ]]>
906 </token>
907
908 <xml name="conditional_stripplot">
909 <conditional name="stripplot">
910 <param argument="stripplot" type="select" label="Add a stripplot on top of the violin plot">
911 <option value="True" selected="true">Yes</option>
912 <option value="False">No</option>
913 </param>
914 <when value="True">
915 <conditional name="jitter">
916 <param argument="jitter" type="select" label="Add a jitter to the stripplot">
917 <option value="True" selected="true">Yes</option>
918 <option value="False">No</option>
919 </param>
920 <when value="True">
921 <param argument="size" type="float" min="0" value="1" label="Size of the jitter points"/>
922 </when>
923 <when value="False"/>
924 </conditional>
925 </when>
926 <when value="False"/>
927 </conditional>
928 </xml>
929 <token name="@CMD_CONDITIONAL_STRIPPLOT@"><![CDATA[
930 stripplot=$method.violin_plot.stripplot.stripplot,
931 #if str($method.violin_plot.stripplot.stripplot) == 'True':
932 jitter=$method.violin_plot.stripplot.jitter.jitter,
933 #if str($method.violin_plot.stripplot.jitter.jitter) == 'True':
934 size=$method.violin_plot.stripplot.jitter.size,
935 #end if
936 #end if
937 ]]>
938 </token>
939
940 <xml name="params_seaborn_violinplot">
941 <section name="seaborn_violinplot" title="Parameters for seaborn.violinplot">
942 <param argument="bw_method" type="select" label="Name of a reference rule when computing the kernel bandwidth">
943 <option value="scott" selected="true">scott</option>
944 <option value="silverman">silverman</option>
945 </param>
946 <param argument="bw_adjust" type="float" value="1" label="Factor that scales the bandwidth to use more or less smoothing."/>
947 <param argument="orient" type="select" optional="true" label="Orientation of the plot">
948 <option value="v">vertical</option>
949 <option value="h">horizontal</option>
950 </param>
951 <param argument="linewidth" type="float" value="" optional="true" label="Width of the gray lines that frame the plot elements"/>
952 <param argument="color" type="select" optional="true" label="Color for all of the elements">
953 <expand macro="matplotlib_color"/>
954 </param>
955 <param argument="saturation" type="float" value="0.75" min="0" max="1" label="Proportion of the original saturation to draw colors at"/>
956 </section>
957 </xml>
958 <token name="@CMD_PARAMS_SEABORN_VIOLINPLOT@"><![CDATA[
959 bw_method='$method.seaborn_violinplot.bw_method',
960 bw_adjust=$method.seaborn_violinplot.bw_adjust,
961 #if $method.seaborn_violinplot.orient:
962 orient='$method.seaborn_violinplot.orient',
963 #end if
964 #if str($method.seaborn_violinplot.linewidth) != '':
965 linewidth=$method.seaborn_violinplot.linewidth,
966 #end if
967 #if $method.seaborn_violinplot.color:
968 color='$method.seaborn_violinplot.color',
969 #end if
970 saturation=$method.seaborn_violinplot.saturation,
971 ]]></token>
972
973 <xml name="param_color">
974 <param argument="color" type="text" value="" optional="true" label="Keys for annotations of observations/cells or variables/genes" help="One or a list of comma-separated index or key from either '.obs' or '.var'">
975 <expand macro="sanitize_query"/>
976 </param>
977 </xml>
978 <token name="@CMD_PARAM_COLOR@"><![CDATA[
979 #if str($method.color) != '':
980 #set $color = ([x.strip() for x in str($method.color).split(',')])
981 color=$color,
982 #end if
983 ]]>
984 </token>
985
986 <xml name="param_groups">
987 <param argument="groups" type="text" value="" optional="true" label="Categorical observation annotations to plot" help="Comma-separated">
988 <expand macro="sanitize_query"/>
989 </param>
990 </xml>
991 <token name="@CMD_PARAM_GROUPS@"><![CDATA[
992 #if str($method.groups) != '':
993 #set $groups=([x.strip() for x in str($method.groups).split(',')])
994 groups=$groups,
995 #end if
996 ]]>
997 </token>
998
999
1000 <xml name="param_pl_components">
1001 <repeat name="components" title="Component">
1002 <param argument="axis1" type="text" value="1" label="X-Axis">
1003 <expand macro="sanitize_query"/>
1004 </param>
1005 <param argument="axis2" type="text" value="2" label="Y-Axis">
1006 <expand macro="sanitize_query"/>
1007 </param>
1008 </repeat>
1009 </xml>
1010 <token name="@CMD_PARAM_PL_COMPONENTS@"><![CDATA[
1011 #if len($method.plot.components) > 0:
1012 #set $components=[]
1013 #for $i, $s in enumerate($method.plot.components)
1014 #silent $components.append(str($s.axis1) + ',' + str($s.axis2))
1015 #end for
1016 components=$components,
1017 #end if
1018 ]]>
1019 </token>
1020
1021 <xml name="param_legend_fontsize">
1022 <param argument="legend_fontsize" type="integer" optional="true" value="" label="Legend font size"/>
1023 </xml>
1024 <token name="@CMD_PARAM_LEGEND_FONTSIZE@"><![CDATA[
1025 #if str($method.plot.legend_fontsize) != '':
1026 legend_fontsize=$method.plot.legend_fontsize,
1027 #end if
1028 ]]>
1029 </token>
1030
1031 <xml name="param_size">
1032 <param argument="size" type="float" optional="true" value="" label="Point size"/>
1033 </xml>
1034 <token name="@CMD_PARAM_SIZE@"><![CDATA[
1035 #if str($method.plot.size) != '':
1036 size=$method.plot.size,
1037 #end if
1038 ]]>
1039 </token>
1040
1041 <xml name="param_title">
1042 <param argument="title" type="text" value="" optional="true" label="Title for panels" help="Titles must be separated by a comma">
1043 <expand macro="sanitize_query"/>
1044 </param>
1045 </xml>
1046 <token name="@CMD_PARAM_TITLE@"><![CDATA[
1047 #if str($method.plot.title) != '':
1048 title='$method.plot.title',
1049 #end if
1050 ]]>
1051 </token>
1052
1053 <xml name="param_projection">
1054 <param argument="projection" type="select" label="Projection of plot">
1055 <option value="2d" selected="true">2d</option>
1056 <option value="3d">3d</option>
1057 </param>
1058 </xml>
1059 <xml name="param_legend_loc">
1060 <param argument="legend_loc" type="select" label="Location of legend">
1061 <yield />
1062 <option value="none">none</option>
1063 <option value="on data export">on data export</option>
1064 <option value="best">best</option>
1065 <option value="upper right">upper right</option>
1066 <option value="upper left">upper left</option>
1067 <option value="lower left">lower left</option>
1068 <option value="lower right">lower right</option>
1069 <option value="right">right</option>
1070 <option value="center left">center left</option>
1071 <option value="center right">center right</option>
1072 <option value="lower center">lower center</option>
1073 <option value="upper center">upper center</option>
1074 <option value="center">center</option>
1075 </param>
1076 </xml>
1077 <xml name="param_legend_fontweight">
1078 <param argument="legend_fontweight" type="select" label="Legend font weight">
1079 <option value="bold" selected="true">bold</option>
1080 <option value="normal">normal</option>
1081 <option value="light">light</option>
1082 <option value="medium">medium</option>
1083 <option value="semibold">semibold</option>
1084 <option value="heavy">heavy</option>
1085 <option value="black">black</option>
1086 </param>
1087 </xml>
1088 <xml name="param_color_map">
1089 <param argument="color_map" type="select" optional="true" label="Color map to use for continous variables">
1090 <expand macro="matplotlib_pyplot_colormap"/>
1091 </param>
1092 </xml>
1093 <xml name="param_palette">
1094 <param argument="palette" type="select" optional="true" label="Colors to use for plotting categorical annotation groups">
1095 <expand macro="matplotlib_pyplot_colormap"/>
1096 </param>
1097 </xml>
1098 <xml name="param_frameon">
1099 <param argument="frameon" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Draw a frame around the scatter plot?"/>
1100 </xml>
1101 <xml name="param_ncols">
1102 <param argument="ncols" type="integer" min="0" value="4" label="Number of panels per row"/>
1103 </xml>
1104 <xml name="param_wspace">
1105 <param argument="wspace" type="float" min="0" value="0.1" label="Width of the space between multiple panels"/>
1106 </xml>
1107 <xml name="param_hspace">
1108 <param argument="hspace" type="float" min="0" value="0.25" label="Height of the space between multiple panels"/>
1109 </xml>
1110
1111 <xml name="params_pl_attribute_section">
1112 <section name="plot" title="Plot attributes">
1113 <expand macro="param_pl_components"/>
1114 <expand macro="param_projection"/>
1115 <expand macro="param_legend_loc">
1116 <option value="right margin">right margin</option>
1117 <option value="on data">on data</option>
1118 </expand>
1119 <expand macro="param_legend_fontsize"/>
1120 <expand macro="param_legend_fontweight"/>
1121 <expand macro="param_size"/>
1122 <expand macro="param_color_map"/>
1123 <expand macro="param_palette"/>
1124 <expand macro="param_frameon"/>
1125 <expand macro="param_ncols"/>
1126 <expand macro="param_wspace"/>
1127 <expand macro="param_hspace"/>
1128 <expand macro="param_title"/>
1129 </section>
1130 </xml>
1131 <token name="@CMD_PARAMS_PL_ATTRIBUTE_SECTION@"><![CDATA[
1132 @CMD_PARAM_PL_COMPONENTS@
1133 projection='$method.plot.projection',
1134 #if str($method.plot.legend_loc) != '':
1135 legend_loc='$method.plot.legend_loc',
1136 #end if
1137 @CMD_PARAM_LEGEND_FONTSIZE@
1138 legend_fontweight='$method.plot.legend_fontweight',
1139 @CMD_PARAM_SIZE@
1140 #if $method.plot.color_map:
1141 color_map='$method.plot.color_map',
1142 #end if
1143 #if $method.plot.palette:
1144 palette='$method.plot.palette',
1145 #end if
1146 frameon=$method.plot.frameon,
1147 ncols=$method.plot.ncols,
1148 wspace=$method.plot.wspace,
1149 hspace=$method.plot.hspace,
1150 @CMD_PARAM_TITLE@
1151 ]]>
1152 </token>
1153
1154 <xml name="pl_edges">
1155 <conditional name="edges">
1156 <param argument="edges" type="select" label="Show edges?">
1157 <option value="False" selected="true">No</option>
1158 <option value="True">Yes</option>
1159 </param>
1160 <when value="True">
1161 <param argument="edges_width" type="float" min="0" value="0.1" label="Width of edges"/>
1162 <param argument="edges_color" type="select" optional="true" label="Color of edges">
1163 <expand macro="matplotlib_color"/>
1164 </param>
1165 </when>
1166 <when value="False"/>
1167 </conditional>
1168 </xml>
1169 <token name="@CMD_PL_EDGES@"><![CDATA[
1170 #if str($method.edges.edges) == 'True':
1171 edges=True,
1172 edges_width=$method.edges.edges_width,
1173 #if $method.edges.edges_color:
1174 edges_color='$method.edges.edges_color',
1175 #end if
1176 #else
1177 edges=False,
1178 #end if
1179 ]]>
1180 </token>
1181
1182
1183 <xml name="options_layout">
1184 <option value="fa" selected="true">fa: ForceAtlas2</option>
1185 <option value="drl">drl: Distributed Recursive Layout, pretty fast</option>
1186 <option value="fr">fr: Fruchterman-Reingold</option>
1187 <option value="grid_fr">grid_fr: Grid Fruchterman Reingold, faster than "fr"</option>
1188 <option value="kk">kk: Kamadi Kawai’, slower than "fr"</option>
1189 <option value="lgl">Large Graph, very fast</option>
1190 <option value="rt">rt: Reingold Tilford tree layout</option>
1191 <option value="rt_circular">rt_circular: Reingold Tilford tree circular</option>
1192 </xml>
1193 <xml name="param_layout">
1194 <param argument="layout" type="select" label="Plotting layout" optional="false">
1195 <expand macro="options_layout"/>
1196 </param>
1197 </xml>
1198 <xml name="params_pl_paga">
1199 <param argument="threshold" type="float" min="0" value="" optional="true" label="Threshold to draw edges" help="Do not draw edges for weights below this threshold. Set to 0 if you want all edges. Discarding low-connectivity edges helps in getting a much clearer picture of the graph."/>
1200 <expand macro="param_groups"/>
1201 <param argument="color" type="text" value="" label="The node colors" help="Gene name or obs. annotation, and also plots the degree of the abstracted graph when passing 'degree_dashed', 'degree_solid'.">
1202 <expand macro="sanitize_query"/>
1203 </param>
1204 <param argument="pos" type="data" format="tabular,csv,tsv" optional="true" label="Two-column tabular file storing the x and y coordinates for drawing"/>
1205 <param argument="labels" type="text" value="" label="Comma-separated node labels" help="If none is provided, this defaults to the group labels stored in the categorical for which 'tl.paga' has been computed.">
1206 <expand macro="sanitize_query"/>
1207 </param>
1208 <expand macro="param_layout"/>
1209 <param argument="init_pos" type="data" format="tabular,csv,tsv" optional="true" label="Two-column tabular file storing the x and y coordinates for initializing the layout"/>
1210 <param argument="random_state" type="integer" value="0" label="For layouts with random initialization like 'fr', change this to use different intial states for the optimization. If 'None', the initial state is not reproducible."/>
1211 <param argument="root" type="text" value="0" label="Comma-separated roots" help="If choosing a tree layout, this is the index of the root node or a list of root node indices. If this is a non-empty vector then the supplied node IDs are used as the roots of the trees (or a single tree if the graph is connected). If this is 'None' or an empty list, the root vertices are automatically calculated based on topological sorting.">
1212 <expand macro="sanitize_query"/>
1213 </param>
1214 <param argument="transitions" type="text" value="" label="Key corresponding to the matrix storing the arrows" help="Key for '.uns['paga']', e.g. 'transistions_confidence'">
1215 <expand macro="sanitize_query"/>
1216 </param>
1217 <param argument="solid_edges" type="text" value="connectivities" label="Key corresponding to the matrix storing the edges to be drawn solid black" help="Key for uns/paga">
1218 <expand macro="sanitize_query"/>
1219 </param>
1220 <param argument="dashed_edges" type="text" value="" optional="true" label="Key corresponding to the matrix storing the edges to be drawn dashed grey" help="Key for uns/paga. If not set, no dashed edges are drawn.">
1221 <expand macro="sanitize_query"/>
1222 </param>
1223 <param argument="single_component" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Restrict to largest connected component?"/>
1224 <param argument="fontsize" type="integer" min="0" value="" optional="true" label="Font size for node labels"/>
1225 <param argument="node_size_scale" type="float" min="0" value="1.0" label="Size of the nodes"/>
1226 <param argument="node_size_power" type="float" min="0" value="0.5" label="Power with which groups sizes influence the radius of the nodes"/>
1227 <param argument="edge_width_scale" type="float" min="0" value="1.0" label="Scale for edge width"/>
1228 <param argument="min_edge_width" type="float" min="0" value="" optional="true" label="Min width of solid edges"/>
1229 <param argument="max_edge_width" type="float" min="0" value="" optional="true" label="Max width of solid and dashed edges"/>
1230 <param argument="arrowsize" type="integer" min="0" value="30" label="Arrow size" help="For directed graphs, choose the size of the arrow head head's length and width."/>
1231 <param argument="normalize_to_color" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Normalize categorical plots to color or the underlying grouping?"/>
1232 <expand macro="param_cmap"/>
1233 <expand macro="param_title"/>
1234 <expand macro="param_frameon"/>
1235 </xml>
1236 <token name="@CMD_PARAMS_PL_PAGA@"><![CDATA[
1237 #if str($method.threshold) != '':
1238 threshold=$method.threshold,
1239 #end if
1240 #if str($method.groups) != '':
1241 #set $groups=([x.strip() for x in str($method.groups).split(',')])
1242 groups=$groups,
1243 #end if
1244 #if str($method.color) != '':
1245 #set $color=([x.strip() for x in str($method.color).split(',')])
1246 color=$color,
1247 #end if
1248 #if $method.pos:
1249 pos=np.fromfile($method.pos, dtype=dt),
1250 #end if
1251 #if str($method.labels) != '':
1252 #set $labels=([x.strip() for x in str($method.labels).split(',')])
1253 labels=$labels,
1254 #end if
1255 layout='$method.layout',
1256 #if $method.init_pos:
1257 init_pos=np.fromfile($method.init_pos, dtype=dt),
1258 #end if
1259 random_state=$method.random_state,
1260 #if str($method.root) != '':
1261 #set $root=([int(x.strip()) for x in str($method.root).split(',')])
1262 root=$root,
1263 #end if
1264 #if str($method.transitions) != '':
1265 transitions='$method.transitions',
1266 #end if
1267 solid_edges='$method.solid_edges',
1268 #if str($method.dashed_edges) != '':
1269 dashed_edges='$method.dashed_edges',
1270 #end if
1271 single_component=$method.single_component,
1272 fontsize=$method.fontsize,
1273 node_size_scale=$method.node_size_scale,
1274 node_size_power=$method.node_size_power,
1275 edge_width_scale=$method.edge_width_scale,
1276 #if str($method.min_edge_width) != '':
1277 min_edge_width=$method.min_edge_width,
1278 #end if
1279 #if str($method.max_edge_width) != '':
1280 max_edge_width=$method.max_edge_width,
1281 #end if
1282 arrowsize=$method.arrowsize,
1283 normalize_to_color=$method.normalize_to_color,
1284 #if $method.cmap:
1285 cmap='$method.cmap',
1286 #end if
1287 #if str($method.title) != '':
1288 title='$method.title',
1289 #end if
1290 frameon=$method.frameon,
1291 ]]>
1292 </token>
1293
1294 <xml name="param_gene_symbols">
1295 <param argument="gene_symbols" type="text" value="" optional="true" label="Key for field in '.var' that stores gene symbols" help="By default 'var_names' refer to the index column of the '.var' DataFrame">
1296 <expand macro="sanitize_query"/>
1297 </param>
1298 </xml>
1299 <token name="@CMD_PARAM_GENE_SYMBOLS@"><![CDATA[
1300 #if str($method.gene_symbols) != '':
1301 gene_symbols='$method.gene_symbols',
1302 #end if
1303 ]]>
1304 </token>
1305
1306 <xml name="params_pl_dotplot">
1307 <param argument="color_map" type="select" optional="true" label="Color palette">
1308 <expand macro="matplotlib_pyplot_colormap"/>
1309 </param>
1310 <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."/>
1311 <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."/>
1312 <expand macro="param_standard_scale"/>
1313 <param argument="expression_cutoff" type="float" min="0.0" value="0.0" label="Expression cutoff that is used for binarizing the gene expression and determining the fraction of cells expressing given genes" help="A gene is expressed only if the expression value is greater than this threshold."/>
1314 <param argument="mean_only_expressed" type="boolean" truevalue="True" falsevalue="False" checked="false" label="average the gene expression only over the cells expressing the given genes"/>
1315 <expand macro="section_matplotlib_pyplot_scatter"/>
1316 </xml>
1317 <token name="@CMD_PL_DOTPLOT@"><![CDATA[
1318 #if $method.color_map:
1319 color_map='$method.color_map',
1320 #end if
1321 #if str($method.dot_max) != '':
1322 dot_max=$method.dot_max,
1323 #end if
1324 #if str($method.dot_min) != '':
1325 dot_min=$method.dot_min,
1326 #end if
1327 @CMD_STANDARD_SCALE@
1328 expression_cutoff=$method.expression_cutoff,
1329 mean_only_expressed=$method.mean_only_expressed,
1330 @CMD_SECTION_MATPLOTLIB_PYPLOT_SCATTER@
1331 ]]>
1332 </token>
1333
1334 <xml name="values_to_plot">
1335 <param argument="values_to_plot" type="select" optional="true" label="Values to plot" help="Defualt: plots mean expression. When plotting logfoldchanges a divergent colormap is recommended.">
1336 <option value="scores">Scores</option>
1337 <option value="logfoldchanges">Log foldchanges</option>
1338 <option value="pvals">P-values</option>
1339 <option value="pvals_adj">Adjusted p-values</option>
1340 <option value="log10_pvals">log10 of p-values</option>
1341 <option value="log10_pvals_adj">log10 of adjusted p-values</option>
1342 </param>
1343 </xml>
1344 <token name="@CMD_VALUES_TO_PLOT@"><![CDATA[
1345 #if $method.values_to_plot:
1346 values_to_plot='$method.values_to_plot',
1347 colorbar_title='$method.values_to_plot',
1348 #end if
1349 ]]>
1350 </token>
1351
1352
1353 <xml name="param_n_genes" token_value="">
1354 <param argument="n_genes" type="integer" min="0" value="@VALUE@" optional="true" label="Number of genes to show" help="It is only used if you are not specifying certain variable names"/>
1355 </xml>
1356 <xml name="param_key">
1357 <param argument="key" type="text" value="" label="Key used to store the ranking results in 'uns'">
1358 <expand macro="sanitize_query"/>
1359 </param>
1360 </xml>
1361
1362 <xml name="pl_rank_genes_groups_ext">
1363 <expand macro="pl_var_names"/>
1364 <expand macro="param_groups"/>
1365 <expand macro="param_n_genes" value=""/>
1366 <expand macro="param_key"/>
1367 <param argument="min_logfoldchange" type="integer" optional="true" value="" label="Value to filter genes in groups if their logfoldchange is less than this value"/>
1368 </xml>
1369 <token name="@CMD_PL_RANK_GENES_GROUPS_EXT@"><![CDATA[
1370 #if str($method.var_names.type) == 'custom':
1371 #set $var_names = ([x.strip() for x in str($method.var_names.var_names).split(',')])
1372 var_names=$var_names,
1373 #else if str($method.var_names.type) == 'customfile':
1374 var_names={key: [v for v in list(value.values()) if pd.notna(v)] for key, value in pd.read_csv('$var_names', sep='\t', index_col=0, header=header).to_dict(orient='index').items()},
1375 #end if
1376 @CMD_PARAM_GROUPS@
1377 #if str($method.n_genes) != '':
1378 n_genes=$method.n_genes,
1379 #end if
1380 #if str($method.key) != '':
1381 key='$method.key',
1382 #end if
1383 #if str($method.min_logfoldchange) != '':
1384 min_logfoldchange=$method.min_logfoldchange,
1385 #end if
1386 ]]>
1387 </token>
1388
1389 <xml name="param_density_norm">
1390 <param argument="density_norm" type="select" label="Method used to scale the width of each violin">
1391 <option value="area" selected="true">area: each violin will have the same area</option>
1392 <option value="width">width: each violin will have the same width</option>
1393 <option value="count">count: the width of the violins will be scaled by the number of observations in that bin</option>
1394 </param>
1395 </xml>
1396 <xml name="params_pl_stacked_violin">
1270 <expand macro="param_swap_axes"/> 1397 <expand macro="param_swap_axes"/>
1271 <section name="violin_plot" title="Violin plot attributes"> 1398 <section name="violin_plot" title="Violin plot attributes">
1272 <expand macro="conditional_stripplot"/> 1399 <expand macro="conditional_stripplot"/>
1273 <expand macro="param_scale"/> 1400 <expand macro="param_density_norm"/>
1274 </section> 1401 </section>
1275 <param argument="row_palette" type="select" optional="true" label="Colors to use in each of the stacked violin plots"> 1402 <param argument="row_palette" type="select" optional="true" label="Colors to use in each of the stacked violin plots">
1276 <option value="muted">muted</option> 1403 <option value="muted">muted</option>
1277 <expand macro="seaborn_color_palette_options"/> 1404 <expand macro="seaborn_color_palette_options"/>
1278 </param> 1405 </param>
1279 <param argument="standard_scale" type="select" label="Standardize a dimension between 0 and 1" help="Each variable or observation is subtracted by the minimum and divided each by its maximum."> 1406 <expand macro="param_standard_scale"/>
1280 <option value="None">No standardization</option> 1407 <expand macro="params_seaborn_violinplot"/>
1281 <option value="var">Standardization on variable</option> 1408 <param argument="yticklabels" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Set to view the y tick labels"/>
1282 <option value="obs">Standardization on observation</option> 1409 <expand macro="param_vmin" label="The value representing the lower limit of the color scale" help="Values smaller than vmin are plotted with the same color as vmin."/>
1283 </param> 1410 <expand macro="param_vmax" label="The value representing the upper limit of the color scale" help="Values larger than vmax are plotted with the same color as vmax."/>
1284 <expand macro="seaborn_violinplot"/> 1411 <expand macro="param_vcenter"/>
1285 </xml> 1412 </xml>
1286 <token name="@CMD_pl_stacked_violin@"><![CDATA[ 1413 <token name="@CMD_PARAMS_PL_STACKED_VIOLIN@"><![CDATA[
1287 swap_axes=$method.swap_axes, 1414 swap_axes=$method.swap_axes,
1288 @CMD_conditional_stripplot@ 1415 @CMD_CONDITIONAL_STRIPPLOT@
1289 scale='$method.violin_plot.scale', 1416 density_norm='$method.violin_plot.density_norm',
1290 #if $method.row_palette 1417 #if $method.row_palette:
1291 row_palette='$method.row_palette', 1418 row_palette='$method.row_palette',
1292 #end if 1419 #end if
1293 #if str($method.standard_scale) != 'None' 1420 @CMD_STANDARD_SCALE@
1294 standard_scale='$method.standard_scale', 1421 @CMD_PARAMS_SEABORN_VIOLINPLOT@
1295 #end if 1422 yticklabels=$method.yticklabels,
1296 @CMD_params_seaborn_violinplot@ 1423 #if str($method.vmin) != '':
1297 ]]> 1424 vmin=$method.vmin,
1298 </token> 1425 #end if
1426 #if str($method.vmax) != '':
1427 vmax=$method.vmax,
1428 #end if
1429 #if str($method.vcenter) != '':
1430 vcenter=$method.vcenter,
1431 #end if
1432 ]]>
1433 </token>
1434
1435 <xml name="params_scatter_outine">
1436 <param argument="add_outline" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Add a thin border around groups of dots" help="In some situations this can enhance the aesthetics of the resulting image"/>
1437 <param name="outline_color_border" type="select" optional="true" label="Border color around the scatter dot" help="Default: black">
1438 <expand macro="matplotlib_color"/>
1439 </param>
1440 <param name="outline_color_gap" type="select" optional="true" label="Gap color between the border color and the scatter dot" help="Default: white">
1441 <expand macro="matplotlib_color"/>
1442 </param>
1443 <param argument="outline_width_border" type="float" value="0.3" optional="true" label=" width of the border color as a fraction of the scatter dot size "/>
1444 <param argument="outline_width_gap" type="float" value="0.05" optional="true" label="The width of the gap color"/>
1445 </xml>
1446 <token name="@CMD_SCATTER_OUTINE@"><![CDATA[
1447 add_outline=$method.add_outline,
1448 #if $method.outline_color_border and $method.outline_color_gap:
1449 outline_color=($method.outline_color_border, $method.outline_color_gap),
1450 #end if
1451 outline_width=($method.outline_width_border, $method.outline_width_gap),
1452 ]]>
1453 </token>
1454
1455
1456 <!-- unused macros -->
1457 <!-- <xml name="param_right_margin">
1458 <param argument="right_margin" type="float" value="1" label="Width of the space right of each plotting panel"/>
1459 </xml>
1460 <xml name="param_left_margin">
1461 <param argument="left_margin" type="float" value="1" label="Width of the space left of each plotting panel"/>
1462 </xml> -->
1299 </macros> 1463 </macros>