changeset 7:6c145a6868cc draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 150c96596b94f9658c8b7c44814c420d38fbee0c"
author iuc
date Wed, 20 May 2020 16:10:30 -0400
parents 5e9171dc8244
children 9d33775ec67d
files inspect.xml macros.xml
diffstat 2 files changed, 113 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/inspect.xml	Thu Feb 20 08:25:37 2020 -0500
+++ b/inspect.xml	Wed May 20 16:10:30 2020 -0400
@@ -41,7 +41,9 @@
             </param>
         </xml>
         <xml name="custom_penalty">
-            <param argument="pen" type="text" value="" label="Norm used in the penalization" help=""/>
+            <param argument="pen" type="text" value="" label="Norm used in the penalization" help="">
+                <expand macro="sanitize_query" />
+            </param>
         </xml>
         <xml name="random_state">
             <param argument="random_state" type="integer" value="" optional="true"
@@ -266,18 +268,26 @@
                 <option value="pp.sqrt">Square root the data matrix, using 'pp.sqrt'</option>
             </param>
             <when value="pp.calculate_qc_metrics">
-                <param argument="expr_type" type="text" value="counts" label="Name of kind of values in X"/>
-                <param argument="var_type" type="text" value="genes" label="The kind of thing the variables are"/>
-                <param argument="qc_vars" type="text" value="" label="Keys for boolean columns of '.var' which identify variables you could want to control for" 
-                    help="Keys separated by a comma"/>
+                <param argument="expr_type" type="text" value="counts" label="Name of kind of values in X">
+                    <expand macro="sanitize_query" />
+                </param>
+                <param argument="var_type" type="text" value="genes" label="The kind of thing the variables are">
+                    <expand macro="sanitize_query" />
+                </param>
+                <param argument="qc_vars" type="text" value="" label="Keys for boolean columns of '.var' which identify variables you could want to control for" help="Keys separated by a comma">
+                    <expand macro="sanitize_query" />
+                </param>
                 <param argument="percent_top" type="text" value="" label="Proportions of top genes to cover" 
-                    help=" Values (integers) are considered 1-indexed, '50' finds cumulative proportion to the 50th most expressed genes. Values separated by a comma. 
-                    If empty don't calculate"/>
+                    help=" Values (integers) are considered 1-indexed, '50' finds cumulative proportion to the 50th most expressed genes. Values separated by a comma. If empty don't calculate">
+                    <expand macro="sanitize_vectors" />
+                </param>
             </when>
             <when value="pp.neighbors">
                 <param argument="n_neighbors" type="integer" min="0" value="15" label="The size of local neighborhood (in terms of number of neighboring data points) used for manifold approximation" help="Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100. If 'knn' is 'True', number of nearest neighbors to be searched. If 'knn' is 'False', a Gaussian kernel width is set to the distance of the 'n_neighbors' neighbor."/>
                 <param argument="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use" help=""/>
-                <param argument="use_rep" type="text" value="" optional="true" label="Indicated representation to use" 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"/>
+                <param argument="use_rep" type="text" value="" optional="true" label="Indicated representation to use" 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">
+                    <expand macro="sanitize_query" />
+                </param>
                 <param argument="knn" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use a hard threshold to restrict the number of neighbors to n_neighbors?" help="If true, it considers a knn graph. Otherwise, it uses a Gaussian Kernel to assign low weights to neighbors more distant than the 'n_neighbors' nearest neighbor."/>
                 <param argument="random_state" type="integer" value="0" label="Numpy random seed" help=""/>
                 <param name="pp_neighbors_method" argument="method" type="select" label="Method for computing connectivities" help="">
@@ -289,13 +299,19 @@
                 </param>
             </when>
             <when value="tl.score_genes">
-                <param argument="gene_list" type="text" value="" label="The list of gene names used for score calculation" help="Genes separated by a comma"/>
+                <param argument="gene_list" type="text" value="" label="The list of gene names used for score calculation" help="Genes separated by a comma">
+                    <expand macro="sanitize_query" />
+                </param>
                 <param argument="ctrl_size" type="integer" value="50" label="Number of reference genes to be sampled"
                     help="If 'len(gene_list)' is not too low, you can set 'ctrl_size=len(gene_list)'."/>
                 <param argument="gene_pool" type="text" value="" optional="true" label="Genes for sampling the reference set"
-                    help="Default is all genes. Genes separated by a comma"/>
+                       help="Default is all genes. Genes separated by a comma">
+                    <expand macro="sanitize_query" />
+                </param>
                 <expand macro="score_genes_params"/>
-                <param argument="score_name" type="text" value="score" label="Name of the field to be added in '.obs'" help=""/>
+                <param argument="score_name" type="text" value="score" label="Name of the field to be added in '.obs'" help="">
+                    <expand macro="sanitize_query" />
+                </param>
             </when>
             <when value="tl.score_genes_cell_cycle">
                 <conditional name='s_genes'>
@@ -304,7 +320,9 @@
                         <option value="text" selected="true">Text</option>
                     </param>
                     <when value="text">
-                        <param name="text" type="text" value="" label="List of genes associated with S phase" help="Genes separated by a comma"/>
+                        <param name="text" type="text" value="" label="List of genes associated with S phase" help="Genes separated by a comma">
+                            <expand macro="sanitize_query" />
+                        </param>
                     </when>
                     <when value="file">
                         <param name="file" type="data" format="txt" label="File with the list of genes associated with S phase" help="One gene per line"/>
@@ -316,7 +334,9 @@
                         <option value="text" selected="true">Text</option>
                     </param>
                     <when value="text">
-                        <param name="text" type="text" value="" label="List of genes associated with G2M phase" help="Genes separated by a comma"/>
+                        <param name="text" type="text" value="" label="List of genes associated with G2M phase" help="Genes separated by a comma">
+                            <expand macro="sanitize_query" />
+                        </param>
                     </when>
                     <when value="file">
                         <param name="file" type="data" format="txt" label="File with the list of genes associated with G2M phase" help="One gene per line"/>
@@ -325,9 +345,13 @@
                 <expand macro="score_genes_params"/>
             </when>
             <when value="tl.rank_genes_groups">
-                <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider" help=""/>
+                <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider" help="">
+                    <expand macro="sanitize_query" />
+                </param>
                 <expand macro="param_use_raw"/>
-                <param argument="groups" type="text" value="" label="Subset of groups to which comparison shall be restricted" help="e.g. ['g1', 'g2', 'g3']. If not passed, a ranking will be generated for all groups."/>
+                <param argument="groups" type="text" value="" label="Subset of groups to which comparison shall be restricted" help="e.g. ['g1', 'g2', 'g3']. If not passed, a ranking will be generated for all groups.">
+                    <expand macro="sanitize_query" />
+                </param>
                 <conditional name="ref">
                     <param name="rest" type="select" label="Comparison">
                         <option value="rest">Compare each group to the union of the rest of the group</option>
@@ -335,7 +359,9 @@
                     </param>
                     <when value="rest"/>
                     <when value="group_id">
-                        <param argument="reference" type="text" value="" label="Group identifier with respect to which compare"/>
+                        <param argument="reference" type="text" value="" label="Group identifier with respect to which compare">
+                            <expand macro="sanitize_query" />
+                        </param>
                     </when>
                 </conditional>
                 <param argument="n_genes" type="integer" min="0" value="100" label="The number of genes that appear in the returned tables" help=""/>
--- a/macros.xml	Thu Feb 20 08:25:37 2020 -0500
+++ b/macros.xml	Wed May 20 16:10:30 2020 -0400
@@ -1,7 +1,7 @@
 <macros>
     <token name="@version@">1.4.4.post1</token>
     <token name="@profile@">19.01</token>
-    <token name="@galaxy_version@"><![CDATA[@version@+galaxy2]]></token>
+    <token name="@galaxy_version@"><![CDATA[@version@+galaxy3]]></token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@version@">scanpy</requirement>
@@ -37,6 +37,20 @@
 import numpy as np
     ]]>
     </token>
+    <xml name="sanitize_query" token_validinitial="string.printable">
+        <sanitizer>
+            <valid initial="@VALIDINITIAL@">
+                <remove value="&apos;" />
+            </valid>
+       </sanitizer>
+    </xml>
+    <xml name="sanitize_vectors" token_validinitial="string.digits">
+        <sanitizer>
+            <valid initial="@VALIDINITIAL@">
+                <add value=","/>
+            </valid>
+        </sanitizer>
+    </xml>
     <xml name="inputs_anndata">
         <param name="adata" type="data" format="h5ad" label="Annotated data matrix"/>
     </xml>
@@ -368,7 +382,9 @@
         <option value="gist_ncar">gist_ncar (Miscellaneous)</option>
     </xml>
     <xml name="param_groupby">
-        <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'."/>
+        <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'.">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <xml name="param_use_raw">
         <param argument="use_raw" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use 'raw' attribute of input if present" help=""/>
@@ -400,7 +416,9 @@
             </param>
             <when value="all"/>
             <when value="custom">
-                <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"/>
+                <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">
+                    <expand macro="sanitize_query" />
+                </param>
             </when>
         </conditional>
     </xml>
@@ -414,14 +432,18 @@
         <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. ">
             <param name="start" type="integer" min="0" value="" label="Start" help=""/>
             <param name="end" type="integer" min="0" value="" label="End" help=""/>
-            <param argument="label" type="text" value="" label="Label" help=""/>
+            <param argument="label" type="text" value="" label="Label" help="">
+                <expand macro="sanitize_query" />
+            </param>
         </repeat>
     </xml>
     <xml name="param_var_group_rotation">
         <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"/>
     </xml>
     <xml name="param_layer">
-        <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'."/>
+        <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'.">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <token name="@CMD_param_plot_inputs@"><![CDATA[
     adata,
@@ -643,7 +665,7 @@
     </xml>
     <xml name="param_vmax">
         <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"/>
-    </xml>    
+    </xml>
     <xml name="section_matplotlib_pyplot_scatter">
         <section name="matplotlib_pyplot_scatter" title="Parameters for matplotlib.pyplot.scatter">
             <!--<param argument="marker" type="select" label="Marker style" help="">
@@ -726,7 +748,7 @@
     size=$method.violin_plot.stripplot.jitter.size,
     #end if
 #end if
-    multi_panel=$method.violin_plot.multi_panel.multi_panel, 
+    multi_panel=$method.violin_plot.multi_panel.multi_panel,
 #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) != ''
     figsize=($method.violin_plot.multi_panel.width, $method.violin_plot.multi_panel.height)
 #end if
@@ -763,7 +785,9 @@
     saturation=$method.seaborn_violinplot.saturation
     ]]></token>
     <xml name="param_color">
-        <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'"/>
+        <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'">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <token name="@CMD_param_color@"><![CDATA[
 #if str($method.color) != ''
@@ -772,7 +796,9 @@
 #end if
     ]]></token>
     <xml name="param_groups">
-        <param argument="groups" type="text" value="" optional="true" label="Categorical observation annotations to plot" help="Comma-separated"/>
+        <param argument="groups" type="text" value="" optional="true" label="Categorical observation annotations to plot" help="Comma-separated">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <token name="@CMD_params_groups@"><![CDATA[
 #if str($method.groups) != ''
@@ -782,8 +808,12 @@
     ]]></token>
     <xml name="pl_components">
         <repeat name="components" title="Component">
-            <param argument="axis1" type="text" value="1" label="X-Axis" help=""/>
-            <param argument="axis2" type="text" value="2" label="Y-Axis" help=""/>
+            <param argument="axis1" type="text" value="1" label="X-Axis" help="">
+                <expand macro="sanitize_query" />
+            </param>
+            <param argument="axis2" type="text" value="2" label="Y-Axis" help="">
+                <expand macro="sanitize_query" />
+            </param>
         </repeat>
     </xml>
     <token name="@CMD_params_pl_components@"><![CDATA[
@@ -842,13 +872,13 @@
     </xml>
     <xml name="param_palette">
         <param argument="palette" type="select" label="Colors to use for plotting categorical annotation groups" help="">
-            <option value="">Default</option>
+            <option value="default">Default</option>
             <expand macro="matplotlib_pyplot_colormap"/>
         </param>
     </xml>
     <xml name="param_color_map">
         <param argument="color_map" type="select" label="Color map to use for continous variables" help="">
-            <option value="">Default</option>
+            <option value="None">Default</option>
             <expand macro="matplotlib_pyplot_colormap"/>
         </param>
     </xml>
@@ -871,7 +901,9 @@
     ]]>
     </token>
     <xml name="param_title">
-        <param argument="title" type="text" value="" optional="true" label="Title for panels" help="Titles must be separated by a comma"/>
+        <param argument="title" type="text" value="" optional="true" label="Title for panels" help="Titles must be separated by a comma">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <token name="@CMD_param_title@"><![CDATA[
     #if $method.plot.title
@@ -950,7 +982,7 @@
     @CMD_param_legend_fontsize@
     legend_fontweight='$method.plot.legend_fontweight',
     @CMD_param_size@
-    #if str($method.plot.color_map) != ''
+    #if str($method.plot.color_map) != 'None'
     color_map='$method.plot.color_map',
     #end if
     #if str($method.plot.palette) != ''
@@ -978,7 +1010,9 @@
         </param>
     </xml>
     <xml name="param_root">
-        <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."/>
+        <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.">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <xml name="param_random_state">
         <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."/>
@@ -986,16 +1020,26 @@
     <xml name="inputs_paga">
         <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."/>
         <expand macro="param_groups"/>
-        <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'."/>
+        <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'.">
+            <expand macro="sanitize_query" />
+        </param>
         <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=""/>
-        <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."/>
+        <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.">
+            <expand macro="sanitize_query" />
+        </param>
         <expand macro="param_layout"/>
         <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=""/>
         <expand macro="param_random_state"/>
         <expand macro="param_root"/>
-        <param argument="transitions" type="text" value="" label="Key corresponding to the matrix storing the arrows" help="Key for '.uns['paga']', e.g. 'transistions_confidence'"/>
-        <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"/>
-        <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."/>
+        <param argument="transitions" type="text" value="" label="Key corresponding to the matrix storing the arrows" help="Key for '.uns['paga']', e.g. 'transistions_confidence'">
+            <expand macro="sanitize_query" />
+        </param>
+        <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">
+            <expand macro="sanitize_query" />
+        </param>
+        <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.">
+            <expand macro="sanitize_query" />
+        </param>
         <param argument="single_component" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Restrict to largest connected component?" help=""/>
         <param argument="fontsize" type="integer" min="0" value="1" label="Font size for node labels" help=""/>
         <param argument="node_size_scale" type="float" min="0" value="1.0" label="Size of the nodes" help=""/>
@@ -1066,7 +1110,9 @@
         <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'."/>
     </xml>
     <xml name="gene_symbols">
-        <param argument="gene_symbols" type="text" value="" optional="true" label="Key for field in '.var' that stores gene symbols"/>
+        <param argument="gene_symbols" type="text" value="" optional="true" label="Key for field in '.var' that stores gene symbols">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <xml name="param_n_genes">
         <param argument="n_genes" type="integer" min="0" value="10" label="Number of genes to show" help=""/>
@@ -1091,7 +1137,9 @@
     ]]>
     </token>
     <xml name="param_key">
-        <param argument="key" type="text" value="" label="Key used to store the ranking results in 'uns'"/>
+        <param argument="key" type="text" value="" label="Key used to store the ranking results in 'uns'">
+            <expand macro="sanitize_query" />
+        </param>
     </xml>
     <xml name="pl_heatmap">
         <expand macro="param_swap_axes"/>