Mercurial > repos > pjbriggs > macs21
annotate macs21_wrapper.xml @ 2:00d73c812399 draft
Version 2.1.0-6: add sorting step in bigWig generation, and explicitly terminate tool on error from MACS2.
author | pjbriggs |
---|---|
date | Wed, 22 Mar 2017 11:36:07 -0400 |
parents | 02a01ea54722 |
children | 4124781932db |
rev | line source |
---|---|
2
00d73c812399
Version 2.1.0-6: add sorting step in bigWig generation, and explicitly terminate tool on error from MACS2.
pjbriggs
parents:
1
diff
changeset
|
1 <tool id="macs2_1_peakcalling" name="MACS2.1.0" version="2.1.0-6"> |
0 | 2 <description>Model-based Analysis of ChIP-Seq: peak calling</description> |
3 <requirements> | |
4 <requirement type="package" version="2.7">python</requirement> | |
5 <requirement type="package" version="1.9">numpy</requirement> | |
6 <requirement type="package" version="2.1.0.20140616">macs2</requirement> | |
7 <requirement type="package" version="3.1.2">R</requirement> | |
2
00d73c812399
Version 2.1.0-6: add sorting step in bigWig generation, and explicitly terminate tool on error from MACS2.
pjbriggs
parents:
1
diff
changeset
|
8 <requirement type="package" version="2.0">ucsc_tools_for_macs21</requirement> |
0 | 9 </requirements> |
10 <version_command>macs2 --version</version_command> | |
11 <command interpreter="python"> | |
12 macs21_wrapper.py callpeak | |
13 ## | |
14 ## ChIP-seq input | |
15 $input_chipseq_file1 | |
16 ## | |
17 ## ChIP-seq control | |
18 #if str($input_control_file1) != 'None' | |
19 -c $input_control_file1 | |
20 #end if | |
21 ## | |
1 | 22 --format=$format |
0 | 23 --name="$experiment_name" |
24 --bw=$bw | |
25 ## | |
26 ## Genome size | |
27 #if str($genome_size.gsize) == '' | |
28 --gsize=$genome_size.user_defined_gsize | |
29 #else: | |
30 --gsize=$genome_size.gsize | |
31 #end if | |
32 ## | |
33 ## Broad peaks | |
34 #if str($broad_options.broad_regions) == 'broad' | |
35 --broad --broad-cutoff=$broad_options.broad_cutoff | |
36 #end if | |
37 ## | |
38 ## (no)model options | |
39 #if str($nomodel_type.nomodel_type_selector) == 'nomodel' | |
40 --nomodel --extsize=$nomodel_type.extsize | |
41 #end if | |
42 ## | |
43 ## pq value select options | |
44 #if str($pq_options.pq_options_selector) == 'qvalue' | |
45 --qvalue=$pq_options.qvalue | |
46 #else | |
47 --pvalue=$pq_options.pvalue | |
48 #end if | |
49 ## | |
50 ## Bedgraph options | |
51 #if $bdg_options.bdg | |
52 -B $bdg_options.spmr | |
53 #end if | |
54 ## | |
55 ## Advanced options | |
56 #if $advanced_options.advanced_options_selector | |
57 --mfold $advanced_options.mfoldlo $advanced_options.mfoldhi | |
58 $advanced_options.nolambda | |
59 $advanced_options.call_summits | |
60 #if str($advanced_options.keep_duplicates.keep_dup) == '' | |
61 --keep-dup $advanced_options.keep_duplicates.maximum_tags | |
62 #else | |
63 --keep-dup $advanced_options.keep_duplicates.keep_dup | |
64 #end if | |
65 #else | |
66 ## Defaults if advanced options not set | |
67 --mfold 10 30 --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($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 $bdg_options.bdg | |
85 --output-pileup=$output_treat_pileup_file | |
86 --output-lambda-bedgraph=$output_lambda_bedgraph_file | |
87 #if $bdg_options.make_bigwig | |
88 --output-bigwig=$output_bigwig_file | |
89 --length=$GALAXY_DATA_INDEX_DIR/shared/ucsc/chrom/${input_chipseq_file1.dbkey}.len | |
90 #end if | |
91 #end if | |
92 ## | |
93 ## XLS/interval output | |
94 #if str($xls_to_interval) == 'True' | |
95 --output-xls-to-interval=$output_xls_to_interval_peaks_file | |
96 #else | |
97 --output-peaks=$output_peaks_file | |
98 #end if | |
99 </command> | |
100 <inputs> | |
101 <!--experiment name used as base for output file names --> | |
102 <param name="experiment_name" type="text" value="MACS2.1.0 in Galaxy" size="50" | |
103 label="Experiment Name"/> | |
104 <!--choose 'broad' or 'narrow' regions--> | |
105 <conditional name="broad_options"> | |
106 <param name="broad_regions" type="select" label="Type of region to call" | |
107 help="Broad regions are formed by linking nearby enriched regions"> | |
108 <option value="" selected="true">Narrow regions</option> | |
109 <option value="broad">Broad regions</option> | |
110 </param> | |
111 <when value="broad"> | |
112 <param name="broad_cutoff" type="float" | |
113 label="Cutoff for broad regions" | |
114 value="0.1" help="default: 0.1 (--broad-cutoff)"/> | |
115 </when> | |
116 </conditional> | |
1 | 117 <param name="format" type="select" label="Format of input read data" |
118 help="Specify the format of the input data and whether or not it is paired end (--format)"> | |
119 <option value="BAMPE" selected="true">BAM (paired-end)</option> | |
120 <option value="BAM">BAM (single-end)</option> | |
121 <option value="BEDPE">BED (paired-end)</option> | |
122 <option value="BED">BED (single-end)</option> | |
123 <option value="SAMPE">SAM (paired-end)</option> | |
124 <option value="SAM">SAM (single-end)</option> | |
125 </param> | |
0 | 126 <param name="input_chipseq_file1" type="data" format="bed,sam,bam" |
127 label="ChIP-seq read file" /> | |
128 <param name="input_control_file1" type="data" format="bed,sam,bam" optional="True" | |
129 label="ChIP-seq control read file" /> | |
130 <conditional name="genome_size"> | |
131 <param name="gsize" type="select" label="Effective genome size" | |
132 help="Either pre-defined (for common organisms), or user-defined (--gsize)"> | |
133 <option value="hs" selected="true">Human (2.7e9)</option> | |
134 <option value="mm">Mouse (1.87e9)</option> | |
135 <option value="ce">C. elegans (9e7)</option> | |
136 <option value="dm">Fruitfly (1.2e8)</option> | |
137 <option value="">User-defined</option> | |
138 </param> | |
139 <when value=""> | |
140 <!-- User-defined effective genome size --> | |
141 <param name="user_defined_gsize" type="float" value="" | |
142 label="Enter effective genome size (number of bases)" | |
143 help="e.g. '1.0e+9' or '1000000000'" /> | |
144 </when> | |
145 </conditional> | |
146 <param name="bw" type="integer" label="Band width" value="300" help="(--bw)"/> | |
147 <param name="xls_to_interval" label="Include XLS file from MACS" | |
148 type="boolean" truevalue="True" falsevalue="False" checked="True" | |
149 help="MACS2 XLS file will be output to the history in 'interval' format (suitable for subsequent analysis in Galaxy). Note that start positions are 1-based."/> | |
150 | |
151 <conditional name="bdg_options"> | |
152 <param name="bdg" | |
153 label="Save treatment and control lambda pileups in bedGraph" | |
154 type="boolean" truevalue="-B" falsevalue="" checked="False" /> | |
155 <when value="-B"> | |
156 <param name="spmr" | |
157 type="boolean" truevalue="--SPMR" falsevalue="" checked="False" | |
158 label="Save signal per million reads for fragment pileup profiles" | |
159 help="(--SPMR)" /> | |
160 <param name="make_bigwig" type="boolean" checked="True" | |
161 truevalue="True" falsevalue="" | |
162 label="Also generate bigWig file from bedGraph" | |
163 help="bigWig file can used in subsequent analyses e.g. CEAS" /> | |
164 </when> | |
165 <when value=""> | |
166 <!-- Display nothing --> | |
167 </when> | |
168 </conditional> | |
169 | |
170 <conditional name="pq_options"> | |
171 <param name="pq_options_selector" type="select" | |
172 label="Select p-value or q-value" help="default uses q-value"> | |
173 <option value="qvalue">q-value</option> | |
174 <option value="pvalue">p-value</option> | |
175 </param> | |
176 <when value="pvalue"> | |
177 <param name="pvalue" type="float" | |
178 label="p-value cutoff for binding region detection" | |
179 value="1e-2" help="default: 1e-2 (--pvalue)"/> | |
180 </when> | |
181 <when value="qvalue"> | |
182 <param name="qvalue" type="float" | |
183 label="q-value cutoff for binding region detection" | |
184 value="0.01" help="default: 0.01 (--qvalue)"/> | |
185 </when> | |
186 </conditional> | |
187 <conditional name="advanced_options"> | |
188 <param name="advanced_options_selector" | |
189 type="boolean" truevalue="on" falsevalue="off" checked="False" | |
190 label="Use advanced options?" /> | |
191 <when value="on"> | |
192 <param name="mfoldlo" type="integer" | |
193 label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model (lower-limit)" | |
194 value="10" help="(--mfold)"/> | |
195 <param name="mfoldhi" type="integer" | |
196 label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model (upper-limit)" | |
197 value="30" help="(--mfold)"/> | |
198 <param name="nolambda" | |
199 label="Use fixed background lambda as local lambda for every binding region" | |
200 type="boolean" truevalue="--nolambda" falsevalue="" checked="False" | |
201 help="(--nolambda)"/> | |
202 <param name="call_summits" | |
203 label="Detect subpeaks within binding region" | |
204 type="boolean" truevalue="--call-summits" falsevalue="" checked="False" | |
205 help="(--call-summits)"/> | |
206 <conditional name="keep_duplicates"> | |
207 <param name="keep_dup" type="select" | |
208 label="Use of duplicate reads"> | |
209 <option value="auto">Automatically calculate maximum number of duplicates to keep (auto)</option> | |
210 <option value="all">Use all duplicates (all)</option> | |
211 <option value="" selected="true">Manually specify maxium number of duplicates</option> | |
212 </param> | |
213 <when value=""> | |
214 <param name="maximum_tags" type="integer" value="1" | |
215 label="Maxium number of duplicated tags to keep at each location"/> | |
216 </when> | |
217 </conditional> | |
218 </when> | |
219 <when value="off"> | |
220 <!--display nothing--> | |
221 </when> | |
222 </conditional> | |
223 <conditional name="nomodel_type"> | |
224 <param name="nomodel_type_selector" type="select" label="Build Model"> | |
225 <option value="nomodel">Do not build the shifting model (--nomodel enabled)</option> | |
226 <option value="create_model" selected="true">Build the shifting model (--nomodel disabled)</option> | |
227 </param> | |
228 <when value="nomodel"> | |
229 <param name="extsize" type="integer" label="Arbitrary extension size in bp" value="200" help="Used as fragment size to extend each read towards 3' end (--extsize)"/> | |
230 </when> | |
231 </conditional> | |
232 </inputs> | |
233 | |
234 <outputs> | |
235 <!--callpeaks output--> | |
236 <data name="output_extra_files" format="html" | |
237 label="${tool.name}: callpeak on ${on_string} (html report)"> | |
238 </data> | |
239 <data name="output_summits_bed_file" format="bed" | |
240 label="${tool.name}: callpeak on ${on_string} (summits: bed)"> | |
241 </data> | |
242 <data name="output_peaks_file" format="xls" | |
243 label="${tool.name}: callpeak on ${on_string} (peaks: xls)"> | |
244 <filter>xls_to_interval is False</filter> | |
245 </data> | |
246 <data name="output_narrowpeaks_file" format="interval" | |
247 label="${tool.name}: callpeak on ${on_string} (peaks: narrowPeak)"> | |
248 <filter>broad_options['broad_regions'] == ''</filter> | |
249 </data> | |
250 <data name="output_broadpeaks_file" format="interval" | |
251 label="${tool.name}: callpeak on ${on_string} (peaks: broadPeak)"> | |
252 <filter>broad_options['broad_regions'] == 'broad'</filter> | |
253 </data> | |
254 <data name="output_gappedpeaks_file" format="interval" | |
255 label="${tool.name}: callpeak on ${on_string} (peaks: gappedPeak)"> | |
256 <filter>broad_options['broad_regions'] == 'broad'</filter> | |
257 </data> | |
258 <data name="output_xls_to_interval_peaks_file" format="interval" | |
259 label="${tool.name}: callpeak on ${on_string} (peaks: interval)"> | |
260 <filter>xls_to_interval is True</filter> | |
261 </data> | |
262 <data name="output_treat_pileup_file" format="bedgraph" | |
263 label="${tool.name}: callpeak on ${on_string} (treat pileup: bedGraph)"> | |
264 <filter>bdg_options['bdg'] is True</filter> | |
265 </data> | |
266 <data name="output_lambda_bedgraph_file" format="bedgraph" | |
267 label="${tool.name}: callpeak on ${on_string} (control lambda: bedGraph)"> | |
268 <filter>bdg_options['bdg'] is True</filter> | |
269 </data> | |
270 <data name="output_bigwig_file" format="bigwig" | |
271 label="${tool.name}: callpeak on ${on_string} (treat pileup: bigWig)"> | |
272 <filter>bdg_options['bdg'] is True</filter> | |
273 <filter>bdg_options['make_bigwig'] is True</filter> | |
274 </data> | |
275 </outputs> | |
276 <tests> | |
277 <!-- Peak calling without bigwig output --> | |
278 <test> | |
279 <!-- Inputs --> | |
280 <param name="experiment_name" value="test_MACS2.1.0" /> | |
281 <param name="broad_regions" value="" /> | |
1 | 282 <param name="format" value="BED" /> |
0 | 283 <param name="input_chipseq_file1" value="test_region_IP.bed" dbkey="galGal3" |
284 ftype="bed" /> | |
285 <param name="input_control_file1" value="test_region_Input.bed" | |
286 ftype="bed" /> | |
287 <param name="gsize" value="" /> | |
288 <param name="user_defined_gsize" value="775000000.0" /> | |
289 <param name="bw" value="300" /> | |
290 <param name="xls_to_interval" value="true" /> | |
291 <param name="bdg_options|bdg" value="-B" /> | |
292 <param name="bdg_options|spmr" value="--SPMR" /> | |
293 <param name="bdg_options|make_bigwig" value="false" /> | |
294 <param name="pq_options_selector" value="qvalue" /> | |
295 <param name="qvalue" value="0.05" /> | |
296 <param name="advanced_options_selector" value="true" /> | |
297 <param name="advanced_options|mfoldlo" value="5" /> | |
298 <param name="advanced_options|mfoldhi" value="50" /> | |
299 <param name="advanced_options|nolambda" value="" /> | |
300 <param name="advanced_options|call_summits" value="" /> | |
301 <param name="advanced_options|keep_duplicates" value="" /> | |
302 <param name="advanced_options|maximum_tags" value="1" /> | |
303 <param name="nomodel_type_selector" value="nomodel" /> | |
304 <param name="nomodel_type|extsize" value="243" /> | |
305 <!-- Outputs --> | |
306 <output name="output_extra_files" file="test_MACS2.1.0_html_report.zip" | |
307 compare="sim_size" delta="1500" /> | |
308 <output name="output_summits_bed_file" file="test_MACS2.1.0_summits.bed" /> | |
309 <output name="output_narrowpeaks_file" file="test_MACS2.1.0_peaks_narrowPeak.interval" /> | |
310 <output name="output_xls_to_interval_peaks_file" | |
311 file="test_MACS2.1.0_peaks.xls.re_match" | |
312 compare="re_match" lines_diff="1" /> | |
313 <output name="output_treat_pileup_file" file="test_MACS2.1.0_treat_pileup.bdg" /> | |
314 <output name="output_lambda_bedgraph_file" file="test_MACS2.1.0_control_lambda.bdg" /> | |
315 </test> | |
316 <!-- Peak calling with bigwig output --> | |
317 <test> | |
318 <!-- Inputs --> | |
319 <param name="experiment_name" value="test_MACS2.1.0" /> | |
320 <param name="broad_regions" value="" /> | |
1 | 321 <param name="format" value="BED" /> |
0 | 322 <param name="input_chipseq_file1" value="test_region_IP.bed" dbkey="galGal3" |
323 ftype="bed" /> | |
324 <param name="input_control_file1" value="test_region_Input.bed" | |
325 ftype="bed" /> | |
326 <param name="gsize" value="" /> | |
327 <param name="user_defined_gsize" value="775000000.0" /> | |
328 <param name="bw" value="300" /> | |
329 <param name="xls_to_interval" value="true" /> | |
330 <param name="bdg_options|bdg" value="-B" /> | |
331 <param name="bdg_options|spmr" value="--SPMR" /> | |
332 <param name="bdg_options|make_bigwig" value="true" /> | |
333 <param name="pq_options_selector" value="qvalue" /> | |
334 <param name="qvalue" value="0.05" /> | |
335 <param name="advanced_options_selector" value="true" /> | |
336 <param name="advanced_options|mfoldlo" value="5" /> | |
337 <param name="advanced_options|mfoldhi" value="50" /> | |
338 <param name="advanced_options|nolambda" value="" /> | |
339 <param name="advanced_options|call_summits" value="" /> | |
340 <param name="advanced_options|keep_duplicates" value="" /> | |
341 <param name="advanced_options|maximum_tags" value="1" /> | |
342 <param name="nomodel_type_selector" value="nomodel" /> | |
343 <param name="nomodel_type|extsize" value="243" /> | |
344 <!-- Outputs --> | |
345 <output name="output_extra_files" file="test_MACS2.1.0_bw_html_report.zip" | |
346 compare="sim_size" delta="2500" /> | |
347 <output name="output_summits_bed_file" file="test_MACS2.1.0_summits.bed" /> | |
348 <output name="output_narrowpeaks_file" file="test_MACS2.1.0_peaks_narrowPeak.interval" /> | |
349 <output name="output_xls_to_interval_peaks_file" | |
350 file="test_MACS2.1.0_peaks.xls.re_match" | |
351 compare="re_match" lines_diff="1" /> | |
352 <output name="output_treat_pileup_file" file="test_MACS2.1.0_treat_pileup.bdg" /> | |
353 <output name="output_lambda_bedgraph_file" file="test_MACS2.1.0_control_lambda.bdg" /> | |
354 <output name="output_bigwig_file" file="test_MACS2.1.0_treat_pileup.bw" | |
355 compare="sim_size" /> | |
356 </test> | |
357 </tests> | |
358 <help> | |
359 **What it does** | |
360 | |
361 MACS (Model-based Analysis of ChIP-seq) 2.1.0 provides algorithms for identifying | |
362 transcript factor binding sites. The program can be used either for ChIP-Seq data alone, | |
363 or with control sample data to improve specificity. | |
364 | |
365 View the MACS2 documentation at: | |
366 https://github.com/taoliu/MACS/blob/master/README.rst | |
367 | |
368 ------ | |
369 | |
370 **Usage** | |
371 | |
372 The tool interfaces with the **callpeak** function in MACS, which calls peaks from | |
373 alignment results. | |
374 | |
375 ------ | |
376 | |
377 **Credits** | |
378 | |
379 This Galaxy tool was based on the MACS2 tool hosted in the Galaxy toolshed at | |
380 | |
381 * http://toolshed.g2.bx.psu.edu/view/modencode-dcc/macs2 | |
382 | |
383 (specifically the 16:14f378e35191 revision of the tool) which is credited to Ziru | |
384 Zhou. This version is a reimplemented version developed within the Bioinformatics | |
385 Core Facility at the University of Manchester, which uses more up-to-date Galaxy | |
386 syntax and adds some extra features. | |
387 | |
388 The tool runs Tao Liu's MACS2 software: | |
389 | |
390 * https://github.com/taoliu/MACS | |
391 | |
392 The reference for MACS is: | |
393 | |
394 * Zhang Y, Liu T, Meyer CA, Eeckhoute J, Johnson DS, Bernstein BE, Nusbaum C, | |
395 Myers RM, Brown M, Li W, Liu XS. Model-based analysis of ChIP-Seq (MACS). | |
396 Genome Biol. 2008;9(9):R137. | |
397 | |
398 Please kindly acknowledge both this Galaxy tool and the MACS2 package if you | |
399 use it. | |
400 </help> | |
401 <citations> | |
402 <!-- | |
403 See https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Ccitations.3E_tag_set | |
404 Can be either DOI or Bibtex | |
405 Use http://www.bioinformatics.org/texmed/ to convert PubMed to Bibtex | |
406 --> | |
407 <citation type="doi">10.1186/gb-2008-9-9-r137</citation> | |
408 </citations> | |
409 </tool> |