Mercurial > repos > iuc > macs2
comparison macs2_callpeak.xml @ 14:c16dbe4e2db2 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/macs2 commit c9c5c4dd15aed950ed9b43a294ce6c41f5732a23
author | iuc |
---|---|
date | Mon, 06 Aug 2018 10:41:57 -0400 |
parents | 01cded2297b7 |
children | c33686854b19 |
comparison
equal
deleted
inserted
replaced
13:01cded2297b7 | 14:c16dbe4e2db2 |
---|---|
1 <tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.3" profile="17.09"> | 1 <tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.4" profile="17.09"> |
2 <description>Call peaks from alignment results</description> | 2 <description>Call peaks from alignment results</description> |
3 <macros> | 3 <macros> |
4 <import>macs2_macros.xml</import> | 4 <import>macs2_macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"> | 6 <expand macro="requirements"> |
7 </expand> | 7 </expand> |
8 <expand macro="stdio" /> | 8 <expand macro="stdio" /> |
9 <expand macro="version_command" /> | 9 <expand macro="version_command" /> |
10 <command><![CDATA[ | 10 <command><![CDATA[ |
11 #import re | |
12 | |
11 @home_dir@ | 13 @home_dir@ |
12 | |
13 #set $temp_stderr = 'macs2_stderr' | 14 #set $temp_stderr = 'macs2_stderr' |
15 | |
14 (macs2 callpeak | 16 (macs2 callpeak |
15 | |
16 --name 'MACS2' | |
17 | 17 |
18 ## Treatment File(s) | 18 ## Treatment File(s) |
19 | 19 |
20 #if str($treatment.t_multi_select) == "Yes": | 20 #if str($treatment.t_multi_select) == "Yes": |
21 -t ${ ' '.join( [ "'%s'" % $x for $x in $treatment.input_treatment_file] ) } | 21 -t ${ ' '.join( [ "'%s'" % $x for $x in $treatment.input_treatment_file] ) } |
22 #set identifier = re.sub('[^\w\-]', '_', str($treatment.input_treatment_file[0].element_identifier)) | |
22 #else | 23 #else |
23 -t '$treatment.input_treatment_file' | 24 -t '$treatment.input_treatment_file' |
25 #set identifier = re.sub('[^\w\-]', '_', str($treatment.input_treatment_file.element_identifier)) | |
24 #end if | 26 #end if |
27 | |
28 --name $identifier | |
25 | 29 |
26 ## Control File(s) | 30 ## Control File(s) |
27 | 31 |
28 #if str($control.c_select) == "Yes": | 32 #if str($control.c_select) == "Yes": |
29 #if str($control.c_multiple.c_multi_select) == "Yes": | 33 #if str($control.c_multiple.c_multi_select) == "Yes": |
96 #end if | 100 #end if |
97 | 101 |
98 2>&1 > $temp_stderr) | 102 2>&1 > $temp_stderr) |
99 #if "peaks_tabular" in str($outputs).split(','): | 103 #if "peaks_tabular" in str($outputs).split(','): |
100 && | 104 && |
101 cp MACS2_peaks.xls '${ output_tabular }' | 105 cp ${identifier}_peaks.xls '${ output_tabular }' |
102 #end if | 106 #end if |
103 | 107 |
104 ## run R to create pdf from model script | 108 ## run R to create pdf from model script |
105 #if $nomodel_type.nomodel_type_selector == "create_model" and "pdf" in str($outputs).split(',') and $format != "BAMPE": | 109 #if $nomodel_type.nomodel_type_selector == "create_model" and "pdf" in str($outputs).split(',') and $format != "BAMPE": |
106 && | 110 && |
107 Rscript MACS2_model.r > MACS2_model.r.log | 111 Rscript ${identifier}_model.r > ${identifier}_model.r.log |
108 #end if | 112 #end if |
109 | 113 |
110 #if 'html' in str($outputs).split(','): | 114 #if 'html' in str($outputs).split(','): |
111 ## if output files exists, move them to the files_path and create a html result page linking to them | 115 ## if output files exists, move them to the files_path and create a html result page linking to them |
112 && | 116 && |
113 ( | 117 ( |
114 count=`ls -1 MACS2* 2>/dev/null | wc -l`; | 118 count=`ls -1 ${identifier}* 2>/dev/null | wc -l`; |
115 if [ \$count != 0 ]; | 119 if [ \$count != 0 ]; |
116 then | 120 then |
117 mkdir '${ output_extra_files.files_path }' && | 121 mkdir '${ output_extra_files.files_path }' && |
118 cp -r MACS2* '${ output_extra_files.files_path }' && | 122 cp -r ${identifier}* '${ output_extra_files.files_path }' && |
119 python '$__tool_directory__/dir2html.py' | 123 python '$__tool_directory__/dir2html.py' |
120 '${ output_extra_files.files_path }' $temp_stderr > '${ output_extra_files }'; | 124 '${ output_extra_files.files_path }' $temp_stderr > '${ output_extra_files }'; |
121 fi; | 125 fi; |
122 ) | 126 ) |
123 #end if | 127 #end if |
200 <param name="qvalue" type="float" value="0.05" label="Minimum FDR (q-value) cutoff for peak detection" help="The q-value (minimum FDR) cutoff to call significant regions. Default is 0.05. For broad marks, you can try 0.05 as cutoff. Q-values are calculated from p-values using Benjamini-Hochberg procedure. (--qvalue)"/> | 204 <param name="qvalue" type="float" value="0.05" label="Minimum FDR (q-value) cutoff for peak detection" help="The q-value (minimum FDR) cutoff to call significant regions. Default is 0.05. For broad marks, you can try 0.05 as cutoff. Q-values are calculated from p-values using Benjamini-Hochberg procedure. (--qvalue)"/> |
201 </when> | 205 </when> |
202 </conditional> | 206 </conditional> |
203 | 207 |
204 <param name="outputs" type="select" display="checkboxes" multiple="True" optional="True" label="Additional Outputs" help="PDF is only created when the model is built"> | 208 <param name="outputs" type="select" display="checkboxes" multiple="True" optional="True" label="Additional Outputs" help="PDF is only created when the model is built"> |
205 <option value="peaks_tabular">Peaks as tabular file</option> | 209 <option value="peaks_tabular">Peaks as tabular file (compatible wih MultiQC)</option> |
206 <option value="summits">Peak summits</option> | 210 <option value="summits">Peak summits</option> |
207 <option value="bdg" >Scores in bedGraph files (--bdg)</option> | 211 <option value="bdg" >Scores in bedGraph files (--bdg)</option> |
208 <option value="html">Summary page (html)</option> | 212 <option value="html">Summary page (html)</option> |
209 <option value="pdf">Plot in PDF (only available if a model is created and if BAMPE is not used)</option> | 213 <option value="pdf">Plot in PDF (only available if a model is created and if BAMPE is not used)</option> |
210 </param> | 214 </param> |
244 <outputs> | 248 <outputs> |
245 <!--callpeaks output--> | 249 <!--callpeaks output--> |
246 <data name="output_tabular" format="tabular" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Peaks in tabular format)"> | 250 <data name="output_tabular" format="tabular" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Peaks in tabular format)"> |
247 <filter> outputs and 'peaks_tabular' in outputs</filter> | 251 <filter> outputs and 'peaks_tabular' in outputs</filter> |
248 </data> | 252 </data> |
249 <data name="output_broadpeaks" format="bed" from_work_dir="MACS2_peaks.broadPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (broad Peaks)"> | 253 <data name="output_broadpeaks" format="bed" from_work_dir="*_peaks.broadPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (broad Peaks)"> |
250 <filter> | 254 <filter> |
251 (( | 255 (( |
252 advanced_options['broad_options']['broad_options_selector'] == "broad" | 256 advanced_options['broad_options']['broad_options_selector'] == "broad" |
253 )) | 257 )) |
254 </filter> | 258 </filter> |
255 </data> | 259 </data> |
256 <data name="output_gappedpeaks" format="bed" from_work_dir="MACS2_peaks.gappedPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (gapped Peaks)"> | 260 <data name="output_gappedpeaks" format="bed" from_work_dir="*_peaks.gappedPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (gapped Peaks)"> |
257 <filter> | 261 <filter> |
258 (( | 262 (( |
259 advanced_options['broad_options']['broad_options_selector'] == "broad" | 263 advanced_options['broad_options']['broad_options_selector'] == "broad" |
260 )) | 264 )) |
261 </filter> | 265 </filter> |
262 </data> | 266 </data> |
263 <data name="output_narrowpeaks" format="bed" from_work_dir="MACS2_peaks.narrowPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (narrow Peaks)"> | 267 <data name="output_narrowpeaks" format="bed" from_work_dir="*_peaks.narrowPeak" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (narrow Peaks)"> |
264 <filter> | 268 <filter> |
265 (( | 269 (( |
266 advanced_options['broad_options']['broad_options_selector'] == "nobroad" | 270 advanced_options['broad_options']['broad_options_selector'] == "nobroad" |
267 )) | 271 )) |
268 </filter> | 272 </filter> |
269 </data> | 273 </data> |
270 <data name="output_summits" format="bed" from_work_dir="MACS2_summits.bed" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (summits in BED)"> | 274 <data name="output_summits" format="bed" from_work_dir="*_summits.bed" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (summits in BED)"> |
271 <filter>outputs and 'summits' in outputs</filter> | 275 <filter>outputs and 'summits' in outputs</filter> |
272 </data> | 276 </data> |
273 <data name="output_plot" format="pdf" from_work_dir="MACS2_model.pdf" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (plot)"> | 277 <data name="output_plot" format="pdf" from_work_dir="*_model.pdf" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (plot)"> |
274 <filter> | 278 <filter> |
275 (( | 279 (( |
276 outputs and 'pdf' in outputs and | 280 outputs and 'pdf' in outputs and |
277 nomodel_type['nomodel_type_selector'] == "create_model" and | 281 nomodel_type['nomodel_type_selector'] == "create_model" and |
278 format != "BAMPE" | 282 format != "BAMPE" |
279 )) | 283 )) |
280 </filter> | 284 </filter> |
281 </data> | 285 </data> |
282 <data name="output_treat_pileup" format="bedgraph" from_work_dir="MACS2_treat_pileup.bdg" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Bedgraph Treatment)"> | 286 <data name="output_treat_pileup" format="bedgraph" from_work_dir="*_treat_pileup.bdg" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Bedgraph Treatment)"> |
283 <filter>outputs and 'bdg' in outputs</filter> | 287 <filter>outputs and 'bdg' in outputs</filter> |
284 </data> | 288 </data> |
285 <data name="output_control_lambda" format="bedgraph" from_work_dir="MACS2_control_lambda.bdg" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Bedgraph Control)"> | 289 <data name="output_control_lambda" format="bedgraph" from_work_dir="*_control_lambda.bdg" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (Bedgraph Control)"> |
286 <filter>outputs and 'bdg' in outputs</filter> | 290 <filter>outputs and 'bdg' in outputs</filter> |
287 </data> | 291 </data> |
288 <data name="output_extra_files" format="html" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (html report)"> | 292 <data name="output_extra_files" format="html" default_identifier_source="treatment|input_treatment_file" label="${tool.name} on ${on_string} (html report)"> |
289 <filter>outputs and 'html' in outputs</filter> | 293 <filter>outputs and 'html' in outputs</filter> |
290 </data> | 294 </data> |
303 <param name="gsize" value="3300000000" /> | 307 <param name="gsize" value="3300000000" /> |
304 <param name="lower" value="5" /> | 308 <param name="lower" value="5" /> |
305 <param name="upper" value="50" /> | 309 <param name="upper" value="50" /> |
306 <output name="output_control_lambda" compare="contains" file="callpeak_control_part.bdg" lines_diff="1"/> | 310 <output name="output_control_lambda" compare="contains" file="callpeak_control_part.bdg" lines_diff="1"/> |
307 <output name="output_treat_pileup" compare="contains" file="callpeak_treatment_part.bdg" lines_diff="1"/> | 311 <output name="output_treat_pileup" compare="contains" file="callpeak_treatment_part.bdg" lines_diff="1"/> |
308 <output name="output_tabular" compare="contains" file="callpeak_part.tabular" lines_diff="1"/> | 312 <output name="output_tabular" compare="contains" file="callpeak_part.tabular" lines_diff="3"/> |
309 <output name="output_extra_files"> | 313 <output name="output_extra_files"> |
310 <assert_contents> | 314 <assert_contents> |
311 <has_text text="Additional output created by MACS2" /> | 315 <has_text text="Additional output created by MACS2" /> |
312 </assert_contents> | 316 </assert_contents> |
313 </output> | 317 </output> |
377 **Outputs** | 381 **Outputs** |
378 | 382 |
379 This tool produces a BED file of narrowPeaks as default output. It can also produce additional outputs, which can be selected under the **Additional Outputs** option above. | 383 This tool produces a BED file of narrowPeaks as default output. It can also produce additional outputs, which can be selected under the **Additional Outputs** option above. |
380 | 384 |
381 * **a BED file of peaks** (default) | 385 * **a BED file of peaks** (default) |
382 * a tabular file of peaks | 386 * a tabular file of peaks (compatible wih MultiQC) |
383 * a BED file of peak summits | 387 * a BED file of peak summits |
384 * two bedGraph files of scores, for treatment pileup and control lambda | 388 * two bedGraph files of scores, for treatment pileup and control lambda |
385 * a HTML summary page | 389 * a HTML summary page |
386 * a PDF plot (if model is built) | 390 * a PDF plot (if model is built) |
387 * a BED file of broad peaks (if **Composite broad regions** is selected under Advanced Options) | 391 * a BED file of broad peaks (if **Composite broad regions** is selected under Advanced Options) |
394 Example: | 398 Example: |
395 | 399 |
396 ======= ========= ======= ============ ==== === ======= ======== ======= ======= | 400 ======= ========= ======= ============ ==== === ======= ======== ======= ======= |
397 1 2 3 4 5 6 7 8 9 **10** | 401 1 2 3 4 5 6 7 8 9 **10** |
398 ======= ========= ======= ============ ==== === ======= ======== ======= ======= | 402 ======= ========= ======= ============ ==== === ======= ======== ======= ======= |
399 chr1 840081 840400 MACS2_peak_1 69 . 4.89872 10.50944 6.91052 158 | 403 chr1 840081 840400 treat1_peak_1 69 . 4.89872 10.50944 6.91052 158 |
400 chr1 919419 919785 MACS2_peak_2 87 . 5.85158 12.44148 8.70936 130 | 404 chr1 919419 919785 treat1_peak_2 87 . 5.85158 12.44148 8.70936 130 |
401 chr1 937220 937483 MACS2_peak_3 66 . 4.87632 10.06728 6.61759 154 | 405 chr1 937220 937483 treat1_peak_3 66 . 4.87632 10.06728 6.61759 154 |
402 ======= ========= ======= ============ ==== === ======= ======== ======= ======= | 406 ======= ========= ======= ============ ==== === ======= ======== ======= ======= |
403 | 407 |
404 Columns contain the following data: | 408 Columns contain the following data: |
405 | 409 |
406 * **1st**: chromosome name | 410 * **1st**: chromosome name |
415 * **10th**: relative summit position to peak start | 419 * **10th**: relative summit position to peak start |
416 | 420 |
417 | 421 |
418 **Peaks tabular File** | 422 **Peaks tabular File** |
419 | 423 |
420 A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions. | 424 A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions. This file is compatible with **MultiQC**. |
421 | 425 |
422 Example: | 426 Example: |
423 | 427 |
424 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= | 428 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= |
425 **chr** **start** **end** **length** **abs_summit** **pileup** **-log10(pvalue)** **fold_enrichment** **-log10(qvalue)** **name** | 429 **chr** **start** **end** **length** **abs_summit** **pileup** **-log10(pvalue)** **fold_enrichment** **-log10(qvalue)** **name** |
426 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= | 430 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= |
427 chr1 840082 840400 319 840240 4.00 10.50944 4.89872 6.91052 MACS2_peak_1 | 431 chr1 840082 840400 319 840240 4.00 10.50944 4.89872 6.91052 treat1_peak_1 |
428 chr1 919420 919785 366 919550 5.00 12.44148 5.85158 8.70936 MACS2_peak_2 | 432 chr1 919420 919785 366 919550 5.00 12.44148 5.85158 8.70936 treat1_peak_2 |
429 chr1 937221 937483 263 937375 4.00 10.06728 4.87632 6.61759 MACS2_peak_3 | 433 chr1 937221 937483 263 937375 4.00 10.06728 4.87632 6.61759 treat1_peak_3 |
430 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= | 434 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= |
431 | 435 |
432 Columns contain the following data: | 436 Columns contain the following data: |
433 | 437 |
434 * **chr**: chromosome name | 438 * **chr**: chromosome name |
452 Example: | 456 Example: |
453 | 457 |
454 ======= ========= ======= ============ ======= | 458 ======= ========= ======= ============ ======= |
455 1 2 3 4 **5** | 459 1 2 3 4 **5** |
456 ======= ========= ======= ============ ======= | 460 ======= ========= ======= ============ ======= |
457 chr1 840239 840240 MACS2_peak_1 6.91052 | 461 chr1 840239 840240 treat1_peak_1 6.91052 |
458 chr1 919549 919550 MACS2_peak_2 8.70936 | 462 chr1 919549 919550 treat1_peak_2 8.70936 |
459 chr1 937374 937375 MACS2_peak_3 6.61759 | 463 chr1 937374 937375 treat1_peak_3 6.61759 |
460 ======= ========= ======= ============ ======= | 464 ======= ========= ======= ============ ======= |
461 | 465 |
462 Columns contain the following data: | 466 Columns contain the following data: |
463 | 467 |
464 * **1st**: chromosome name | 468 * **1st**: chromosome name |
511 Example: | 515 Example: |
512 | 516 |
513 ======= ========= ======= ============ ==== === ======= ======= ======= | 517 ======= ========= ======= ============ ==== === ======= ======= ======= |
514 1 2 3 4 5 6 7 8 9 | 518 1 2 3 4 5 6 7 8 9 |
515 ======= ========= ======= ============ ==== === ======= ======= ======= | 519 ======= ========= ======= ============ ==== === ======= ======= ======= |
516 chr1 840081 840400 MACS2_peak_1 52 . 4.08790 8.57605 5.21506 | 520 chr1 840081 840400 treat1_peak_1 52 . 4.08790 8.57605 5.21506 |
517 chr1 919419 919785 MACS2_peak_2 56 . 4.37270 8.90436 5.60462 | 521 chr1 919419 919785 treat1_peak_2 56 . 4.37270 8.90436 5.60462 |
518 chr1 937220 937483 MACS2_peak_3 48 . 4.02343 8.06676 4.86861 | 522 chr1 937220 937483 treat1_peak_3 48 . 4.02343 8.06676 4.86861 |
519 ======= ========= ======= ============ ==== === ======= ======= ======= | 523 ======= ========= ======= ============ ==== === ======= ======= ======= |
520 | 524 |
521 | 525 |
522 Columns contain the following data: | 526 Columns contain the following data: |
523 | 527 |
539 Example: | 543 Example: |
540 | 544 |
541 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= | 545 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= |
542 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 546 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
543 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= | 547 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= |
544 chr1 840081 840400 MACS2_peak_1 52 . 840081 840400 0 1 319 0 4.08790 8.57605 5.21506 | 548 chr1 840081 840400 treat1_peak_1 52 . 840081 840400 0 1 319 0 4.08790 8.57605 5.21506 |
545 chr1 919419 919785 MACS2_peak_2 56 . 919419 919785 0 1 366 0 4.37270 8.90436 5.60462 | 549 chr1 919419 919785 treat1_peak_2 56 . 919419 919785 0 1 366 0 4.37270 8.90436 5.60462 |
546 chr1 937220 937483 MACS2_peak_3 48 . 937220 937483 0 1 263 0 4.02343 8.06676 4.86861 | 550 chr1 937220 937483 treat1_peak_3 48 . 937220 937483 0 1 263 0 4.02343 8.06676 4.86861 |
547 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= | 551 ======= ========= ======= ============ ==== === ======= ======= === === === === ======= ======= ======= |
548 | 552 |
549 Columns contain the following data: | 553 Columns contain the following data: |
550 | 554 |
551 * **1st**: chromosome name | 555 * **1st**: chromosome name |