comparison macros.xml @ 0:4ea021bd7513 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit f880060c478d42202df5b78a81329f8af56b1138
author iuc
date Thu, 22 Nov 2018 04:43:57 -0500
parents
children ee0bbc160cb1
comparison
equal deleted inserted replaced
-1:000000000000 0:4ea021bd7513
1 <macros>
2 <token name="@GET_VERSION@"><![CDATA[ 2>&1 | head -1 | cut -d' ' -f 2 ]]></token>
3 <token name="@STRING2VECTOR@">
4 string2numericvector = function(string){
5 #' Converts a string to a valid vector
6 #'
7 #' e.g. "-1,2:5,2" evaluates to c(-1,2,3,4,5,2)
8 #'
9 #' @param add string2vector function to safe environment
10 #' @return vector of integers
11 terms = unlist(strsplit(string, split=","))
12 res = lapply(terms, function(x){
13 if (grepl(":",x)){
14 l_r = as.integer(c(unlist(strsplit(x,split=":"))))
15 return(seq(l_r[1],l_r[2]))
16 }
17 return(as.integer(x))
18 })
19 return(c(unlist(res)))
20 }
21
22 string2textvector = function(string){
23 #' Converts a string to a valid string vector
24 #'
25 #' e.g. "red,yellow,white" evaluates to c("red","yellow","white")
26 return(unlist(strsplit(string,",")))
27 }
28 </token>
29 <token name="@VERSION_RACEID@">3</token>
30 <token name="@VERSION_PACKAGE@">0.2</token>
31 <macro name="requirements" >
32 <requirements>
33 <requirement type="package" version="0.1.1">r-raceid</requirement>
34 <requirement type="package" version="1.6.2">bioconductor-scran</requirement>
35 </requirements>
36 </macro>
37 <macro name="yesno_checkedno" >
38 <option value="yes" >Yes</option>
39 <option value="no" selected="true" >No</option>
40 </macro>
41 <macro name="use_defaults_no" >
42 <conditional name="use" >
43 <param name="def" type="select" label="Use Defaults?" >
44 <option value="yes" selected="true" >Yes</option>
45 <option value="no" >No</option>
46 </param>
47 <when value="yes" />
48 <when value="no" >
49 <yield />
50 </when>
51 </conditional>
52 </macro>
53 <macro name="test_nondef" >
54 <conditional name="use" >
55 <param name="def" value="no" />
56 <yield />
57 </conditional>
58 </macro>
59 <macro name="section_test_nondef" >
60 <section name="@SECTIONNAME@" >
61 <expand macro="test_nondef" >
62 <yield />
63 </expand>
64 </section>
65 </macro>
66 <macro name="citations" >
67 <citations>
68 <citation type="doi">10.1038/nature14966</citation>
69 <citation type="doi">10.1038/nmeth.4662</citation>
70 </citations>
71 </macro>
72 <macro name="select_cells" token_sectionname="@SECTIONNAME@" token_sectiontitle="@SECTIONTITLE@" >
73 <section name="@SECTIONNAME@" title="@SECTIONTITLE@" expanded="true" >
74 <param name="name_set" type="text" optional="true" label="Name of Set" >
75 <!-- Aname, Bname -->
76 <expand macro="sanitize_title" />
77 </param>
78 <conditional name="meth" >
79 <param name="type" type="select" label="Selection method" >
80 <option value="cln" selected="true">Cluster Numbers</option>
81 <option value="regex" >Regular Expression</option>
82 <option value="manual" >Manual Selection</option>
83 </param>
84 <when value="cln" >
85 <param name="selector" type="text" value="" label="List of clusters" >
86 <expand macro="sanitize_numeric_vector" />
87 </param>
88 </when>
89 <when value="regex" >
90 <param name="selector" type="text" value="" label="Regular Expression to select gene names" >
91 <expand macro="sanitize_regex" />
92 </param>
93 </when>
94 <when value="manual" >
95 <param name="selector" type="text" value="" label="List of genes" >
96 <expand macro="sanitize_string_vector" />
97 </param>
98 </when>
99 </conditional>
100 </section>
101 </macro>
102 <!-- Sanitizers -->
103 <macro name="sanitize_title">
104 <sanitizer invalid_char="">
105 <valid initial="string.letters,string.digits" >
106 <add value=" " />
107 <add value="_" />
108 </valid>
109 </sanitizer>
110 </macro>
111 <macro name="sanitize_regex" >
112 <sanitizer invalid_char="">
113 <valid initial="string.letters,string.digits">
114 <add value="!"/>
115 <add value="="/>
116 <add value="-"/>
117 <add value="."/>
118 <add value="*"/>
119 <add value="?"/>
120 <add value="+"/>
121 <add value="\\"/>
122 <add value="_"/>
123 <add value="|"/>
124 <add value="&#91;"/> <!-- left square bracket, e.g subselecting from vec[1] -->
125 <add value="&#93;"/> <!-- right square bracket -->
126 <add value="&#40;"/> <!-- left parenthesis -->
127 <add value="&#41;"/> <!-- right parenthesis -->
128 </valid>
129 </sanitizer>
130 </macro>
131 <macro name="sanitize_numeric_vector" >
132 <sanitizer invalid_char="">
133 <valid initial="string.digits">
134 <add value=","/>
135 </valid>
136 </sanitizer>
137 </macro>
138 <macro name="sanitize_string_vector" >
139 <sanitizer invalid_char="">
140 <valid initial="string.letters,string.digits">
141 <add value=","/>
142 <add value="_"/>
143 <add value="-"/>
144 <add value="."/>
145 </valid>
146 </sanitizer>
147 </macro>
148 </macros>