comparison macs21_wrapper.xml @ 1:d0986d2be693 draft

Substantial reimplementation of internals, also renamed id and version.
author pjbriggs
date Thu, 29 Jan 2015 11:11:21 -0500
parents fdad0c8c0957
children 15889783e759
comparison
equal deleted inserted replaced
0:fdad0c8c0957 1:d0986d2be693
1 <tool id="fls_modencode_peakcalling_macs2.1" name="MACS2.1.0" version="2"> 1 <tool id="macs2_1_peakcalling" name="MACS2.1.0" version="2.1.0-1">
2 <requirements> 2 <requirements>
3 <requirement type="package" version="2.7">python</requirement> 3 <requirement type="package" version="2.7">python</requirement>
4 <requirement type="package" version="1.8.1">numpy</requirement> 4 <requirement type="package" version="1.8.1">numpy</requirement>
5 <requirement type="package" version="2.1.0.20140616">macs2</requirement> 5 <requirement type="package" version="2.1.0.20140616">macs2</requirement>
6 </requirements> 6 </requirements>
7 <description>Model-based Analysis of ChIP-Seq [golem]</description> 7 <description>Model-based Analysis of ChIP-Seq</description>
8 <command interpreter="python">macs21_wrapper.py $options_file $outputs_file</command> 8 <command interpreter="python">
9 macs21_wrapper.py
10 ##
11 ## Major command
12 $major_command.major_command_selector
13 ##
14 ## ChIP-seq input
15 $major_command.input_chipseq_file1
16 ##
17 ## ChIP-seq control
18 #if str($major_command.input_control_file1) != 'None'
19 -c $major_command.input_control_file1
20 #end if
21 ##
22 ## Call peaks
23 #if str($major_command.major_command_selector) == 'callpeak'
24 --format=$major_command.input_chipseq_file1.extension
25 --name="$experiment_name"
26 --bw=$major_command.bw
27 ##
28 ## Genome size
29 #if str($major_command.genome_size.gsize) == ''
30 --gsize=$major_command.genome_size.user_defined_gsize
31 #else:
32 --gsize=$major_command.genome_size.gsize
33 #end if
34 ##
35 ## Broad peaks
36 #if str($major_command.broad_options.broad_regions) == 'broad'
37 --broad --broad-cutoff=$major_command.broad_options.broad_cutoff
38 #end if
39 ##
40 ## (no)model options
41 #if str($major_command.nomodel_type.nomodel_type_selector) == 'nomodel'
42 --nomodel --extsize=$major_command.nomodel_type.extsize
43 #end if
44 ##
45 ## pq value select options
46 #if str($major_command.pq_options.pq_options_selector) == 'qvalue'
47 --qvalue=$major_command.pq_options.qvalue
48 #else
49 --pvalue=$major_command.pq_options.pvalue
50 #end if
51 ##
52 ## Advanced options
53 #if str($major_command.advanced_options.advanced_options_selector) == 'on'
54 --mfold $major_command.advanced_options.mfoldlo $major_command.advanced_options.mfoldhi
55 $major_command.advanced_options.nolambda
56 #if $major_command.bdg_options.bdg == True
57 -B $major_command.bdg_options.spmr
58 #end if
59 $major_command.advanced_options.call_summits
60 #if str($major_command.advanced_options.keep_duplicates.keep_dup) == ''
61 --keep-dup $major_command.advanced_options.keep_duplicates.maximum_tags
62 #else
63 --keep-dup $major_command.advanced_options.keep_duplicates.keep_dup
64 #end if
65 #else
66 ## Defaults if advanced options not set
67 --mfold 5 50 --keep-dup 1
68 #end if
69 ##
70 ## Output files
71 --output-summits=$output_summits_bed_file
72 --output-extra-files=$output_extra_files
73 --output-extra-files-path=$output_extra_files.files_path
74 ##
75 ## Narrow/broad peak outputs
76 #if str($major_command.broad_options.broad_regions) == 'broad'
77 --output-broadpeaks=$output_broadpeaks_file
78 --output-gappedpeaks=$output_gappedpeaks_file
79 #else
80 --output-narrowpeaks=$output_narrowpeaks_file
81 #end if
82 ##
83 ## Bedgraph outputs
84 #if str($major_command.bdg_options.bdg) == 'True'
85 --output-pileup $output_treat_pileup_file
86 --output-lambda-bedgraph=$output_lambda_bedgraph_file
87 #end if
88 ##
89 ## XLS/interval output
90 #if str($major_command.xls_to_interval) == 'True'
91 --output-xls-to-interval=$output_xls_to_interval_peaks_file
92 #else
93 --output-peaks=$output_peaks_file
94 #end if
95 #end if
96 ##
97 ## Compare .bdg files
98 #if str($major_command.major_command_selector) == 'bdgcmp'
99 -m $major_command.bdgcmp_options.bdgcmp_options_selector
100 -p $major_command.pseudocount
101 --output-bdgcmp $output_bdgcmp_file
102 #end if
103 </command>
9 <inputs> 104 <inputs>
10 <!--experiment name and option of selecting paired or single end will always be present--> 105 <!--experiment name used as base for output file names -->
11 <param name="experiment_name" type="text" value="MACS2.1.0 in Galaxy" size="50" 106 <param name="experiment_name" type="text" value="MACS2.1.0 in Galaxy" size="50"
12 label="Experiment Name"/> 107 label="Experiment Name"/>
13 <!--select one of the 7 major commands offered by macs2--> 108 <!--select a major MACS2 command-->
14 <conditional name="major_command"> 109 <conditional name="major_command">
15 <param name="major_command_selector" type="select" label="Select action to be performed"> 110 <param name="major_command_selector" type="select" label="Select action to be performed">
16 <option value="callpeak">Peak Calling</option> 111 <option value="callpeak">Peak Calling</option>
17 <!--<option value="filterdup">filterdup</option>
18 <option value="randsample">randsample</option>-->
19 <option value="bdgcmp">Compare .bdg Files</option> 112 <option value="bdgcmp">Compare .bdg Files</option>
20 <!--<option value="bdgdiff">bdgdiff</option>
21 <option value="bdgpeakcall">bdgpeakcall</option>
22 <option value="bdgbroadcall">bdgbroadcall</option>-->
23 </param> 113 </param>
24 <!--callpeak option of macs2--> 114 <!--callpeak option of macs2-->
25 <when value="callpeak"> 115 <when value="callpeak">
26 <!--choose 'broad' or 'narrow' regions--> 116 <!--choose 'broad' or 'narrow' regions-->
27 <conditional name="broad_options"> 117 <conditional name="broad_options">
34 <param name="broad_cutoff" type="float" 124 <param name="broad_cutoff" type="float"
35 label="Cutoff for broad regions" 125 label="Cutoff for broad regions"
36 value="0.1" help="default: 0.1 (--broad-cutoff)"/> 126 value="0.1" help="default: 0.1 (--broad-cutoff)"/>
37 </when> 127 </when>
38 </conditional> 128 </conditional>
39 <!--may need to add a few more formats at later time-->
40 <param name="input_chipseq_file1" type="data" format="bed,sam,bam" 129 <param name="input_chipseq_file1" type="data" format="bed,sam,bam"
41 label="ChIP-seq read file" /> 130 label="ChIP-seq read file" />
42 <param name="input_control_file1" type="data" format="bed,sam,bam" optional="True" 131 <param name="input_control_file1" type="data" format="bed,sam,bam" optional="True"
43 label="ChIP-seq control read file" /> 132 label="ChIP-seq control read file" />
44 <conditional name="genome_size"> 133 <conditional name="genome_size">
215 <data name="output_bdgcmp_file" format="bdg" 304 <data name="output_bdgcmp_file" format="bdg"
216 label="${tool.name}: bdgcmp on ${on_string} (bdg)"> 305 label="${tool.name}: bdgcmp on ${on_string} (bdg)">
217 <filter>major_command['major_command_selector'] == 'bdgcmp'</filter> 306 <filter>major_command['major_command_selector'] == 'bdgcmp'</filter>
218 </data> 307 </data>
219 </outputs> 308 </outputs>
220 <configfiles>
221 <configfile name="outputs_file">&lt;%
222 import simplejson
223 %&gt;
224 ##=======================================================================================
225 #set $__outputs = { 'command':str( $major_command.major_command_selector ) }
226 #if str( $major_command.major_command_selector ) == 'callpeak':
227 #set $__outputs['output_summits_bed_file'] = str( $output_summits_bed_file )
228 #set $__outputs['output_extra_file'] = str( $output_extra_files )
229 #set $__outputs['output_extra_file_path'] = str( $output_extra_files.files_path )
230 #set $__outputs['output_peaks_file'] = str( $output_peaks_file )
231 #set $__outputs['output_narrowpeaks_file'] = str( $output_narrowpeaks_file )
232 #set $__outputs['output_broadpeaks_file'] = str( $output_broadpeaks_file )
233 #set $__outputs['output_gappedpeaks_file'] = str( $output_gappedpeaks_file )
234 #set $__outputs['output_xls_to_interval_peaks_file'] = str( $output_xls_to_interval_peaks_file )
235 #set $__outputs['output_treat_pileup_file'] = str( $output_treat_pileup_file )
236 #set $__outputs['output_lambda_bedgraph_file'] = str( $output_lambda_bedgraph_file )
237 #end if
238 ##=======================================================================================
239 #if str( $major_command.major_command_selector ) == 'bdgcmp':
240 #set $__outputs['output_bdgcmp_file'] = str( $output_bdgcmp_file )
241 #end if
242
243 ${ simplejson.dumps( __outputs ) }
244 </configfile>
245 <configfile name="options_file">&lt;%
246 import simplejson
247 %&gt;
248 ##=======================================================================================
249 #set $__options = { 'experiment_name':str( $experiment_name ) }
250 ##treatment/tag input files and format
251 #set $__options['input_chipseq'] = [ str( $major_command.input_chipseq_file1 ) ]
252 #set $__options['format'] = $major_command.input_chipseq_file1.extension.upper()
253
254 ##control/input files
255 #set $__options['input_control'] = []
256 #if str( $major_command.input_control_file1 ) != 'None':
257 #set $_hole = __options['input_control'].append( str( $major_command.input_control_file1 ) )
258 #end if
259
260 #if str( $major_command.major_command_selector ) == 'callpeak':
261 #set $__options['command'] = str( "callpeak" )
262 #set $__options['bw'] = str( $major_command.bw )
263 #set $__options['xls_to_interval'] = str( $major_command.xls_to_interval )
264
265 ##bdg options
266 #if $major_command.bdg_options.bdg == True:
267 #set $__options['bdg'] = str( "-B" )
268 #set $__options['spmr'] = str( $major_command.bdg_options.spmr )
269 #else:
270 #set $__options['bdg'] = str( "" )
271 #set $__options['spmr'] = str( "" )
272 #end if
273
274 ##broad_options
275 #if str( $major_command.broad_options.broad_regions ) == 'broad':
276 #set $__options['broad'] = str( $major_command.broad_options.broad_regions )
277 #set $__options['broad_cutoff'] = str( $major_command.broad_options.broad_cutoff )
278 #else:
279 #set $__options['broad'] = str( "" )
280 #set $__options['broad_cutoff'] = str( "" )
281 #end if
282
283 ##genome sizes
284 #if str( $major_command.genome_size.gsize ) == '':
285 #set $__options['gsize'] = int( $major_command.genome_size.user_defined_gsize )
286 #else:
287 #set $__options['gsize'] = str( $major_command.genome_size.gsize )
288 #end if
289
290 ##advanced options
291 #if str( $major_command.advanced_options.advanced_options_selector ) == 'on':
292 #set $__options['mfoldlo'] = int( $major_command.advanced_options.mfoldlo )
293 #set $__options['mfoldhi'] = int( $major_command.advanced_options.mfoldhi )
294 #set $__options['nolambda'] = str( $major_command.advanced_options.nolambda )
295 #set $__options['call_summits'] = str( $major_command.advanced_options.call_summits )
296 #if str( $major_command.advanced_options.keep_duplicates.keep_dup ) == '':
297 #set $__options['keep_dup'] = int( $major_command.advanced_options.keep_duplicates.maximum_tags )
298 #else:
299 #set $__options['keep_dup'] = str( $major_command.advanced_options.keep_duplicates.keep_dup )
300 #end if
301 #else:
302 #set $__options['mfoldlo'] = int( "5" )
303 #set $__options['mfoldhi'] = int( "50" )
304 #set $__options['nolambda'] = str( "" )
305 #set $__options['call_summits'] = str( "" )
306 #set $__options['keep_dup'] = int( "1" )
307 #end if
308
309 ##enable xls file options
310 ##if str( $major_command.xls_to_interval ) == 'create':
311 ##set $__options['xls_to_interval'] = { 'peaks_file': str( $output_xls_to_interval_peaks_file ), 'negative_peaks_file': str( $output_xls_to_interval_negative_peaks_file ) }
312 ##end if
313
314 ##pq value select options
315 #if str( $major_command.pq_options.pq_options_selector ) == 'qvalue':
316 #set $__options['qvalue'] = str( $major_command.pq_options.qvalue )
317 #else:
318 #set $__options['pvalue'] = str( $major_command.pq_options.pvalue )
319 #end if
320
321 ##model options
322 #if str( $major_command.nomodel_type.nomodel_type_selector ) == 'nomodel':
323 #set $__options['nomodel'] = str( $major_command.nomodel_type.extsize )
324 #end if
325 #end if
326 ##=======================================================================================
327 #if str( $major_command.major_command_selector ) == 'bdgcmp':
328 #set $__options['command'] = str( "bdgcmp" )
329 #set $__options['pseudocount'] = float( str( $major_command.pseudocount ) )
330 #set $__options['m'] = str( $major_command.bdgcmp_options.bdgcmp_options_selector )
331 #end if
332 ##=======================================================================================
333
334 ${ simplejson.dumps( __options ) }
335 </configfile>
336 </configfiles>
337 <tests> 309 <tests>
338 <!--none yet for macs2--> 310 <!--none yet for macs2-->
339 </tests> 311 </tests>
340 <help> 312 <help>
341 313