comparison macros.xml @ 3:fe7ec8a3d35e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit 5d3c7a7b3f7d687bb03ef7993ddf1a6507d655bd"
author iuc
date Mon, 10 May 2021 19:33:38 +0000
parents e9e49cf06b42
children 02bab5ff7c37
comparison
equal deleted inserted replaced
2:e9e49cf06b42 3:fe7ec8a3d35e
4 <requirements> 4 <requirements>
5 <requirement type="package" version="@TOOL_VERSION@">obitools</requirement> 5 <requirement type="package" version="@TOOL_VERSION@">obitools</requirement>
6 </requirements> 6 </requirements>
7 </xml> 7 </xml>
8 8
9 <token name="@TOOL_VERSION@">1.2.11</token> 9 <token name="@TOOL_VERSION@">1.2.13</token>
10 <token name="@PROFILE@">21.01</token>
10 11
11 <xml name="stdio"> 12 <xml name="stdio">
12 <stdio> 13 <stdio>
13 <exit_code range="1:" level="fatal" description="Error in Obitools execution" /> 14 <exit_code range="1:" level="fatal" description="Error in Obitools execution" />
14 </stdio> 15 </stdio>
16 </xml>
17
18 <token name="@INPUT_FORMATS@">fastqsanger,fastqsanger.gz,fastqsolexa,fastqsolexa.gz,fasta,fasta.gz</token>
19 <token name="@GUNZIP_INPUT@"><![CDATA[
20 #if $input.ext.endswith(".gz")
21 gunzip -c '$input' > input &&
22 #else
23 ln -s '$input' input &&
24 #end if
25 ]]></token>
26 <token name="@GZIP_OUTPUT@"><![CDATA[
27 #if $input.ext.endswith(".gz")
28 | gzip -c
29 #end if
30 ]]></token>
31
32 <!-- generate galaxy.json to determine output format
33 - by default same as input
34 - if out_format can be specified
35 - fasta/fastq depending on $out_format (if != "")
36 - or fasta if the tool does not support choosing the output format, e.g. obiuniq which always outputs fasta
37 - gz if $input is zipped
38
39 A list of outputs to include in the json can be given by
40 setting a variable $outputs = [...] listing pairs of output names and the actual output
41 (defaults to [("output", $output)])
42 -->
43 <token name="@GENERATE_GALAXY_JSON@"><![CDATA[
44 #import json
45
46 #try:
47 #silent $outputs[0]
48 #except
49 #set outputs = [("output", $output)]
50 #end try
51
52 #if $input.ext.startswith("fastq")
53 #set ext = "fastqsanger"
54 #else if $input.ext.startswith("fasta")
55 #set ext = "fasta"
56 #end if
57
58 #try
59 #if $out_format == "fasta"
60 #set ext = "fasta"
61 #else if $out_format == "fastq"
62 #set ext = "fastqsanger"
63 #end if
64 #except
65 #set ext = "fasta"
66 #end try
67
68 #if $input.ext.endswith(".gz")
69 #set ext = ext + ".gz"
70 #end if
71
72 #set gxy_json = {}
73 #for oname, o in $outputs
74 #silent gxy_json[oname] = {"ext": ext}
75 #end for
76 && echo '${json.dumps(gxy_json)}' >> galaxy.json
77 ]]></token>
78
79 <token name="@OUT_FORMAT@"><![CDATA[
80 #if $out_format
81 --${out_format}-output
82 #end if
83 ]]></token>
84
85 <xml name="out_format_macro">
86 <param name="out_format" type="select" optional="true" label="Output data type" help="For FASTA/Q the the default output type is the same as the input type">
87 <option value="fasta">fasta</option>
88 <option value="fastq">fastq</option>
89 </param>
15 </xml> 90 </xml>
16 91
17 <token name="@OBITOOLS_LINK@"> 92 <token name="@OBITOOLS_LINK@">
18 <![CDATA[ 93 <![CDATA[
19 -------- 94 --------
103 <option value="strand">strand</option> 178 <option value="strand">strand</option>
104 <option value="tail_quality">tail_quality</option> 179 <option value="tail_quality">tail_quality</option>
105 <option value="taxid">taxid</option> 180 <option value="taxid">taxid</option>
106 </xml> 181 </xml>
107 182
108 <xml name="inputtype"> 183 <xml name="input_format_options_macro">
109 <option value="--genbank">genbank</option> 184 <section name="input_format_options" title="Input format options" expanded="false">
110 <option value="--embl">embl</option> 185 <param name="options_inputtype" type="select" optional="true" label="Specify the input datatype" help="default: determine automatically (should only be necessay for non FASTA/FASTQ datasets)">
111 <option value="--sanger">sanger</option> 186 <option value="--genbank">genbank</option>
112 <option value="--solexa">solexa</option> 187 <option value="--embl">embl</option>
113 <option value="--ecopcr">ecopcr</option> 188 <option value="--sanger">sanger</option>
114 <option value="--ecopcrdb">ecopcrdb</option> 189 <option value="--solexa">solexa</option>
115 <option value="--fasta" selected="true">fasta</option> 190 <option value="--ecopcr">ecopcr</option>
116 </xml> 191 <option value="--ecopcrdb">ecopcrdb</option>
192 <option value="--fasta">fasta (including obitools fasta extentions)</option>
193 <option value="--raw-fasta">raw fasta (more tolerant format variant)</option>
194 </param>
195 <param name="options_seqtype" type="select" optional="true" label="Specify the sequence datatype" >
196 <option value="--nuc">nucleic</option>
197 <option value="--prot">protein</option>
198 </param>
199 </section>
200 </xml>
201
202 <token name="@INPUT_FORMAT@"><![CDATA[
203 #if $input_format_options.options_inputtype
204 $input_format_options.options_inputtype
205 #else
206 #if $input.ext.startswith("fasta")
207 --fasta
208 #else if $input.ext.startswith("fastqsolexa")
209 ## input file is in fastq nucleic format produced by solexa sequencer
210 --solexa
211 #else
212 ## input file is in sanger fastq nucleic format (standard fastq)
213 --sanger
214 #end if
215 #end if
216 #if $input_format_options.options_seqtype
217 $input_format_options.options_seqtype
218 #end if
219 ]]></token>
117 220
118 <xml name="sanitizer"> 221 <xml name="sanitizer">
119 <sanitizer invalid_char="test"> 222 <sanitizer invalid_char="test">
120 <valid initial="default"> 223 <valid initial="default">
121 <!--add value="&quot;"/--> 224 <!--add value="&quot;"/-->