comparison mergeBed.xml @ 2:457b09031d57 draft

Uploaded
author iuc
date Tue, 19 May 2015 07:05:36 -0400
parents 82aac94b06c3
children 2cd7e321d259
comparison
equal deleted inserted replaced
1:82aac94b06c3 2:457b09031d57
1 <tool id="bedtools_mergebed" name="Merge BED files" version="@WRAPPER_VERSION@.0"> 1 <tool id="bedtools_mergebed" name="Merge BED files" version="@WRAPPER_VERSION@.1">
2 <description>(mergeBed)</description> 2 <description>(mergeBed)</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements" />
10 mergeBed 10 mergeBed
11 -i "${input}" 11 -i "${input}"
12 $strand 12 $strand
13 -d $distance 13 -d $distance
14 $header 14 $header
15 @C_AND_O_ARGUMENT@
15 > "${output}" 16 > "${output}"
16 ]]> 17 ]]>
17 </command> 18 </command>
18 <inputs> 19 <inputs>
19 <param name="input" format="bam,bed,gff,vcf" type="data" label="Sort the following BAM/BED/VCF/GFF file"/> 20 <param name="input" format="bam,bed,gff,vcf" type="data" label="Sort the following BAM/BED/VCF/GFF file"/>
25 </param> 26 </param>
26 <param name="distance" type="integer" value="0" 27 <param name="distance" type="integer" value="0"
27 label="Maximum distance between features allowed for features to be merged" 28 label="Maximum distance between features allowed for features to be merged"
28 help="That is, overlapping and/or book-ended features are merged. (-d)"/> 29 help="That is, overlapping and/or book-ended features are merged. (-d)"/>
29 <expand macro="print_header" /> 30 <expand macro="print_header" />
30 <expand macro="choose_columns" /> 31 <expand macro="c_and_o_argument" />
31 <expand macro="choose_operations">
32 <expand macro="math_options" />
33 <expand macro="additional_math_options" />
34 </expand>
35 </inputs> 32 </inputs>
36 <outputs> 33 <outputs>
37 <data format="bed" name="output" metadata_source="input" label="Merged ${input.name}"/> 34 <data format="bed" name="output" metadata_source="input" label="Merged ${input.name}"/>
38 </outputs> 35 </outputs>
39 <tests> 36 <tests>
53 </test> 50 </test>
54 <test> 51 <test>
55 <param name="input" value="mergedBed4.bed" ftype="bed" /> 52 <param name="input" value="mergedBed4.bed" ftype="bed" />
56 <param name="distance" value="1000" /> 53 <param name="distance" value="1000" />
57 <output name="output" file="mergedBed_result4.bed" ftype="bed" /> 54 <output name="output" file="mergedBed_result4.bed" ftype="bed" />
55 </test>
56 <test>
57 <param name="input" value="mergedBed4.bed" ftype="bed" />
58 <param name="distance" value="1000" />
59 <repeat name="c_and_o_argument_repeat">
60 <param name="col" value="1"/>
61 <param name="operation" value="count"/>
62 </repeat>
63 <output name="output" file="mergedBed_result5.bed" ftype="bed" />
58 </test> 64 </test>
59 </tests> 65 </tests>
60 <help> 66 <help>
61 <![CDATA[ 67 <![CDATA[
62 **What it does** 68 **What it does**
90 chr1 100 500 96 chr1 100 500
91 chr1 501 1000 97 chr1 501 1000
92 98
93 99
94 ========================================================================== 100 ==========================================================================
95 *-s* Enforcing "strandedness" 101 *-s* Enforcing "strandedness"
96 ========================================================================== 102 ==========================================================================
97 The ``-s`` option will only merge intervals that are overlapping/bookended 103 The ``-s`` option will only merge intervals that are overlapping/bookended
98 *and* are on the same strand. 104 *and* are on the same strand.
99 105
100 :: 106 ::
107 113
108 $ bedtools merge -i A.bed -s 114 $ bedtools merge -i A.bed -s
109 chr1 100 250 + 115 chr1 100 250 +
110 chr1 501 1000 + 116 chr1 501 1000 +
111 chr1 250 500 - 117 chr1 250 500 -
112
113
114 ==========================================================================
115 *-n* Reporting the number of features that were merged
116 ==========================================================================
117 The -n option will report the number of features that were combined from the
118 original file in order to make the newly merged feature. If a feature in the
119 original file was not merged with any other features, a "1" is reported.
120
121 ::
122
123 $ cat A.bed
124 chr1 100 200
125 chr1 180 250
126 chr1 250 500
127 chr1 501 1000
128
129 $ bedtools merge -i A.bed -n
130 chr1 100 500 3
131 chr1 501 1000 1
132 118
133 119
134 ========================================================================== 120 ==========================================================================
135 *-d* Controlling how close two features must be in order to merge 121 *-d* Controlling how close two features must be in order to merge
136 ========================================================================== 122 ==========================================================================
152 138
153 $ bedtools merge -i A.bed -d 1000 139 $ bedtools merge -i A.bed -d 1000
154 chr1 100 200 1000 140 chr1 100 200 1000
155 141
156 142
157 =============================================================
158 *-nms* Reporting the names of the features that were merged
159 =============================================================
160 Occasionally, one might like to know that names of the features that were
161 merged into a new feature. The ``-nms`` option will add an extra column to the
162 ``merge`` output which lists (separated by semicolons) the names of the
163 merged features.
164
165 ::
166
167 $ cat A.bed
168 chr1 100 200 A1
169 chr1 150 300 A2
170 chr1 250 500 A3
171
172 $ bedtools merge -i A.bed -nms
173 chr1 100 500 A1,A2,A3
174
175
176 ===============================================================
177 *-scores* Reporting the scores of the features that were merged
178 ===============================================================
179 Similarly, we might like to know that scores of the features that were
180 merged into a new feature. Enter the ``-scores`` option. One can specify
181 how the scores from each overlapping interval should be reported.
182
183 ::
184
185 $ cat A.bed
186 chr1 100 200 A1 1
187 chr1 150 300 A2 2
188 chr1 250 500 A3 3
189
190 $ bedtools merge -i A.bed -scores mean
191 chr1 100 500 2
192
193 $ bedtools merge -i A.bed -scores max
194 chr1 100 500 3
195
196 $ bedtools merge -i A.bed -scores collapse
197 chr1 100 500 1,2,3
198
199 @REFERENCES@ 143 @REFERENCES@
200 ]]> 144 ]]>
201 </help> 145 </help>
202 <expand macro="citations" /> 146 <expand macro="citations" />
203 </tool> 147 </tool>