comparison macros.xml.orig @ 56:7a06bb42dbb1 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e0d4688a59e6eeba33adcfe803ac43d0bc2863e7"
author iuc
date Tue, 31 Aug 2021 07:45:56 +0000
parents
children
comparison
equal deleted inserted replaced
55:678ea22d643d 56:7a06bb42dbb1
1 <macros>
2 <xml name="requirements">
3 <requirements>
4 <requirement type="package" version="@TOOL_VERSION@">bedtools</requirement>
5 <yield/>
6 </requirements>
7 </xml>
8 <<<<<<< HEAD
9 <token name="@TOOL_VERSION@">2.30.0</token>
10 =======
11 <xml name="bio_tools">
12 <xrefs>
13 <xref type='bio.tools'>bedtools</xref>
14 </xrefs>
15 </xml>
16 <token name="@TOOL_VERSION@">2.29.2</token>
17 >>>>>>> 405b19246 (add bio.tool ID)
18 <token name="@SAMTOOLS_VERSION@">1.9</token>
19 <token name="@STD_BEDTOOLS_INPUTS@">bed,bedgraph,gff,vcf,encodepeak</token>
20 <token name="@STD_BEDTOOLS_INPUT_LABEL@">BED/bedGraph/GFF/VCF/EncodePeak</token>
21 <xml name="stdio">
22 <stdio>
23 <!-- Anything other than zero is an error -->
24 <exit_code range="1:" />
25 <exit_code range=":-1" />
26 <!-- In case the return code has not been set propery check stderr too -->
27 <regex match="Error:" />
28 <regex match="Exception:" />
29 </stdio>
30 <version_command>bedtools --version</version_command>
31 </xml>
32 <xml name="reciprocal">
33 <param name="reciprocal" argument="-r" type="select" label="Require that the fraction of overlap be reciprocal for A and B" help="In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B.">
34 <option value="" selected="true">No</option>
35 <option value="-r">Yes</option>
36 </param>
37 </xml>
38 <xml name="fraction" token_name="" token_argument="" token_label="" token_help="" >
39 <param name="@NAME@" argument="@ARGUMENT@" type="float" min="0" max="1" optional="true" label="@LABEL@" help="@HELP@" />
40 </xml>
41 <xml name="overlap" token_name="overlap" token_argument="-f" token_fracof="A">
42 <expand macro="fraction" name="@NAME@" argument="@ARGUMENT@" label="Minimum overlap required as a fraction of @FRACOF@" help="Default is 1E-9, i.e. 1bp."/>
43 </xml>
44 <token name="@OVERLAP@"><![CDATA[
45 #if str($overlap):
46 -f $overlap
47 #end if
48 ]]></token>
49 <xml name="strand2">
50 <param name="strand" type="select" label="Calculation based on strandedness?">
51 <option value="" selected="true">Overlaps on either strand</option>
52 <option value="-s">Only overlaps occurring on the **same** strand.</option>
53 <option value="-S">Only overlaps occurring on the **opposite** strand.</option>
54 </param>
55 </xml>
56 <xml name="seed">
57 <conditional name="seed">
58 <param name="seed_choose" type="select" label="Choose Seed?">
59 <option value="False" selected="true">Random Shuffling</option>
60 <option value="True">Choose fixed seed</option>
61 </param>
62 <when value="True">
63 <param argument="-seed" type="integer" value="12345" label="Enter Seed" />
64 </when>
65 <when value="False" />
66 </conditional>
67 </xml>
68 <xml name="split">
69 <param argument="-split" type="boolean" truevalue="-split" falsevalue="" checked="false"
70 label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage."
71 help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data." />
72 </xml>
73 <xml name="input_conditional_genome_file">
74 <conditional name="genome_file_opts">
75 <param name="genome_file_opts_selector" type="select" label="Genome file">
76 <option value="loc" selected="true">Locally installed Genome file</option>
77 <option value="hist">Genome file from your history</option>
78 </param>
79 <when value="loc">
80 <param name="genome" type="select" multiple="false" label="Genome file">
81 <options from_data_table="__dbkeys__" />
82 </param>
83 </when>
84 <when value="hist">
85 <param name="genome" type="data" format="tabular" label="Genome file" />
86 </when>
87 </conditional>
88 </xml>
89 <xml name="input_optional_genome_file">
90 <conditional name="genome">
91 <param name="genome_choose" argument="-g" type="select"
92 label="Specify a genome file that defines the expected chromosome order in the input files." >
93 <option value="" selected="true">No</option>
94 <option value="-g">Yes</option>
95 </param>
96 <when value="-g">
97 <expand macro="input_conditional_genome_file" />
98 </when>
99 <when value="" />
100 </conditional>
101 </xml>
102 <token name="@GENOME_FILE@">
103 #if $genome_file_opts.genome_file_opts_selector == "loc":
104 '$genome_file_opts.genome.fields.len_path'
105 #elif $genome_file_opts.genome_file_opts_selector == "hist":
106 '$genome_file_opts.genome'
107 #end if
108 </token>
109 <token name="@GENOME_FILE_MAPBED@">
110 #if $genome.genome_choose == "-g":
111 #if $genome.genome_file_opts.genome_file_opts_selector == "loc":
112 -g '$genome.genome_file_opts.genome.fields.len_path'
113 #elif $genome.genome_file_opts.genome_file_opts_selector == "hist":
114 -g '$genome.genome_file_opts.genome'
115 #end if
116 #end if
117 </token>
118 <token name="@GENOME_FILE_MAKEWINDOWS@">
119 #if $type.type_select == "genome":
120 #if $type.genome_file_opts.genome_file_opts_selector == "loc":
121 -g '$type.genome_file_opts.genome.fields.len_path'
122 #elif $type.genome_file_opts.genome_file_opts_selector == "hist":
123 -g '$type.genome_file_opts.genome'
124 #end if
125 #end if
126 </token>
127 <token name="@GENOME_FILE_UNION@">
128 #if $empty.empty_selector == "-empty":
129 #if $empty.genome_file_opts.genome_file_opts_selector == "loc":
130 -g '$empty.genome_file_opts.genome.fields.len_path'
131 #elif $empty.genome_file_opts.genome_file_opts_selector == "hist":
132 -g '$empty.genome_file_opts.genome'
133 #end if
134 #end if
135 </token>
136 <token name="@GENOME_FILE_COVERAGE@">
137 #if $input_type.input_type_select == "bam":
138 -ibam '$input_type.input'
139 #else:
140 -i '$input_type.input'
141 #if $input_type.genome_file_opts.genome_file_opts_selector == "loc":
142 -g '$input_type.genome_file_opts.genome.fields.len_path'
143 #elif $input_type.genome_file_opts.genome_file_opts_selector == "hist":
144 -g '$input_type.genome_file_opts.genome'
145 #end if
146 #end if
147 </token>
148 <xml name="closest_D_option">
149 <param argument="-iu" type="boolean" truevalue="-iu" falsevalue="" checked="false"
150 label="Ignore features in B that are upstream of features in A"
151 help="This option requires -D and follows its orientation rules for determining what is 'upstream'" />
152
153 <param argument="-id" type="boolean" truevalue="-id" falsevalue="" checked="false"
154 label="Ignore features in B that are downstream of features in A"
155 help="This option requires -D and follows its orientation rules for determining what is 'downstream'" />
156
157 <param argument="-fu" type="boolean" truevalue="-fu" falsevalue="" checked="false"
158 label="Choose first from features in B that are upstream of features in A"
159 help="This option requires -D and follows its orientation rules for determining what is 'upstream'" />
160
161 <param argument="-fd" type="boolean" truevalue="-fd" falsevalue="" checked="false"
162 label="Choose first from features in B that are downstream of features in A"
163 help="This option requires -D and follows its orientation rules for determining what is 'downstream'" />
164 </xml>
165 <xml name="addition">
166 <conditional name="addition">
167 <param name="addition_select" type="select" label="Choose what you want to do">
168 <option value="b" selected="true">Increase the @STD_BEDTOOLS_INPUT_LABEL@ entry by the same number base pairs in each direction.</option>
169 <option value="lr">Increase by Start Coordinate and End Coordinate</option>
170 </param>
171 <when value="b">
172 <param name="b" value="1" label="Number of base pairs" type="integer" />
173 </when>
174 <when value="lr">
175 <param name="l" type="integer" value="0" label="The number of base pairs to subtract from the start coordinate" />
176 <param name="r" type="integer" value="0" label="The number of base pairs to add to the end coordinate" />
177 </when>
178 </conditional>
179 </xml>
180 <xml name="print_header">
181 <param argument="-header" type="boolean" truevalue="-header" falsevalue="" checked="false"
182 label="Print the header from the A file prior to results" />
183 </xml>
184 <!-- TODO this is currently not used, but we should make use of it -->
185 <xml name="genome_validator">
186 <validator type="unspecified_build" />
187 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />
188 </xml>
189
190 <!-- ToDo column_picker -->
191 <xml name="choose_columns">
192 <param name="cols" argument="-c" type="text" value=""
193 label="Specify the column(s) that should be summarized"
194 help="Comma separated">
195 <sanitizer invalid_char="">
196 <valid initial="string.digits"><add value=","/></valid>
197 </sanitizer>
198 </param>
199 </xml>
200
201 <token name="@C_AND_O_ARGUMENT@">
202 #set $col = list()
203 #set $op = list()
204 #for $item in $c_and_o_argument_repeat:
205 #silent $col.append( str($item.col) )
206 #silent $op.append( str($item.operation) )
207 #end for
208 #if $col:
209 -c #echo ','.join($col)#
210 -o #echo ','.join($op)#
211 #end if
212 </token>
213
214 <xml name="c_and_o_argument">
215 <repeat name="c_and_o_argument_repeat" title="Applying operations to columns from merged intervals" min="0">
216 <yield />
217 <expand macro="choose_operations">
218 <expand macro="math_options" />
219 <expand macro="additional_math_options" />
220 </expand>
221 </repeat>
222 </xml>
223
224 <xml name="choose_operations">
225 <param name="operation" type="select" label="Specify the operation">
226 <yield />
227 </param>
228 </xml>
229
230 <xml name="math_options">
231 <option value="sum" selected="true">Sum - numeric only</option>
232 <option value="min">Min - numeric only</option>
233 <option value="max">Max - numeric only</option>
234 <option value="absmin">AbsMin - numeric only</option>
235 <option value="absmax">AbsMax - numeric only</option>
236 <option value="mean">Mean - numeric only</option>
237 <option value="median">Median - numeric only</option>
238 <option value="mode">Mode - numeric only</option>
239 <option value="antimode">Antimode - numeric only</option>
240 <option value="collapse">collapse (i.e., print a comma separated list) - numeric or text</option>
241 </xml>
242 <xml name="additional_math_options">
243 <option value="count">Count - numeric or text</option>
244 <option value="count_disctinct">Count Distinct - numeric or text</option>
245 <option value="distinct">distinct (i.e., print a comma separated list) - numeric or text</option>
246 <option value="concat">concat (i.e., print a comma separated list) - numeric or text</option>
247 </xml>
248 <xml name="sorted">
249 <!-- -sorted -g -->
250 <param argument="-sorted" type="boolean" truevalue="-sorted" falsevalue="" checked="false"
251 label="For coordinate sorted input file the more efficient sweeping algorithm is enabled."/>
252 </xml>
253 <token name="@SORTED@">
254 <![CDATA[
255 $sorted
256 #if str($sorted) != '':
257 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'):
258 -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5)
259 #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'):
260 -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5)
261 #end if
262 #end if
263 ]]>
264 </token>
265 <token name="@REFERENCES@">
266 <![CDATA[
267 ------
268
269 This tool is part of the `bedtools package`_ from the `Quinlan laboratory`_.
270
271 .. _bedtools package: https://github.com/arq5x/bedtools2
272 .. _Quinlan laboratory: http://quinlanlab.org
273
274
275 **Citation**
276
277 If you use this tool in Galaxy, please cite:
278
279 Bjoern A. Gruening (2014), `Galaxy wrapper <https://github.com/bgruening/galaxytools>`_
280 ]]>
281 </token>
282 <xml name="citations">
283 <citations>
284 <citation type="doi">10.1093/bioinformatics/btq033</citation>
285 <yield />
286 </citations>
287 </xml>
288 </macros>