comparison macs2_callpeak.xml @ 9:acbd3fb47f90 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/macs2 commit 586ecaebf9e6020fac2674fbda368e293d1c9bc2
author iuc
date Thu, 25 Jan 2018 02:11:52 -0500
parents e8a060164e11
children f0b351e734b8
comparison
equal deleted inserted replaced
8:e8a060164e11 9:acbd3fb47f90
1 <tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.1"> 1 <tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.2">
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 @home_dir@
12
11 #set $temp_stderr = 'macs2_stderr' 13 #set $temp_stderr = 'macs2_stderr'
12 (macs2 callpeak 14 (macs2 callpeak
13 15
14 --name 'MACS2' 16 --name 'MACS2'
15 17
16 ## Treatment File(s) 18 ## Treatment File(s)
17 19
18 #if str($treatment.t_multi_select) == "Yes": 20 #if str($treatment.t_multi_select) == "Yes":
19 -t ${ ' '.join( map( lambda x:'"%s"' % ( x ), '$treatment.input_treatment_file' ) ) } 21 -t ${ ' '.join( map( lambda x:'"%s"' % ( x ), '$treatment.input_treatment_file' ) ) }
20
21 #if '$treatment.input_treatment_file[0].ext.upper()' == "BAM" and $bampe:
22 --format BAMPE
23 #else
24 --format='$treatment.input_treatment_file[0].ext.upper()'
25 #end if
26
27 #else 22 #else
28 -t '$treatment.input_treatment_file' 23 -t '$treatment.input_treatment_file'
29
30 #if '$treatment.input_treatment_file.ext.upper()' == "BAM" and $bampe:
31 --format BAMPE
32 #else
33 --format='$treatment.input_treatment_file.ext.upper()'
34 #end if
35 #end if 24 #end if
36 25
37 ## Control File(s) 26 ## Control File(s)
38 27
39 #if str($control.c_select) == "Yes": 28 #if str($control.c_select) == "Yes":
42 #else 31 #else
43 -c '$control.c_multiple.input_control_file' 32 -c '$control.c_multiple.input_control_file'
44 #end if 33 #end if
45 #end if 34 #end if
46 35
36 --format $format
37
47 @effective_genome_size@ 38 @effective_genome_size@
48 39
49 --bw '${band_width}'
50 @mfold_command@
51
52 ## advanced options 40 ## advanced options
53 #if $advanced_options.advanced_options_selector == "on": 41
54 $advanced_options.nolambda 42 $advanced_options.nolambda
55 $advanced_options.to_large 43 $advanced_options.to_large
44
45 #if $advanced_options.ratio:
56 --ratio $advanced_options.ratio 46 --ratio $advanced_options.ratio
47 #end if
48
49 #if $advanced_options.slocal:
57 --slocal $advanced_options.slocal 50 --slocal $advanced_options.slocal
51 #end if
52
53 #if $advanced_options.llocal:
58 --llocal $advanced_options.llocal 54 --llocal $advanced_options.llocal
59 #if $advanced_options.broad_options.broad_options_selector == "broad": 55 #end if
60 --broad 56
61 --broad-cutoff='${ advanced_options.broad_options.broad_cutoff }' 57 #if $advanced_options.broad_options.broad_options_selector == "broad":
62 #else 58 --broad
63 $advanced_options.broad_options.call_summits 59 --broad-cutoff='${ advanced_options.broad_options.broad_cutoff }'
64 #end if 60 #else
65 61 $advanced_options.broad_options.call_summits
66 #if str( $advanced_options.keep_dup_options.keep_dup_options_selector ) == "user": 62 #end if
67 --keep-dup '${ advanced_options.keep_dup_options.user_keepdup }' 63
68 #else 64 #if str( $advanced_options.keep_dup_options.keep_dup_options_selector ) == "user":
69 --keep-dup '${ advanced_options.keep_dup_options.keep_dup_options_selector }' 65 --keep-dup '${ advanced_options.keep_dup_options.user_keepdup }'
70 #end if 66 #else
71 67 --keep-dup '${ advanced_options.keep_dup_options.keep_dup_options_selector }'
72 #end if 68 #end if
69
73 70
74 ## With --bdg two additional output files will be generated. 71 ## With --bdg two additional output files will be generated.
75 #if "bdg" in str($outputs).split(','): 72 #if "bdg" in str($outputs).split(','):
76 --bdg 73 --bdg
77 #end if 74 #end if
87 84
88 ## model options 85 ## model options
89 #if $nomodel_type.nomodel_type_selector == "nomodel": 86 #if $nomodel_type.nomodel_type_selector == "nomodel":
90 --nomodel 87 --nomodel
91 --extsize '${ nomodel_type.extsize }' 88 --extsize '${ nomodel_type.extsize }'
89 --shift '${ nomodel_type.shift}'
90 #else
91 --mfold '${nomodel_type.mfold_lower}' '${nomodel_type.mfold_upper}'
92
93 #if $nomodel_type.band_width:
94 --bw '${nomodel_type.band_width}'
95 #end if
92 #end if 96 #end if
93 97
94 2>&1 > $temp_stderr) 98 2>&1 > $temp_stderr)
95 #if "peaks_tabular" in str($outputs).split(','): 99 #if "peaks_tabular" in str($outputs).split(','):
96 && 100 &&
109 ( 113 (
110 count=`ls -1 MACS2* 2>/dev/null | wc -l`; 114 count=`ls -1 MACS2* 2>/dev/null | wc -l`;
111 if [ \$count != 0 ]; 115 if [ \$count != 0 ];
112 then 116 then
113 mkdir '${ output_extra_files.files_path }' && 117 mkdir '${ output_extra_files.files_path }' &&
114 cp MACS2* '${ output_extra_files.files_path }' && 118 cp -r MACS2* '${ output_extra_files.files_path }' &&
115 python '$__tool_directory__/dir2html.py' 119 python '$__tool_directory__/dir2html.py'
116 '${ output_extra_files.files_path }' $temp_stderr > '${ output_extra_files }'; 120 '${ output_extra_files.files_path }' $temp_stderr > '${ output_extra_files }';
117 fi; 121 fi;
118 ) 122 )
119 #end if 123 #end if
136 </when> 140 </when>
137 </conditional> 141 </conditional>
138 142
139 <conditional name="control"> 143 <conditional name="control">
140 <param name="c_select" type="select" label="Do you have a Control File?" > 144 <param name="c_select" type="select" label="Do you have a Control File?" >
141 <option value="Yes" selected="True">Yes</option> 145 <option value="Yes">Yes</option>
142 <option value="No">No</option> 146 <option value="No" selected="True">No</option>
143 </param> 147 </param>
144 <when value="Yes"> 148 <when value="Yes">
145 <conditional name="c_multiple"> 149 <conditional name="c_multiple">
146 <param name="c_multi_select" type="select" label="Are you pooling Control Files?" help="For more information, see Help section below" > 150 <param name="c_multi_select" type="select" label="Are you pooling Control Files?" help="For more information, see Help section below" >
147 <option value="No" selected="True">No</option> 151 <option value="No" selected="True">No</option>
156 </conditional> 160 </conditional>
157 </when> 161 </when>
158 <when value="No" /> 162 <when value="No" />
159 </conditional> 163 </conditional>
160 164
161 <param name="bampe" type="boolean" truevalue="--format BAMPE" falsevalue="" checked="False" 165 <param name="format" type="select" label="Format of Input Files" help="For Paired-end BAM (BAMPE) the 'Build model step' will be ignored and the real fragments will be used for each template defined by leftmost and rightmost mapping positions (--format). Default: Single-end BAM">
162 label="Are your inputs Paired-end BAM files?" 166 <option value="BAM" selected="True">Single-end BAM</option>
163 help="The 'Build model step' will be ignored and the real fragments will be used for each template defined by leftmost and rightmost mapping positions. (--format BAMPE)"/> 167 <option value="BAMPE">Paired-end BAM</option>
168 <option value="BED">Single-end BED</option>
169 </param>
164 170
165 <expand macro="conditional_effective_genome_size" /> 171 <expand macro="conditional_effective_genome_size" />
166 <expand macro="band_width" /> 172
167 <expand macro="mfold_options" /> 173 <conditional name="nomodel_type">
174 <param name="nomodel_type_selector" type="select" label="Build Model">
175 <option value="nomodel">Do not build the shifting model (--nomodel)</option>
176 <option value="create_model" selected="true">Build the shifting model</option>
177 </param>
178 <when value="create_model">
179 <param name="mfold_lower" type="integer" value="5" label="Set lower mfold bound" help="Select the lower region within MFOLD range of high confidence enrichment ratio against background to build model. Fold-enrichment in regions must be higher than lower limit (--mfold). Default: 5" />
180 <param name="mfold_upper" type="integer" value="50" label="Set upper mfold bound" help="Select the upper region within MFOLD range of high confidence enrichment ratio against background to build model. Fold-enrichment in regions must be lower than the upper limit (--mfold). Default: 50"/>
181 <param name="band_width" type="integer" value="300"
182 label="Band width for picking regions to compute fragment size"
183 help=" You can set this parameter as the medium fragment size expected from sonication or size selection (--bw). Default: 300" />
184 </when>
185 <when value="nomodel">
186 <param name="extsize" type="integer" value="200" label="Set extension size" help="The arbitrary extension size in bp. When nomodel is true, MACS will use this value as fragment size to extend each read towards 3-prime; end, then pile them up. It is exactly twice the number of obsolete SHIFTSIZE. In previous language, each read is moved 5-prime-to-3-prime direction to middle of fragment by 0.5 d, then extended to both direction with 0.5 d. This is equivalent to say each read is extended towards 5-prime-to-3-prime into a d size fragment. --extsize (this option) and --shift (the option below) can be combined when necessary. See --shift option below. Default: 200 (--extsize)."/>
187 <param name="shift" type="integer" value="0" label="Set shift size" help="(NOT the legacy --shiftsize option!) The arbitrary shift in bp. Use discretion while setting it other than default value. When NOMODEL is set, MACS will use this value to move cutting ends (5-prime) towards 5-prime-to-3-prime direction then apply EXTSIZE to extend them to fragments. When this value is negative, ends will be moved toward 3-prime-to-5-prime direction. Recommended to keep it as default 0 for ChIP-Seq datasets, or -1 * 0.5 of --extsize (option above) together with --extsize option for detecting enriched cutting loci such as certain DNAseI-Seq datasets. Note, you can't set values other than 0 if format is paired-end data (BAMPE). Default: 0 (--shift)."/>
188 </when>
189 </conditional>
168 190
169 <conditional name="cutoff_options"> 191 <conditional name="cutoff_options">
170 <param name="cutoff_options_selector" type="select" label="Peak detection based on" help="default uses q-value"> 192 <param name="cutoff_options_selector" type="select" label="Peak detection based on" help="default uses q-value">
171 <option value="qvalue" selected="true">q-value</option> 193 <option value="qvalue" selected="true">q-value</option>
172 <option value="pvalue">p-value</option> 194 <option value="pvalue">p-value</option>
173 </param> 195 </param>
174 <when value="pvalue"> 196 <when value="pvalue">
175 <param name="pvalue" type="float" value="" label="p-value cutoff for peak detection" help="default: not set (--pvalue)"/> 197 <param name="pvalue" type="float" value="" label="p-value cutoff for peak detection" help="default: not set (--pvalue)"/>
176 </when> 198 </when>
177 <when value="qvalue"> 199 <when value="qvalue">
178 <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.01. For broad marks, you can try 0.05 as cutoff. Q-values are calculated from p-values using Benjamini-Hochberg procedure. (--qvalue)"/> 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)"/>
179 </when>
180 </conditional>
181
182 <conditional name="nomodel_type">
183 <param name="nomodel_type_selector" type="select" label="Build Model">
184 <option value="nomodel">Do not build the shifting model (--nomodel)</option>
185 <option value="create_model" selected="true">Build the shifting model</option>
186 </param>
187 <when value="create_model"/>
188 <when value="nomodel">
189 <param name="extsize" type="integer" value="200" label="Set extension size" help="The arbitrary extension size in bp. When nomodel is true, MACS will use this value as fragment size to extend each read towards 3-prime; end, then pile them up. It is exactly twice the number of obsolete SHIFTSIZE. In previous language, each read is moved 5-prime-to-3-prime direction to middle of fragment by 0.5 d, then extended to both direction with 0.5 d. This is equivalent to say each read is extended towards 5-prime-to-3-prime into a d size fragment. --extsize (this option) and --shift (the option below) can be combined when necessary. See --shift option below. Default = 200 (--extsize)."/>
190 <param name="shift" type="integer" value="0" label="Set shift size" help="(NOT the legacy --shiftsize option!) The arbitrary shift in bp. Use discretion while setting it other than default value. When NOMODEL is set, MACS will use this value to move cutting ends (5-prime) towards 5-prime-to-3-prime direction then apply EXTSIZE to extend them to fragments. When this value is negative, ends will be moved toward 3-prime-to-5-prime direction. Recommended to keep it as default 0 for ChIP-Seq datasets, or -1 * 0.5 of --extsize (option above) together with --extsize option for detecting enriched cutting loci such as certain DNAseI-Seq datasets. Note, you can't set values other than 0 if format is paired-end data (BAMPE). Default = 0 (--shift)."/>
191 </when> 201 </when>
192 </conditional> 202 </conditional>
193 203
194 <param name="outputs" type="select" display="checkboxes" multiple="True" optional="True" label="Additional Outputs" help="PDF is only created when the model is built"> 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">
195 <option value="peaks_tabular">Peaks as tabular file</option> 205 <option value="peaks_tabular">Peaks as tabular file</option>
197 <option value="bdg" >Scores in bedGraph files (--bdg)</option> 207 <option value="bdg" >Scores in bedGraph files (--bdg)</option>
198 <option value="html">Summary page (html)</option> 208 <option value="html">Summary page (html)</option>
199 <option value="pdf">Plot in PDF</option> 209 <option value="pdf">Plot in PDF</option>
200 </param> 210 </param>
201 211
202 <conditional name="advanced_options"> 212 <section name="advanced_options" title="Advanced Options">
203 <param name="advanced_options_selector" type="select" label="Advanced Options"> 213 <param name="to_large" type="boolean" truevalue="--to-large" falsevalue="" checked="False" optional="True"
204 <option value="off" selected="true">Hide advanced options</option>
205 <option value="on">Display advanced options</option>
206 </param>
207 <when value="on">
208 <param name="to_large" type="boolean" truevalue="--to-large" falsevalue="" checked="False"
209 label="When set, scale the small sample up to the bigger sample" 214 label="When set, scale the small sample up to the bigger sample"
210 help="By default, the bigger dataset will be scaled down towards the smaller dataset, which will lead to smaller p/qvalues and more specific results. Keep in mind that scaling down will bring down background noise more. (--to-large)"/> 215 help="By default, the bigger dataset will be scaled down towards the smaller dataset, which will lead to smaller p/qvalues and more specific results. Keep in mind that scaling down will bring down background noise more. (--to-large). Default: No"/>
211 <param name="nolambda" type="boolean" truevalue="--nolambda" falsevalue="" checked="False" 216 <param name="nolambda" type="boolean" truevalue="--nolambda" falsevalue="" checked="False" optional="True"
212 label="Use fixed background lambda as local lambda for every peak region" help="up to 9X more time consuming (--nolambda)"/> 217 label="Use fixed background lambda as local lambda for every peak region" help="up to 9X more time consuming (--nolambda). Default: No"/>
213 <param name="ratio" type="float" value="1.0" 218 <param name="ratio" type="float" optional="True"
214 label="When set, use a custom scaling ratio of ChIP/control (e.g. calculated using NCIS) for linear scaling" 219 label="When set, use a custom scaling ratio of ChIP/control (e.g. calculated using NCIS) for linear scaling"
215 help="(--ratio)"/> 220 help="(--ratio) Default: ignore"/>
216 <param name="slocal" value="1000" type="integer" label="The small nearby region in basepairs to calculate dynamic lambda" 221 <param name="slocal" type="integer" optional="True" label="The small nearby region in basepairs to calculate dynamic lambda"
217 help="This is used to capture the bias near the peak summit region. Invalid if there is no control data. If you set this to 0, MACS will skip slocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--slocal)"/> 222 help="This is used to capture the bias near the peak summit region. Invalid if there is no control data. If you set this to 0, MACS will skip slocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--slocal). Default: 1000"/>
218 <param name="llocal" value="10000" type="integer" label="The large nearby region in basepairs to calculate dynamic lambda" 223 <param name="llocal" type="integer" optional="True" label="The large nearby region in basepairs to calculate dynamic lambda"
219 help="This is used to capture the surround bias. If you set this to 0, MACS will skip llocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--llocal)"/> 224 help="This is used to capture the surround bias. If you set this to 0, MACS will skip llocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--llocal) Default: 10000"/>
220 <conditional name="broad_options"> 225 <conditional name="broad_options">
221 <param name="broad_options_selector" type="select" 226 <param name="broad_options_selector" type="select"
222 label="Composite broad regions" help="by putting nearby highly enriched regions into a broad region with loose cutoff (--broad)"> 227 label="Composite broad regions" help="by putting nearby highly enriched regions into a broad region with loose cutoff (--broad)">
223 <option value="nobroad" selected="true">No broad regions</option> 228 <option value="nobroad" selected="true">No broad regions</option>
224 <option value="broad">broad regions</option> 229 <option value="broad">broad regions</option>
232 label="Use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region" 237 label="Use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region"
233 help="(--call-summits)"/> 238 help="(--call-summits)"/>
234 </when> 239 </when>
235 </conditional> 240 </conditional>
236 <expand macro="keep_duplicates" /> 241 <expand macro="keep_duplicates" />
237 </when> 242 </section>
238 <when value="off" />
239 </conditional>
240 </inputs> 243 </inputs>
241 <outputs> 244 <outputs>
242 <!--callpeaks output--> 245 <!--callpeaks output-->
243 <data name="output_tabular" format="tabular" label="${tool.name} on ${on_string} (Peaks in tabular format)"> 246 <data name="output_tabular" format="tabular" label="${tool.name} on ${on_string} (Peaks in tabular format)">
244 <filter> outputs and 'peaks_tabular' in outputs</filter> 247 <filter> outputs and 'peaks_tabular' in outputs</filter>
245 </data> 248 </data>
246 <data name="output_broadpeaks" format="bed" from_work_dir="MACS2_peaks.broadPeak" label="${tool.name} on ${on_string} (broad Peaks)"> 249 <data name="output_broadpeaks" format="bed" from_work_dir="MACS2_peaks.broadPeak" label="${tool.name} on ${on_string} (broad Peaks)">
247 <filter> 250 <filter>
248 (( 251 ((
249 advanced_options['advanced_options_selector'] == "on" and
250 advanced_options['broad_options']['broad_options_selector'] == "broad" 252 advanced_options['broad_options']['broad_options_selector'] == "broad"
251 )) 253 ))
252 </filter> 254 </filter>
253 </data> 255 </data>
254 <data name="output_gappedpeaks" format="bed" from_work_dir="MACS2_peaks.gappedPeak" label="${tool.name} on ${on_string} (gapped Peaks)"> 256 <data name="output_gappedpeaks" format="bed" from_work_dir="MACS2_peaks.gappedPeak" label="${tool.name} on ${on_string} (gapped Peaks)">
255 <filter> 257 <filter>
256 (( 258 ((
257 advanced_options['advanced_options_selector'] == "on" and
258 advanced_options['broad_options']['broad_options_selector'] == "broad" 259 advanced_options['broad_options']['broad_options_selector'] == "broad"
259 )) 260 ))
260 </filter> 261 </filter>
261 </data> 262 </data>
262 <data name="output_narrowpeaks" format="bed" from_work_dir="MACS2_peaks.narrowPeak" label="${tool.name} on ${on_string} (narrow Peaks)"> 263 <data name="output_narrowpeaks" format="bed" from_work_dir="MACS2_peaks.narrowPeak" label="${tool.name} on ${on_string} (narrow Peaks)">
263 <filter> 264 <filter>
264 ( 265 ((
265 advanced_options['advanced_options_selector'] == "off" or
266 (
267 advanced_options['advanced_options_selector'] == "on" and
268 advanced_options['broad_options']['broad_options_selector'] == "nobroad" 266 advanced_options['broad_options']['broad_options_selector'] == "nobroad"
269 )) 267 ))
270 </filter> 268 </filter>
271 </data> 269 </data>
272 <data name="output_summits" format="bed" from_work_dir="MACS2_summits.bed" label="${tool.name} on ${on_string} (summits in BED)"> 270 <data name="output_summits" format="bed" from_work_dir="MACS2_summits.bed" label="${tool.name} on ${on_string} (summits in BED)">
293 <tests> 291 <tests>
294 <test expect_num_outputs="5"> 292 <test expect_num_outputs="5">
295 <param name="input_treatment_file" value="ChIP_200K.bed" ftype="bed"/> 293 <param name="input_treatment_file" value="ChIP_200K.bed" ftype="bed"/>
296 <param name="c_select" value="Yes"/> 294 <param name="c_select" value="Yes"/>
297 <param name="input_control_file" value="Control_200K.bed" ftype="bed"/> 295 <param name="input_control_file" value="Control_200K.bed" ftype="bed"/>
296 <param name="format" value="BED" />
298 <param name="cutoff_options_selector" value="qvalue"/> 297 <param name="cutoff_options_selector" value="qvalue"/>
299 <param name="qvalue" value="0.05"/> 298 <param name="qvalue" value="0.05"/>
300 <param name="band_width" value="300"/> 299 <param name="band_width" value="300"/>
301 <param name="outputs" value="peaks_tabular,bdg,html"/> 300 <param name="outputs" value="peaks_tabular,bdg,html"/>
302 <param name="effective_genome_size_options_selector" value="user_defined" /> 301 <param name="effective_genome_size_options_selector" value="user_defined" />
309 <output name="output_extra_files"> 308 <output name="output_extra_files">
310 <assert_contents> 309 <assert_contents>
311 <has_text text="Additional output created by MACS2" /> 310 <has_text text="Additional output created by MACS2" />
312 </assert_contents> 311 </assert_contents>
313 </output> 312 </output>
314
315 </test> 313 </test>
316 <!-- Ensure pdf can be output --> 314 <!-- Ensure pdf can be output -->
317 <test expect_num_outputs="2"> 315 <test expect_num_outputs="2">
318 <param name="input_treatment_file" value="ChIP_200K.bed" ftype="bed"/> 316 <param name="input_treatment_file" value="ChIP_200K.bed" ftype="bed"/>
319 <param name="c_select" value="Yes"/> 317 <param name="c_select" value="Yes"/>
320 <param name="input_control_file" value="Control_200K.bed" ftype="bed"/> 318 <param name="input_control_file" value="Control_200K.bed" ftype="bed"/>
319 <param name="format" value="BED" />
321 <param name="cutoff_options_selector" value="qvalue"/> 320 <param name="cutoff_options_selector" value="qvalue"/>
322 <param name="qvalue" value="0.05"/> 321 <param name="qvalue" value="0.05"/>
323 <param name="band_width" value="300"/> 322 <param name="band_width" value="300"/>
324 <param name="outputs" value="pdf"/> 323 <param name="outputs" value="pdf"/>
325 <param name="effective_genome_size_options_selector" value="user_defined" /> 324 <param name="effective_genome_size_options_selector" value="user_defined" />
326 <param name="gsize" value="3300000000" /> 325 <param name="gsize" value="3300000000" />
327 <param name="lower" value="5" /> 326 <param name="lower" value="5" />
328 <param name="upper" value="50" /> 327 <param name="upper" value="50" />
329 <output name="output_plot" file="magic.pdf" ftype="pdf" compare="contains" /> 328 <output name="output_plot" file="magic.pdf" ftype="pdf" compare="contains" />
330 </test> 329 </test>
330 <!-- Ensure BAMPE works -->
331 <test expect_num_outputs="1">
332 <param name="input_treatment_file" ftype="bam" value="bwa-mem-test1.bam"/>
333 <param name="format" value="BAMPE" />
334 <param name="effective_genome_size_options_selector" value="user_defined"/>
335 <param name="gsize" value="3300000000"/>
336 <param name="nomodel_type_selector" value="nomodel"/>
337 <param name="nolambda" value="True"/>
338 <output name="output_narrowpeaks" file="callpeak_bampe_narrow.bed"/>
339 </test>
331 </tests> 340 </tests>
332 <help><![CDATA[ 341 <help><![CDATA[
333 342
334 .. class:: infomark 343 .. class:: infomark
335 344
336 **What it does** 345 **What it does**
337 346
338 **callpeak** is the main function of the MACS2_ package. MACS identifies enriched binding sites in ChIP-seq experiments. It captures the influence of genome complexity to evaluate the significance of enriched ChIP regions, and improves the spatial resolution of binding sites through combining the information of both sequencing tag position and orientation. 347 **callpeak** is the main function of the MACS2_ package. MACS identifies enriched binding sites in ChIP-seq experiments. It captures the influence of genome complexity to evaluate the significance of enriched ChIP regions, and improves the spatial resolution of binding sites through combining the information of both sequencing tag position and orientation.
339 348
340 .. _MACS2: https://github.com/taoliu/MACS 349 .. _MACS2: https://github.com/taoliu/MACS
341 350
342 ----- 351 -----
343 352
347 356
348 A Treatment File is the only REQUIRED parameter for MACS. The file can be in BAM or BED format and this tool will autodetect the format using the first treatment file provided as input. If you have more than one alignment file per sample, you can select to pool them above. MACS can pool files together e.g. as `-t A B C` for treatment or `-c A B C` for control. 357 A Treatment File is the only REQUIRED parameter for MACS. The file can be in BAM or BED format and this tool will autodetect the format using the first treatment file provided as input. If you have more than one alignment file per sample, you can select to pool them above. MACS can pool files together e.g. as `-t A B C` for treatment or `-c A B C` for control.
349 358
350 Both single-end and paired-end mapping results can be input and you can specify if the data is from paired-end reads above. Paired-end mapping results can be input to MACS as a single BAM file, and just the left mate (5' end) tag will be automatically kept. However, when paired-end format (BAMPE) is specified, MACS will use the real fragments inferred from alignment results for reads pileup. 359 Both single-end and paired-end mapping results can be input and you can specify if the data is from paired-end reads above. Paired-end mapping results can be input to MACS as a single BAM file, and just the left mate (5' end) tag will be automatically kept. However, when paired-end format (BAMPE) is specified, MACS will use the real fragments inferred from alignment results for reads pileup.
351 360
361 *Effective Genome Size*
362
363 PLEASE assign this parameter to fit your needs!
364
365 It's the mappable genome size or effective genome size which is defined as the genome size which can be sequenced. Because of the repetitive features on the chromsomes, the actual mappable genome size will be smaller than the original size, about 90% or 70% of the genome size. The default hs -- 2.7e9 is recommended for UCSC human hg18 assembly. Here are all precompiled parameters for effective genome size from the MACS2_ website:
366
367 hs: 2.7e9
368 mm: 1.87e9
369 ce: 9e7
370 dm: 1.2e8
371
352 ----- 372 -----
353 373
354 **Outputs** 374 **Outputs**
355 375
356 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. 376 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.
357 377
358 * **a BED file of peaks** (default) 378 * **a BED file of peaks** (default)
359 * a tabular file of peaks 379 * a tabular file of peaks
360 * a BED file of peak summits 380 * a BED file of peak summits
361 * two bedGraph files of scores, for treatment pileup and control lambda 381 * two bedGraph files of scores, for treatment pileup and control lambda
364 * a BED file of broad peaks (if **Composite broad regions** is selected under Advanced Options) 384 * a BED file of broad peaks (if **Composite broad regions** is selected under Advanced Options)
365 * a BED file of gapped peaks (if **Composite broad regions** is selected under Advanced Options) 385 * a BED file of gapped peaks (if **Composite broad regions** is selected under Advanced Options)
366 386
367 **Peaks BED File** 387 **Peaks BED File**
368 388
369 The default output is the narrowPeak BED file (BED6+4 format). This contains the peak locations, together with peak summit, pvalue and qvalue. You can load it to UCSC genome browser. 389 The default output is the narrowPeak BED file (BED6+4 format). This contains the peak locations, together with peak summit, pvalue and qvalue. You can load it to UCSC genome browser.
370 390
371 Example: 391 Example:
372 392
373 ======= ========= ======= ============ ==== === ======= ======== ======= ======= 393 ======= ========= ======= ============ ==== === ======= ======== ======= =======
374 1 2 3 4 5 6 7 8 9 **10** 394 1 2 3 4 5 6 7 8 9 **10**
375 ======= ========= ======= ============ ==== === ======= ======== ======= ======= 395 ======= ========= ======= ============ ==== === ======= ======== ======= =======
376 chr1 840081 840400 MACS2_peak_1 69 . 4.89872 10.50944 6.91052 158 396 chr1 840081 840400 MACS2_peak_1 69 . 4.89872 10.50944 6.91052 158
377 chr1 919419 919785 MACS2_peak_2 87 . 5.85158 12.44148 8.70936 130 397 chr1 919419 919785 MACS2_peak_2 87 . 5.85158 12.44148 8.70936 130
378 chr1 937220 937483 MACS2_peak_3 66 . 4.87632 10.06728 6.61759 154 398 chr1 937220 937483 MACS2_peak_3 66 . 4.87632 10.06728 6.61759 154
379 ======= ========= ======= ============ ==== === ======= ======== ======= ======= 399 ======= ========= ======= ============ ==== === ======= ======== ======= =======
380 400
392 * **10th**: relative summit position to peak start 412 * **10th**: relative summit position to peak start
393 413
394 414
395 **Peaks tabular File** 415 **Peaks tabular File**
396 416
397 A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions. 417 A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions.
398 418
399 Example: 419 Example:
400 420
401 ======= ========= ======= ========== ============== ========== ================== =================== ================== ============= 421 ======= ========= ======= ========== ============== ========== ================== =================== ================== =============
402 **chr** **start** **end** **length** **abs_summit** **pileup** **-log10(pvalue)** **fold_enrichment** **-log10(qvalue)** **name** 422 **chr** **start** **end** **length** **abs_summit** **pileup** **-log10(pvalue)** **fold_enrichment** **-log10(qvalue)** **name**
426 446
427 A BED file which contains the peak summits locations for every peaks. The 5th column in this file is -log10qvalue, the same as in the Peaks BED file. If you want to find the motifs at the binding sites, this file is recommended. The file can be loaded directly to UCSC genome browser. Remove the beginning track line if you want to analyze it by other tools. 447 A BED file which contains the peak summits locations for every peaks. The 5th column in this file is -log10qvalue, the same as in the Peaks BED file. If you want to find the motifs at the binding sites, this file is recommended. The file can be loaded directly to UCSC genome browser. Remove the beginning track line if you want to analyze it by other tools.
428 448
429 Example: 449 Example:
430 450
431 ======= ========= ======= ============ ======= 451 ======= ========= ======= ============ =======
432 1 2 3 4 **5** 452 1 2 3 4 **5**
433 ======= ========= ======= ============ ======= 453 ======= ========= ======= ============ =======
434 chr1 840239 840240 MACS2_peak_1 6.91052 454 chr1 840239 840240 MACS2_peak_1 6.91052
435 chr1 919549 919550 MACS2_peak_2 8.70936 455 chr1 919549 919550 MACS2_peak_2 8.70936
436 chr1 937374 937375 MACS2_peak_3 6.61759 456 chr1 937374 937375 MACS2_peak_3 6.61759
485 505
486 If the broad option (--broad) is selected unded Advanced Options above, MACS2 will output a broadPeaks file. When this flag is on, MACS will try to composite broad regions in BED12 ( a gene-model-like format ) by putting nearby highly enriched regions into a broad region with loose cutoff. The broad region is controlled by another cutoff through --broad-cutoff. The maximum length of broad region length is 4 times of d from MACS. The broad peaks file is in BED6+3 format which is similar to the narrowPeak file, except for missing the 10th column for annotating peak summits. 506 If the broad option (--broad) is selected unded Advanced Options above, MACS2 will output a broadPeaks file. When this flag is on, MACS will try to composite broad regions in BED12 ( a gene-model-like format ) by putting nearby highly enriched regions into a broad region with loose cutoff. The broad region is controlled by another cutoff through --broad-cutoff. The maximum length of broad region length is 4 times of d from MACS. The broad peaks file is in BED6+3 format which is similar to the narrowPeak file, except for missing the 10th column for annotating peak summits.
487 507
488 Example: 508 Example:
489 509
490 ======= ========= ======= ============ ==== === ======= ======= ======= 510 ======= ========= ======= ============ ==== === ======= ======= =======
491 1 2 3 4 5 6 7 8 9 511 1 2 3 4 5 6 7 8 9
492 ======= ========= ======= ============ ==== === ======= ======= ======= 512 ======= ========= ======= ============ ==== === ======= ======= =======
493 chr1 840081 840400 MACS2_peak_1 52 . 4.08790 8.57605 5.21506 513 chr1 840081 840400 MACS2_peak_1 52 . 4.08790 8.57605 5.21506
494 chr1 919419 919785 MACS2_peak_2 56 . 4.37270 8.90436 5.60462 514 chr1 919419 919785 MACS2_peak_2 56 . 4.37270 8.90436 5.60462
495 chr1 937220 937483 MACS2_peak_3 48 . 4.02343 8.06676 4.86861 515 chr1 937220 937483 MACS2_peak_3 48 . 4.02343 8.06676 4.86861
496 ======= ========= ======= ============ ==== === ======= ======= ======= 516 ======= ========= ======= ============ ==== === ======= ======= =======
497 517
498 518
499 Columns contain the following data: 519 Columns contain the following data:
500 520
501 * **1st**: chromosome name 521 * **1st**: chromosome name
529 * **2nd**: start position of peak 549 * **2nd**: start position of peak
530 * **3rd**: end position of peak 550 * **3rd**: end position of peak
531 * **4th**: name of peak 551 * **4th**: name of peak
532 * **5th**: 10*-log10qvalue, to be more compatible to show grey levels on UCSC browser 552 * **5th**: 10*-log10qvalue, to be more compatible to show grey levels on UCSC browser
533 * **6th**: strand, either "." (=no strand) or "+" or "-" 553 * **6th**: strand, either "." (=no strand) or "+" or "-"
534 * **7th**: start of the first narrow peak in the region 554 * **7th**: start of the first narrow peak in the region
535 * **8th**: end of the peak 555 * **8th**: end of the peak
536 * **9th**: RGB color key, default colour is 0 556 * **9th**: RGB color key, default colour is 0
537 * **10th**: number of blocks, including the starting 1bp and ending 1bp of broad regions 557 * **10th**: number of blocks, including the starting 1bp and ending 1bp of broad regions
538 * **11th**: length of each block, comma-separated values if multiple 558 * **11th**: length of each block, comma-separated values if multiple
539 * **12th**: start of each block, comma-separated values if multiple 559 * **12th**: start of each block, comma-separated values if multiple
540 * **13th**: fold-change 560 * **13th**: fold-change
541 * **14th**: -log10pvalue 561 * **14th**: -log10pvalue
542 * **15th**: -log10qvalue 562 * **15th**: -log10qvalue
543 563
544 ----- 564 -----
545 565
546 **More Information** 566 **More Information**