comparison macros.xml @ 0:d39a96961423 draft

Initial upload
author gbcs-embl-heidelberg
date Wed, 25 Nov 2015 12:36:12 -0500
parents
children f6bc74863c1c
comparison
equal deleted inserted replaced
-1:000000000000 0:d39a96961423
1 <macros>
2
3 <token name="@single_or_paired_cmd@">
4 #if str( $library.type ) == "single":
5 F1=${library.input_1}
6 #elif str( $library.type ) == "paired":
7 F1=${library.input_1}
8 F2=${library.input_2}
9 SAME_HEADERS=${library.SAME_HEADERS}
10 #else
11 ## prepare paired-end collection
12 F1=${library.input_1.forward}
13 F2=${library.input_1.reverse}
14 SAME_HEADERS=${library.SAME_HEADERS}
15 #end if
16 </token>
17
18 <xml name="paired_options">
19 <when value="paired">
20 <param name="input_1" format="fastq" type="data" label="FASTQ file #1"/>
21 <param name="input_2" format="fastq" type="data" label="FASTQ file #2"/>
22 <yield />
23 <param name="SAME_HEADERS" type="boolean"
24 label="Ensure headers of both reads of a pair are identical (SAME_HEADERS)"
25 help="Only applies if barcodes are added to the header (option ADD)"
26 truevalue="true"
27 falsevalue="false" checked="false"/>
28 </when>
29 <when value="paired_collection">
30 <param name="input_1" format="fastq" type="data_collection" collection_type="paired"
31 label="FASTQ Paired Dataset"/>
32 <yield />
33 <param name="SAME_HEADERS" type="boolean"
34 label="Ensure headers of both reads of a pair are identical (SAME_HEADERS)"
35 help="Only applies if barcodes are added to the header (option ADD)"
36 truevalue="true"
37 falsevalue="false" checked="false"/>
38 </when>
39 </xml>
40
41 <token name="@single_or_paired_illu_cmd@">
42 @single_or_paired_cmd@
43 I1=$library.I1
44 #if str( $library.type ) != "single":
45 #if str( $library.I2_CONDITIONAL.I2_AVAILABLE ) == "true":
46 I2=${library.I2_CONDITIONAL.I2}
47 BRED=${library.I2_CONDITIONAL.BRED_CONDITIONAL.BRED}
48 #if str( $library.I2_CONDITIONAL.BRED_CONDITIONAL.BRED ) == "true":
49 STRICT=${library.I2_CONDITIONAL.BRED_CONDITIONAL.STRICT}
50 #end if
51 #end if
52 #end if
53 </token>
54
55 <xml name="single_or_paired_illu">
56 <conditional name="library">
57 <param name="type" type="select" label="Is this single or paired library">
58 <option value="single">Single-end</option>
59 <option value="paired">Paired-end</option>
60 <option value="paired_collection">Paired-end Dataset Collection</option>
61 </param>
62 <when value="single">
63 <param name="input_1" format="fastq" type="data" label="FASTQ file"/>
64 <param name="I1" type="data" format="fastq" label="First Index File"/>
65 </when>
66 <expand macro="paired_options">
67 <param name="I1" type="data" format="fastq" label="First Index File"/>
68 <conditional name="I2_CONDITIONAL">
69 <param name="I2_AVAILABLE" type="select" label="Do you have a second index file?">
70 <option value="true">Yes</option>
71 <option value="false" selected="true">No</option>
72 </param>
73 <when value="true">
74 <param name="I2" type="data" format="fastq" label="Second Index File"/>
75 <expand macro="bred_conditional"/>
76 </when>
77 <when value="false"/>
78 </conditional>
79 </expand>
80 </conditional>
81 </xml>
82
83 <xml name="single_or_paired_general">
84 <conditional name="library">
85 <param name="type" type="select" label="Is this single or paired library">
86 <option value="single">Single-end</option>
87 <option value="paired">Paired-end</option>
88 <option value="paired_collection">Paired-end Dataset Collection</option>
89 </param>
90 <when value="single">
91 <param name="input_1" format="fastq" type="data" label="FASTQ file"/>
92 </when>
93 <expand macro="paired_options">
94 <yield />
95 </expand>
96 </conditional>
97 </xml>
98
99 <token name="@demultiplex_paired_end_cmd_options@">
100 BPOS=$library.BPOS_CONDITIONAL.BPOS
101 #if str( $library.BPOS_CONDITIONAL.BPOS ) == "BOTH":
102 BM=${library.BPOS_CONDITIONAL.BM_CONDITIIONAL.BM}
103 #if str( $library.BPOS_CONDITIONAL.BM_CONDITIIONAL.BM ) == "BOTH":
104 BRED=${library.BPOS_CONDITIONAL.BM_CONDITIIONAL.BRED_CONDITIONAL.BRED}
105 #if str( $library.BPOS_CONDITIONAL.BM_CONDITIIONAL.BRED_CONDITIONAL.BRED ) == "true":
106 STRICT=${library.BPOS_CONDITIONAL.BM_CONDITIIONAL.BRED_CONDITIONAL.STRICT}
107 #end if
108 #end if
109 #end if
110 </token>
111
112 <xml name="demultiplex_paired_end_options">
113 <conditional name="BPOS_CONDITIONAL">
114 <param name="BPOS" type="select" label="Barcode read position (BPOS)" help="where are the barcodes">
115 <option value="READ_1" selected="true">READ_1 (beginning of read from the first fastq file)</option>
116 <option value="READ_2">READ_2 (beginning of read from the second fastq file)</option>
117 <option value="BOTH">BOTH (beginning of both reads)</option>
118 </param>
119 <when value="READ_1"/>
120 <when value="READ_2"/>
121 <when value="BOTH">
122 <conditional name="BM_CONDITIIONAL">
123 <param name="BM" type="select" label="Barcode for sample matching (BM)"
124 help="which barcode should be used for sample look up (BM option)." >
125 <option value="READ_1" selected="true">
126 READ_1 (beginning of read from the first fastq file)
127 </option>
128 <option value="READ_2">
129 READ_2 (beginning of read from the second fastq file)
130 </option>
131 <option value="BOTH">
132 BOTH (beginning of both reads)
133 </option>
134 </param>
135 <when value="READ_1"/>
136 <when value="READ_2"/>
137 <when value="BOTH">
138 <expand macro="bred_conditional"/>
139 </when>
140 </conditional>
141 </when>
142 </conditional>
143 </xml>
144
145 <xml name="bred_conditional">
146 <conditional name="BRED_CONDITIONAL">
147 <param name="BRED" type="select" label="Redundant barcodes (BRED)"
148 help="are the barcodes REDUNDANT i.e. do they both resolve to the same sample.">
149 <option value="true" selected="true">Yes</option>
150 <option value="false">No</option>
151 </param>
152 <when value="true">
153 <param name="STRICT" type="boolean" label="Strict (S)"
154 truevalue="true"
155 falsevalue="false"
156 checked="false"
157 />
158 </when>
159 <when value="false"/>
160 </conditional>
161 </xml>
162
163 <token name="@barcode_option_cmd@">
164 #if str( $barcodes.barcode_list_type_con ) == "text":
165 BARCODE_FILE=${barcode_file_from_text}
166 #else if str( $barcodes.barcode_list_type_con ) == "file":
167 BARCODE_FILE=${barcodes.BARCODE_FILE}
168 #end if
169 </token>
170
171 <xml name="barcode_option">
172 <conditional name="barcodes">
173 <param name="barcode_list_type_con" type="select" label="Barcode list input type">
174 <option value="file" selected="true">Use a tab-delimited file from the history</option>
175 <option value="text">Paste the barcodes list in a text field within the form</option>
176 </param>
177
178 <when value="file">
179 <param name="BARCODE_FILE" type="data" format="tabular,txt" label="Barcode List"
180 help="Barcode list format: one sample per line. First column is sample name and second is the
181 barcode, separated by tab or space. A third and fourth column can be used to specify the resulting
182 file names. See help below."/>
183 </when>
184
185 <when value="text">
186 <param name="barcode_text" type="text" area="True" size="10x30"
187 value="sample_name\tbarcode\n" label="Barcode List"
188 help="Barcode list format: one sample per line. First column is sample name and second is the
189 barcode, separated by tab or space. A third and fourth column can be used to specify the resulting
190 file names. See help below.">
191 <sanitizer>
192 <valid initial="string.printable"></valid>
193 <mapping initial="none"/>
194 </sanitizer>
195 </param>
196 </when>
197 </conditional>
198 </xml>
199
200 <xml name="barcode_config_file">
201 <configfile name="barcode_file_from_text">#set from_text_area = ''
202 #if str( $barcodes.barcode_list_type_con ) == "text":
203 #set from_text_area = $barcodes.barcode_text
204 #end if
205 ${from_text_area}</configfile>
206 </xml>
207
208 <token name="@barcode_len_cmd@">
209 #if str( $LEN ) != "":
210 BCLEN=$LEN
211 #end if
212 </token>
213
214 <xml name="barcode_len_option">
215 <param name="LEN" type="text" value="" label="Barcode Length (LEN)"
216 help="If 'Barcode read position'=BOTH and 'Redundant barcodes'=False, two distinct
217 lengths can be provided using the syntax LEN=X:Z where X and Z are 2 integers representing
218 the barcode length for read_1 and read_2 respectively. Default: empty"/>
219 </xml>
220 <xml name="clip_barcode">
221 <param name="CLIP_BARCODE" type="boolean" label="Remove barcode sequence from read (C)"
222 truevalue="true" falsevalue="false" checked="true"/>
223 </xml>
224
225 <token name="@demultiplexer_common_options_cmd@">
226 ADD=${ADD}
227 MM=$MM
228 MMD=$MMD
229 Q=$MIN_BASE_QUALITY
230 QUALITY_FORMAT=$QUALITY_FORMAT
231 </token>
232 <xml name="demultiplexer_common_options">
233 <param name="ADD" type="boolean"
234 label="Add matched barcode at the end of the read header (ADD)"
235 truevalue="true"
236 falsevalue="false"
237 checked="true"
238 />
239 <param name="MM" type="text" value="1" label="Maximum Mismatches (MM)"
240 help="Maximum mismatches for a barcode to be considered a match." />
241
242 <param name="MMD" type="text" value="1" label="Minimum mismatch difference (MMD)"
243 help="Minimum difference between number of mismatches in the best and second best barcodes for a barcode
244 to be considered a match." />
245
246 <param name="MIN_BASE_QUALITY" type="text" value="10" label="Minimum base quality (Q)"
247 help="Any barcode bases falling below this quality will be
248 considered a mismatch even in the bases match." />
249
250 <param name="QUALITY_FORMAT" type="select" label="Fastq Quality Format (V)"
251 help="How are the quality values encoded in the fastq. Either 'Solexa' for
252 pre-pipeline 1.3 style scores (solexa scaling + 66), 'Illumina' for pipeline 1.3 and
253 above (phred scaling + 64) or 'Standard' for phred scaled scores with a character shift
254 of 33.">
255 <option value="Standard" selected="true">
256 Fastq - Illumina Casava v1.8 with Sanger coding quality (phred scaling + 33)
257 </option>
258 <option value="Illumina">
259 Fastq - Illumina v1.3 or above coding of quality (phred scaling + 64)
260 </option>
261 <option value="Solexa">
262 Fastq - Solexa-style quality (solexa scaling + 66)
263 </option>
264 <option value="null">
265 Detect automatically
266 </option>
267 </param>
268 </xml>
269
270 <token name="@demultiplexer_common_output_options_cmd@">
271 KEEP_UNASSIGNED_READ=$KEEP_UNASSIGNED_READ
272 STATS_ONLY=${adv_options.STATS_ONLY}
273 #if str( $adv_options.DIAG ) == "true":
274 BARCODE_DIAG_FILE=$BARCODE_DIAG_FILE
275 #end if
276 </token>
277 <xml name="demultiplexer_common_output_options">
278 <param name="KEEP_UNASSIGNED_READ" type="boolean" label="Keep unassigned reads (KEEP_UNASSIGNED_READ)"
279 truealue="true"
280 falsevalue="false"
281 checked="true"
282 />
283 <section name="adv_options" title="Advanced Options" expanded="False">
284 <param name="DIAG" type="boolean" label="Output barcode match reporting file (DIAG)"
285 truevalue="true" falsevalue="false" checked="false"
286 help="This file will
287 contain a line per read pair with the barcode best matching the read subsequence or 'null' when no
288 match is found according to matching parameters. This file is useful for debugging or further
289 processing in case both ends are barcoded."/>
290 <param name="STATS_ONLY" type="boolean" label="Only produce metric and diagnostic reports (STATS_ONLY)"
291 truevalue="true" falsevalue="false" checked="false"
292 help="do not demultiplex." />
293 </section>
294 </xml>
295
296 <token name="@common_options_cmd@">
297 XT=${XT}
298 ZT=${ZT}
299 #if str( $RCHAR ) != "":
300 RCHAR=${RCHAR}
301 #end if
302 GZ=${GZ}
303 OUTPUT_DIR=results
304 </token>
305 <xml name="common_options">
306 <param name="XT" type="text" value="0"
307 label="Extra number of bases to be trimmed right after the barcode (XT)" />
308 <param name="ZT" type="text" value="0"
309 label="Extra number of bases to be trimmed from the read end (ZT)" />
310
311 <param name="RCHAR" type="text"
312 label="Replace white space in the read name/header with speficied symbols (RCHAR)"
313 help="Set to empty for no replacement"
314 value=":"/>
315
316 <param name="GZ" type="boolean" hidden="true" label="Compress output (GZ)"
317 help="will result in fastq.gz files."
318 truevalue="true"
319 falsevalue="false"
320 checked="false"/>
321 </xml>
322
323 <token name="@demultiplexer_common_outputs_cmd@">
324 METRICS_FILE_NAME=$METRICS_FILE_NAME
325 </token>
326 <xml name="demultiplexer_common_outputs">
327 <data name="METRICS_FILE_NAME" format="tabular" label="Je-Demultiplex result">
328 <!--<discover_datasets pattern="(?P&lt;name&gt;.*)\.txt" ext="fastqsanger"-->
329 <discover_datasets pattern="(?P&lt;name&gt;.*)\.txt" directory="results" visible="true" ext="fastqsanger"/>
330 </data>
331 <data name="BARCODE_DIAG_FILE" format="tabular" label="Barcode statistics">
332 <filter>(adv_options['DIAG'] == 'true')</filter>
333 </data>
334 </xml>
335
336 </macros>