Mercurial > repos > iuc > bedtools
annotate mergeBed.xml @ 47:2892111d91f8 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
author | iuc |
---|---|
date | Fri, 21 Feb 2025 21:40:09 +0000 |
parents | 589e7e57fd6d |
children |
rev | line source |
---|---|
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
1 <tool id="bedtools_mergebed" name="bedtools MergeBED" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@"> |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
3
diff
changeset
|
2 <description>combine overlapping/nearby intervals into a single interval</description> |
0 | 3 <macros> |
4 <import>macros.xml</import> | |
5 </macros> | |
41
7ab85ac5f64b
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 500a03281ea704abc7a16d9af63d67dbdcc5cd0b"
iuc
parents:
39
diff
changeset
|
6 <expand macro="bio_tools" /> |
0 | 7 <expand macro="requirements" /> |
8 <expand macro="stdio" /> | |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
9 <command><![CDATA[ |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
10 mergeBed |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
11 -i '${input}' |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
12 $strand |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
13 -d $distance |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
14 $header |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
15 @C_AND_O_ARGUMENT@ |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
16 #if $input.ext == "bam" |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
17 -bed |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
18 #end if |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
19 > '${output}' |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
20 ]]></command> |
0 | 21 <inputs> |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
22 <param name="input" argument="-i" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="Merge the following BAM/@STD_BEDTOOLS_INPUT_LABEL@ file"/> |
1 | 23 <param name="strand" type="select" label="Calculation based on strandedness?"> |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
24 <option value="" selected="true">Overlaps on either strand</option> |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
25 <option value="-s">Force strandedness. That is, only merge features that are the same strand (-s)</option> |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
26 <option value="-S +">Force merge for forward strand only (-S +)</option> |
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
27 <option value="-S -">Force merge for reverse strand only (-S -)</option> |
1 | 28 </param> |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
29 <param name="distance" argument="-d" type="integer" value="0" |
1 | 30 label="Maximum distance between features allowed for features to be merged" |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
31 help="Default 0: overlapping and/or book-ended features are merged. Note: negative values enforce the number of b.p. required for overlap."/> |
1 | 32 <expand macro="print_header" /> |
3 | 33 <expand macro="c_and_o_argument"> |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
34 <param name="col" argument="-c" type="data_column" data_ref="input" label="Specify the column(s) that should be summarized" /> |
3 | 35 </expand> |
0 | 36 </inputs> |
37 <outputs> | |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
38 <data name="output" format="bed" metadata_source="input" label="Merged ${input.name}"/> |
0 | 39 </outputs> |
40 <tests> | |
41 <test> | |
1 | 42 <param name="input" value="mergedBed1.bed" ftype="bed" /> |
43 <output name="output" file="mergedBed_result1.bed" ftype="bed" /> | |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
44 <assert_command> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
45 <not_has_text text="-s "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
46 <not_has_text text="-S "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
47 <has_text text="-d 0"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
48 <not_has_text text="-c "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
49 <not_has_text text="-o "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
50 </assert_command> |
0 | 51 </test> |
52 <test> | |
1 | 53 <param name="input" value="mergedBed2.bed" ftype="bed" /> |
44
589e7e57fd6d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 03a91f6c42c75dc36d09505c2e6a2236178e4695
iuc
parents:
41
diff
changeset
|
54 <param name="strand" value="-s" /> |
1 | 55 <output name="output" file="mergedBed_result2.bed" ftype="bed" /> |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
56 <assert_command> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
57 <has_text text="-s "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
58 <not_has_text text="-S "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
59 <has_text text="-d 0"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
60 <not_has_text text="-c "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
61 <not_has_text text="-o "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
62 </assert_command> |
0 | 63 </test> |
64 <test> | |
1 | 65 <param name="input" value="mergedBed3.bed" ftype="bed" /> |
66 <output name="output" file="mergedBed_result3.bed" ftype="bed" /> | |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
67 <assert_command> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
68 <not_has_text text="-s "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
69 <not_has_text text="-S "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
70 <has_text text="-d 0"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
71 <not_has_text text="-c "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
72 <not_has_text text="-o "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
73 </assert_command> |
0 | 74 </test> |
75 <test> | |
1 | 76 <param name="input" value="mergedBed4.bed" ftype="bed" /> |
0 | 77 <param name="distance" value="1000" /> |
1 | 78 <output name="output" file="mergedBed_result4.bed" ftype="bed" /> |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
79 <assert_command> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
80 <not_has_text text="-s "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
81 <not_has_text text="-S "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
82 <has_text text="-d 1000"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
83 <not_has_text text="-c "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
84 <not_has_text text="-o "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
85 </assert_command> |
0 | 86 </test> |
2 | 87 <test> |
88 <param name="input" value="mergedBed4.bed" ftype="bed" /> | |
89 <param name="distance" value="1000" /> | |
90 <repeat name="c_and_o_argument_repeat"> | |
91 <param name="col" value="1"/> | |
92 <param name="operation" value="count"/> | |
93 </repeat> | |
94 <output name="output" file="mergedBed_result5.bed" ftype="bed" /> | |
47
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
95 <assert_command> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
96 <not_has_text text="-s "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
97 <not_has_text text="-S "/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
98 <has_text text="-d 1000"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
99 <has_text text="-c 1"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
100 <has_text text="-o count"/> |
2892111d91f8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 73ebd55430874a3c1483b6dd6cce0482175482f9
iuc
parents:
44
diff
changeset
|
101 </assert_command> |
2 | 102 </test> |
0 | 103 </tests> |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
104 <help><![CDATA[ |
0 | 105 **What it does** |
106 | |
107 bedtools merge combines overlapping or "book-ended" features in an interval file into a single feature which spans all of the combined features. | |
108 | |
109 | |
110 .. image:: $PATH_TO_IMAGES/merge-glyph.png | |
111 | |
112 | |
113 .. class:: warningmark | |
114 | |
115 bedtools merge requires that you presort your data by chromosome and then by start position. | |
116 | |
117 | |
118 ========================================================================== | |
119 Default behavior | |
120 ========================================================================== | |
121 By default, ``bedtools merge`` combines overlapping (by at least 1 bp) and/or | |
122 bookended intervals into a single, "flattened" or "merged" interval. | |
123 | |
124 :: | |
125 | |
126 $ cat A.bed | |
127 chr1 100 200 | |
128 chr1 180 250 | |
129 chr1 250 500 | |
130 chr1 501 1000 | |
131 | |
132 $ bedtools merge -i A.bed | |
133 chr1 100 500 | |
134 chr1 501 1000 | |
135 | |
136 | |
137 ========================================================================== | |
2 | 138 *-s* Enforcing "strandedness" |
0 | 139 ========================================================================== |
140 The ``-s`` option will only merge intervals that are overlapping/bookended | |
141 *and* are on the same strand. | |
142 | |
143 :: | |
144 | |
145 $ cat A.bed | |
146 chr1 100 200 a1 1 + | |
147 chr1 180 250 a2 2 + | |
148 chr1 250 500 a3 3 - | |
149 chr1 501 1000 a4 4 + | |
150 | |
151 $ bedtools merge -i A.bed -s | |
152 chr1 100 250 + | |
153 chr1 501 1000 + | |
154 chr1 250 500 - | |
155 | |
156 | |
157 ========================================================================== | |
11
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
158 *-d* Controlling how close two features must be in order to merge |
0 | 159 ========================================================================== |
11
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
160 By default, only overlapping or book-ended features are combined into a new |
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
161 feature. However, one can force ``merge`` to combine more distant features |
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
162 with the ``-d`` option. For example, were one to set ``-d`` to 1000, any |
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
163 features that overlap or are within 1000 base pairs of one another will be |
0 | 164 combined. |
165 | |
166 :: | |
167 | |
168 $ cat A.bed | |
169 chr1 100 200 | |
170 chr1 501 1000 | |
11
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
4
diff
changeset
|
171 |
0 | 172 $ bedtools merge -i A.bed |
173 chr1 100 200 | |
174 chr1 501 1000 | |
175 | |
176 $ bedtools merge -i A.bed -d 1000 | |
177 chr1 100 200 1000 | |
178 | |
179 | |
180 @REFERENCES@ | |
34
dde39ba9c031
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
iuc
parents:
32
diff
changeset
|
181 ]]></help> |
0 | 182 <expand macro="citations" /> |
183 </tool> |