Mercurial > repos > iuc > bedtools
annotate mergeBed.xml @ 48:2f457890d8c8 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit fc3616bd1463afef9681cd7c431ac29f79e37e74
| author | iuc |
|---|---|
| date | Tue, 11 Dec 2018 13:59:34 -0500 |
| parents | d279800f4ff9 |
| children | df28283b3778 |
| rev | line source |
|---|---|
|
48
2f457890d8c8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit fc3616bd1463afef9681cd7c431ac29f79e37e74
iuc
parents:
42
diff
changeset
|
1 <tool id="bedtools_mergebed" name="bedtools MergeBED" version="@WRAPPER_VERSION@"> |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
16
diff
changeset
|
2 <description>combine overlapping/nearby intervals into a single interval</description> |
| 8 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements" /> | |
| 7 <expand macro="stdio" /> | |
| 8 <command> | |
| 9 <![CDATA[ | |
| 10 mergeBed | |
| 11 -i "${input}" | |
| 12 $strand | |
| 13 -d $distance | |
| 14 $header | |
| 15 @C_AND_O_ARGUMENT@ | |
| 16 > "${output}" | |
| 17 ]]> | |
| 18 </command> | |
| 19 <inputs> | |
|
42
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
26
diff
changeset
|
20 <param name="input" format="bam,@STD_BEDTOOLS_INPUTS@" type="data" label="Sort the following BAM/@STD_BEDTOOLS_INPUT_LABEL@ file"/> |
| 8 | 21 <param name="strand" type="select" label="Calculation based on strandedness?"> |
| 22 <option value="" selected="True">Overlaps on either strand</option> | |
| 23 <option value="-s">Force strandedness. That is, only merge features that are the same strand.</option> | |
| 24 <option value="-S +">Force merge for forward strand only.</option> | |
| 25 <option value="-S -">Force merge for reverse strand only.</option> | |
| 26 </param> | |
| 27 <param name="distance" type="integer" value="0" | |
| 28 label="Maximum distance between features allowed for features to be merged" | |
| 29 help="That is, overlapping and/or book-ended features are merged. (-d)"/> | |
| 30 <expand macro="print_header" /> | |
|
16
e30113df8cf6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 7b8a4ffc823f4dab194f1c629b7e83277dbe4337
iuc
parents:
15
diff
changeset
|
31 <expand macro="c_and_o_argument"> |
|
e30113df8cf6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 7b8a4ffc823f4dab194f1c629b7e83277dbe4337
iuc
parents:
15
diff
changeset
|
32 <param name="col" type="data_column" data_ref="input" label="Specify the column(s) that should be summarized" help="(-c)" /> |
|
e30113df8cf6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 7b8a4ffc823f4dab194f1c629b7e83277dbe4337
iuc
parents:
15
diff
changeset
|
33 </expand> |
| 8 | 34 </inputs> |
| 35 <outputs> | |
| 36 <data format="bed" name="output" metadata_source="input" label="Merged ${input.name}"/> | |
| 37 </outputs> | |
| 38 <tests> | |
| 39 <test> | |
| 40 <param name="input" value="mergedBed1.bed" ftype="bed" /> | |
| 41 <output name="output" file="mergedBed_result1.bed" ftype="bed" /> | |
| 42 </test> | |
| 43 <test> | |
| 44 <param name="input" value="mergedBed2.bed" ftype="bed" /> | |
| 45 <param name="strandedness" value="-s" /> | |
| 46 <output name="output" file="mergedBed_result2.bed" ftype="bed" /> | |
| 47 </test> | |
| 48 <test> | |
| 49 <param name="input" value="mergedBed3.bed" ftype="bed" /> | |
| 50 <param name="report_number" value="-n" /> | |
| 51 <output name="output" file="mergedBed_result3.bed" ftype="bed" /> | |
| 52 </test> | |
| 53 <test> | |
| 54 <param name="input" value="mergedBed4.bed" ftype="bed" /> | |
| 55 <param name="distance" value="1000" /> | |
| 56 <output name="output" file="mergedBed_result4.bed" ftype="bed" /> | |
| 57 </test> | |
| 58 <test> | |
| 59 <param name="input" value="mergedBed4.bed" ftype="bed" /> | |
| 60 <param name="distance" value="1000" /> | |
| 61 <repeat name="c_and_o_argument_repeat"> | |
| 62 <param name="col" value="1"/> | |
| 63 <param name="operation" value="count"/> | |
| 64 </repeat> | |
| 65 <output name="output" file="mergedBed_result5.bed" ftype="bed" /> | |
| 66 </test> | |
| 67 </tests> | |
| 68 <help> | |
| 69 <![CDATA[ | |
| 70 **What it does** | |
| 71 | |
| 72 bedtools merge combines overlapping or "book-ended" features in an interval file into a single feature which spans all of the combined features. | |
| 73 | |
| 74 | |
| 75 .. image:: $PATH_TO_IMAGES/merge-glyph.png | |
| 76 | |
| 77 | |
| 78 .. class:: warningmark | |
| 79 | |
| 80 bedtools merge requires that you presort your data by chromosome and then by start position. | |
| 81 | |
| 82 | |
| 83 ========================================================================== | |
| 84 Default behavior | |
| 85 ========================================================================== | |
| 86 By default, ``bedtools merge`` combines overlapping (by at least 1 bp) and/or | |
| 87 bookended intervals into a single, "flattened" or "merged" interval. | |
| 88 | |
| 89 :: | |
| 90 | |
| 91 $ cat A.bed | |
| 92 chr1 100 200 | |
| 93 chr1 180 250 | |
| 94 chr1 250 500 | |
| 95 chr1 501 1000 | |
| 96 | |
| 97 $ bedtools merge -i A.bed | |
| 98 chr1 100 500 | |
| 99 chr1 501 1000 | |
| 100 | |
| 101 | |
| 102 ========================================================================== | |
| 103 *-s* Enforcing "strandedness" | |
| 104 ========================================================================== | |
| 105 The ``-s`` option will only merge intervals that are overlapping/bookended | |
| 106 *and* are on the same strand. | |
| 107 | |
| 108 :: | |
| 109 | |
| 110 $ cat A.bed | |
| 111 chr1 100 200 a1 1 + | |
| 112 chr1 180 250 a2 2 + | |
| 113 chr1 250 500 a3 3 - | |
| 114 chr1 501 1000 a4 4 + | |
| 115 | |
| 116 $ bedtools merge -i A.bed -s | |
| 117 chr1 100 250 + | |
| 118 chr1 501 1000 + | |
| 119 chr1 250 500 - | |
| 120 | |
| 121 | |
| 122 ========================================================================== | |
|
26
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
123 *-d* Controlling how close two features must be in order to merge |
| 8 | 124 ========================================================================== |
|
26
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
125 By default, only overlapping or book-ended features are combined into a new |
|
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
126 feature. However, one can force ``merge`` to combine more distant features |
|
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
127 with the ``-d`` option. For example, were one to set ``-d`` to 1000, any |
|
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
128 features that overlap or are within 1000 base pairs of one another will be |
| 8 | 129 combined. |
| 130 | |
| 131 :: | |
| 132 | |
| 133 $ cat A.bed | |
| 134 chr1 100 200 | |
| 135 chr1 501 1000 | |
|
26
c0fbce5dc84a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
17
diff
changeset
|
136 |
| 8 | 137 $ bedtools merge -i A.bed |
| 138 chr1 100 200 | |
| 139 chr1 501 1000 | |
| 140 | |
| 141 $ bedtools merge -i A.bed -d 1000 | |
| 142 chr1 100 200 1000 | |
| 143 | |
| 144 | |
| 145 @REFERENCES@ | |
| 146 ]]> | |
| 147 </help> | |
| 148 <expand macro="citations" /> | |
| 149 </tool> |
