comparison macros.xml @ 22:9a913cdee30e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/multiqc commit 57b36cfbdd1663aef43d03b76e37364cc5bdeef3"
author iuc
date Wed, 03 Nov 2021 15:17:39 +0000
parents
children abfd8a6544d7
comparison
equal deleted inserted replaced
21:75c93c70d094 22:9a913cdee30e
1 <macros>
2 <token name="@TOOL_VERSION@">1.11</token>
3 <token name="@VERSION_SUFFIX@">0</token>
4 <xml name="bio_tools">
5 <xrefs>
6 <xref type="bio.tools">multiqc</xref>
7 </xrefs>
8 </xml>
9 <xml name="requirements">
10 <requirements>
11 <requirement type="package" version="@TOOL_VERSION@">multiqc</requirement>
12 </requirements>
13 </xml>
14
15 <token name="@ESCAPE_IDENTIFIER@">
16 <![CDATA[
17 #set identifier = re.sub('[^\s\w\-]', '_', str($file.element_identifier))
18 ]]></token>
19
20 <token name="@CHECK_LN_FILE@">
21 <![CDATA[
22 #if $file_path in $file_paths
23 #set $file_path += '_' + str($file_paths.count($file_path))
24 #end if
25 #set $file_paths += [$file_path]
26 grep -q '$pattern' $file || die "Module '${repeat.software_cond.software}: '$pattern' not found in the file '$identifier'" &&
27 ln -s '$file' '$file_path' &&
28 ]]></token>
29
30 <token name="@CREATE_REPEAT_DIR_1@">
31 <![CDATA[
32 #set repeat_dir = os.path.join($software_dir, str($repeat2.type) + '_' + str($j))
33 mkdir '$repeat_dir' &&
34 ]]></token>
35
36 <token name="@CREATE_REPEAT_DIR_1@">
37 <![CDATA[
38 #set repeat_dir = os.path.join($software_dir, str($repeat2.type) + '_' + str($j))
39 mkdir '$repeat_dir' &&
40 ]]></token>
41 <token name="@CREATE_REPEAT_DIR_2@">
42 <![CDATA[
43 #set repeat_dir = os.path.join($software_dir, str($repeat2.type.type) + '_' + str($j))
44 mkdir '$repeat_dir' &&
45 ]]></token>
46 <token name="@LN_FILES@">
47 <![CDATA[
48 #set file_paths = []
49 #for $file in $repeat.software_cond.input
50 @ESCAPE_IDENTIFIER@
51 #set file_path = os.path.join($software_dir, str($identifier))
52 @CHECK_LN_FILE@
53 #end for
54 ]]></token>
55
56 <token name="@LN_2_FILES@">
57 <![CDATA[
58 #set file_paths = []
59 @CREATE_REPEAT_DIR_1@
60 #for $file in $repeat2.input
61 #set identifier = re.sub('[^\s\w\-]', '_', str($file.element_identifier))
62 #set file_path = os.path.join($repeat_dir, str($identifier))
63 @CHECK_LN_FILE@
64 #end for
65 ]]></token>
66
67 <token name="@LN_3_FILES@">
68 <![CDATA[
69 #set file_paths = []
70 #for $file in $repeat2.type.input
71 #set identifier = re.sub('[^\s\w\-]', '_', str($file.element_identifier))
72 #set file_path = os.path.join($repeat_dir, str($identifier))
73 @CHECK_LN_FILE@
74 #end for
75 ]]></token>
76
77 <token name="@BISMARK_INPUT@"><![CDATA[
78 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
79 @CREATE_REPEAT_DIR_1@
80 #if str($repeat2.type) == "align"
81 #for $file in $repeat2.input
82 @ESCAPE_IDENTIFIER@
83 #set file_path = os.path.join($repeat_dir, str($identifier) + '_SE_report.txt')
84 ln -s '$file' '$file_path' &&
85 #end for
86 #elif str($repeat2.type) == "dedup"
87 #for $file in $repeat2.input
88 @ESCAPE_IDENTIFIER@
89 #set file_path = os.path.join($repeat_dir, str($identifier) + '_deduplication_report.txt')
90 ln -s '$file' '$file_path' &&
91 #end for
92 #elif str($repeat2.type) == "meth_extract"
93 #for $file in $repeat2.input
94 @ESCAPE_IDENTIFIER@
95 #set file_path = os.path.join($repeat_dir, str($identifier) + '_splitting_report.txt')
96 ln -s '$file' '$file_path' &&
97 #end for
98 #elif str($repeat2.type) == "m_bias"
99 #for $file in $repeat2.input
100 @ESCAPE_IDENTIFIER@
101 #set file_path = os.path.join($repeat_dir, str($identifier) + '_M-bias.txt')
102 ln -s '$file' '$file_path' &&
103 #end for
104 #elif str($repeat2.type) == "bam2nuc"
105 #for $file in $repeat2.input
106 @ESCAPE_IDENTIFIER@
107 #set file_path = os.path.join($repeat_dir, str($identifier) + '.nucleotide_stats.txt')
108 ln -s '$file' '$file_path' &&
109 #end for
110 #end if
111 #end for
112 ]]></token>
113
114 <token name="@DEEPTOOLS_INPUT@"><![CDATA[
115 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
116 #if str($repeat2.type) == "bamPEFragmentSize"
117 #set $pattern = "Frag."
118 @LN_2_FILES@
119 #elif str($repeat2.type) == "estimateReadFiltering"
120 #set $pattern = "Internally-determined Duplicate"
121 @LN_2_FILES@
122 #elif str($repeat2.type) == "plotCoverageStdout"
123 #set $pattern = "sample"
124 @LN_2_FILES@
125 #elif str($repeat2.type) == "plotCoverageOutRawCounts"
126 #set $pattern = "#plotCoverage --outRawCounts"
127 @LN_2_FILES@
128 #elif str($repeat2.type) == "plotEnrichment"
129 #set $pattern = "featureReadCount"
130 @LN_2_FILES@
131 #elif str($repeat2.type) == "plotFingerprintOutRawCounts"
132 #set $pattern = "#plotFingerprint --outRawCounts"
133 @LN_2_FILES@
134 #end if
135 #end for
136 ]]></token>
137
138 <token name="@PICCARD_INPUT@"><![CDATA[
139 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
140 #if str($repeat2.type) == "alignment_metrics"
141 #set $pattern = "picard.analysis.AlignmentSummaryMetrics"
142 @LN_2_FILES@
143 #elif str($repeat2.type) == "basedistributionbycycle"
144 #set $pattern = "picard.analysis.BaseDistributionByCycleMetrics"
145 @LN_2_FILES@
146 #elif str($repeat2.type) == "gcbias"
147 #set $pattern = "picard.analysis.GcBias"
148 @LN_2_FILES@
149 #elif str($repeat2.type) == "hsmetrics"
150 #set $pattern = "picard.analysis.directed.HsMetrics"
151 @ @
152 #elif str($repeat2.type) == "insertsize"
153 #set $pattern = "picard.analysis.InsertSizeMetrics"
154 @LN_2_FILES@
155 #elif str($repeat2.type) == "markdups"
156 #set $pattern = "MarkDuplicates"
157 @LN_2_FILES@
158 #elif str($repeat2.type) == "oxogmetrics"
159 #set $pattern = "picard.analysis.CollectOxoGMetrics"
160 @LN_2_FILES@
161 #elif str($repeat2.type) == "pcr_metrics"
162 #set $pattern = "picard.analysis.directed.TargetedPcrMetrics"
163 @LN_2_FILES@
164 #elif str($repeat2.type) == "rnaseqmetrics"
165 #set $pattern = "Collect"
166 @LN_2_FILES@
167 #elif str($repeat2.type) == "rrbs_metrics"
168 #set $pattern = "picard.analysis.RrbsSummaryMetrics"
169 @LN_2_FILES@
170 #elif str($repeat2.type) == "wgs_metrics"
171 #set $pattern = "picard.analysis.CollectWgsMetrics$WgsMetrics"
172 @LN_2_FILES@
173 #end if
174 #end for
175 ]]></token>
176
177 <token name="@FASTQC_INPUT@"><![CDATA[
178 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
179 @CREATE_REPEAT_DIR_1@
180 #if str($repeat2.type) == "data"
181 #for $k, $file in enumerate($repeat2.input)
182 #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
183 #set file_path = os.path.join($file_dir, 'fastqc_data.txt')
184 mkdir '$file_dir' &&
185 ln -s '$file' '$file_path' &&
186 #end for
187 #elif str($repeat2.type) == "theoretical_gc"
188 #for $file in $repeat2.input
189 @ESCAPE_IDENTIFIER@
190 #set file_path = os.path.join($repeat_dir, str($identifier) + '_fastqc_theoretical_gc')
191 ln -s '$file' '$file_path' &&
192 #end for
193 #end if
194 #end for
195 ]]></token>
196
197 <token name="@RSEQ_INPUT@"><![CDATA[
198 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
199 @CREATE_REPEAT_DIR_2@
200 #if str($repeat2.type.type) == "bam_stat"
201 #set $pattern = "Proper-paired reads map to different chrom:"
202 @LN_3_FILES@
203 #elif str($repeat2.type.type) == "gene_body_coverage"
204 #for $k, $file in enumerate($repeat2.type.input)
205 #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.geneBodyCoverage.txt')
206 ln -s '$file' '$file_path' &&
207 #end for
208 #elif str($repeat2.type.type) == "inner_distance"
209 #for $k, $file in enumerate($repeat2.type.input)
210 #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.inner_distance_freq.txt')
211 ln -s '${file}' '$file_path' &&
212 #end for
213 #elif str($repeat2.type.type) == "junction_annotation"
214 #set $pattern = "Partial Novel Splicing Junctions:"
215 @LN_3_FILES@
216 #elif str($repeat2.type.type) == "read_gc"
217 #for $k, $file in enumerate($repeat2.type.input)
218 #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.GC.xls')
219 ln -s '$file' '$file_path' &&
220 #end for
221 #elif str($repeat2.type.type) == "junction_annotation"
222 #set $pattern = "Group Total_bases Tag_count Tags/Kb"
223 @LN_3_FILES@
224 #elif str($repeat2.type.type) == "read_distribution"
225 #set $pattern = "Group Total_bases Tag_count Tags/Kb"
226 @LN_3_FILES@
227 #elif str($repeat2.type.type) == "read_duplication_pos"
228 #for $k, $file in enumerate($repeat2.type.input)
229 #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.pos.DupRate.xls')
230 ln -s '$file' '$file_path' &&
231 #end for
232 #elif str($repeat2.type.type) == "infer_experiment"
233 #set $pattern = "Fraction of reads explained by"
234 #for $file in $repeat2.type.input
235 @ESCAPE_IDENTIFIER@
236 #set file_path = os.path.join($repeat_dir, str($identifier))
237 grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
238 ln -s '$file' '$file_path' &&
239 #end for
240 #end if
241 #end for
242 ]]></token>
243
244 <token name="@VCFTOOLS_INPUT@"><![CDATA[
245 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
246 @CREATE_REPEAT_DIR_2@
247 #if str($repeat2.type.type) == "relatedness2"
248 #for $file in $repeat2.type.input
249 @ESCAPE_IDENTIFIER@
250 #set file_path = os.path.join($repeat_dir, str($identifier) + '.relatedness2')
251 ln -s '$file' '$file_path' &&
252 #end for
253 #elif str($repeat2.type) == "tstv_by_count"
254 #for $file in $repeat2.type.input
255 @ESCAPE_IDENTIFIER@
256 #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.count')
257 ln -s '$file' '$file_path' &&
258 #end for
259 #elif str($repeat2.type) == "tstv_by_qual"
260 #for $file in $repeat2.type.input
261 @ESCAPE_IDENTIFIER@
262 #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.qual')
263 ln -s '$file' '$file_path' &&
264 #end for
265 #elif str($repeat2.type) == "tstv_summary"
266 #for $file in $repeat2.type.input
267 @ESCAPE_IDENTIFIER@
268 #set file_path = os.path.join($repeat_dir, str($identifier) + '.TsTv.summary')
269 ln -s '$file' '$file_path' &&
270 #end for
271 #end if
272 #end for
273 ]]></token>
274
275 <token name="@QUALIMAP_INPUT@"><![CDATA[
276 #for $file in $repeat.software_cond.input
277 #if re.search("genome_results", str($file.element_identifier))
278 sample="\$(grep 'bam file = ' $file | sed 's/bam file = //g' | sed 's: ::g')" &&
279 dir_name="$software_dir/\${sample}" &&
280 mkdir -p \${dir_name} &&
281 filepath_1="\${dir_name}/genome_results.txt" &&
282 ln -sf '$file' \${filepath_1} &&
283 #elif re.search("coverage_histogram", str($file.element_identifier))
284 nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
285 mkdir -p \${nested_dir_name} &&
286 filepath_2="\${nested_dir_name}/coverage_histogram.txt" &&
287 ln -sf '$file' \${filepath_2} &&
288 #elif re.search("gc-content_distribution", str($file.element_identifier))
289 nested_dir_name="\${dir_name}/raw_data_qualimapReport/" &&
290 mkdir -p \${nested_dir_name} &&
291 filepath_3="\${nested_dir_name}/mapped_reads_gc-content_distribution.txt" &&
292 ln -sf '$file' \${filepath_3} &&
293 #else
294 #pass
295 #end if
296 #end for
297 ]]></token>
298
299 <token name="@SALMON_INPUT@"><![CDATA[
300 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
301 @CREATE_REPEAT_DIR_2@
302 #if str($repeat2.type.type) == "meta"
303 #for $k, $file in enumerate($repeat2.type.input)
304 #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
305 #set file_path = os.path.join($file_dir, 'meta_info.json')
306 mkdir '$file_dir' &&
307 ln -s '$file' '$file_path' &&
308 #end for
309 #elif str($repeat2.type.type) == "fld"
310 #for $k, $file in enumerate($repeat2.type.input)
311 #set file_dir = os.path.join($repeat_dir, 'file_' + str($k))
312 #set file_path = os.path.join($file_dir,'flenDist.txt')
313 mkdir '$file_dir' &&
314 ln -s '$file' '$file_path' &&
315 #end for
316 #end if
317 #end for
318 ]]></token>
319
320 <token name="@SAMTOOLS_INPUT@"><![CDATA[
321 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
322 @CREATE_REPEAT_DIR_2@
323 #if str($repeat2.type.type) == "stats"
324 #set $pattern = "This file was produced by samtools stats"
325 @LN_3_FILES@
326 #elif str($repeat2.type.type) == "flagstat"
327 #set $pattern = "in total (QC-passed reads + QC-failed reads)"
328 @LN_3_FILES@
329 #elif str($repeat2.type.type) == "idxstats"
330 #for $file in $repeat2.type.input
331 @ESCAPE_IDENTIFIER@
332 #set file_path = os.path.join($repeat_dir, str($identifier) + '_idxstat')
333 ln -s '$file' '$file_path' &&
334 #end for
335 #elif str($repeat2.type.type) == "rmdup"
336 #set $pattern = "[bam_rmdup"
337 @LN_3_FILES@
338 #end if
339 #end for
340 ]]></token>
341
342 <token name="@STAR_INPUT@"><![CDATA[
343 #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
344 @CREATE_REPEAT_DIR_2@
345 #if str($repeat2.type.type) == "log"
346 #for $file in $repeat2.type.input
347 @ESCAPE_IDENTIFIER@
348 #set file_path = os.path.join($repeat_dir, str($identifier) + '_Log.final.out')
349 ln -s '$file' '$file_path' &&
350 #end for
351 #elif str($repeat2.type.type) == "genecounts"
352 #for $file in $repeat2.type.input
353 @ESCAPE_IDENTIFIER@
354 #set file_path = os.path.join($repeat_dir, str($identifier) + '_ReadsPerGene.out.tab')
355 ln -s '$file' '$file_path' &&
356 #end for
357 #end if
358 #end for
359 ]]></token>
360
361 <xml name="element_assert" token_name="" token_lines="" token_columns="" token_text="">
362 <element name="@NAME@">
363 <assert_contents>
364 <has_n_columns n="@COLUMNS@"/>
365 <has_n_lines n="@LINES@"/>
366 <has_text text="@TEXT@"/>
367 <yield/>
368 </assert_contents>
369 </element>
370 </xml>
371
372 <xml name="citations">
373 <citations>
374 <citation type="doi">10.1101/gr.244293.118</citation>
375 </citations>
376 </xml>
377 </macros>