annotate mergeBed.xml @ 12:7b3aaff0d78c draft

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