Mercurial > repos > iuc > bedtools
comparison intersectBed.xml @ 34:dde39ba9c031 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
author | iuc |
---|---|
date | Mon, 29 Apr 2019 05:55:48 -0400 |
parents | 4f7a5ccd2ae9 |
children | b28e0cfa7ba1 |
comparison
equal
deleted
inserted
replaced
33:87ee588b3d45 | 34:dde39ba9c031 |
---|---|
1 <tool id="bedtools_intersectbed" name="bedtools Intersect intervals" version="@WRAPPER_VERSION@"> | 1 <tool id="bedtools_intersectbed" name="bedtools Intersect intervals" version="@TOOL_VERSION@+galaxy1"> |
2 <description>find overlapping intervals in various ways</description> | 2 <description>find overlapping intervals in various ways</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"> |
7 <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement> | 7 <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement> |
8 </expand> | 8 </expand> |
9 <expand macro="stdio" /> | 9 <expand macro="stdio" /> |
10 <command><![CDATA[ | 10 <command><![CDATA[ |
11 #import re | 11 #import re |
12 #set modes = ' '.join( str($overlap_mode).split(',') ) | 12 #set modes = ' '.join(str($overlap_mode).split(',')) |
13 | 13 |
14 #if $modes == "None": | 14 #if $modes == "None": |
15 #set modes = '' | 15 #set modes = '' |
16 #end if | |
17 | |
18 bedtools intersect | |
19 #if $inputA.is_of_type('bam'): | |
20 -abam '${inputA}' | |
21 #else: | |
22 -a '${inputA}' | |
23 #end if | |
24 | |
25 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': | |
26 -b '$reduce_or_iterate.inputB' | |
27 #else: | |
28 -b | |
29 #for $file in $reduce_or_iterate.inputB | |
30 '$file' | |
31 #end for | |
32 | |
33 #if $reduce_or_iterate.names: | |
34 #set namesB = "' '".join([re.sub('[^\s\w\-]', '_', str($file.element_identifier)) for $file in $reduce_or_iterate.inputB]) | |
35 -names '$namesB' | |
36 #end if | |
37 #end if | |
38 $split | |
39 $strand | |
40 #if $fraction_cond.fraction_select == "specify": | |
41 #if str($fraction_cond.overlap) | |
42 -f $fraction_cond.overlap | |
43 #end if | |
44 $fraction_cond.reciprocal_cond.reciprocal | |
45 #if str($fraction_cond.reciprocal_cond.reciprocal) == '': | |
46 #if str($fraction_cond.reciprocal_cond.overlapB): | |
47 -F $fraction_cond.reciprocal_cond.overlapB | |
16 #end if | 48 #end if |
17 | 49 $fraction_cond.reciprocal_cond.disjoint |
18 bedtools intersect | 50 #end if |
19 #if $inputA.is_of_type('bam'): | 51 #end if |
20 -abam '${inputA}' | 52 $invert |
21 #else: | 53 $once |
22 -a '${inputA}' | 54 $header |
23 #end if | 55 $modes |
24 | 56 $sorted |
25 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': | 57 #if str($sorted) != '': |
26 -b '$reduce_or_iterate.inputB' | 58 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'): |
27 #else: | 59 -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5) |
28 #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) | 60 #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'): |
29 -b '$inputBs' | 61 -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5) |
30 #if $reduce_or_iterate.names: | 62 #end if |
31 #set namesB = "' '".join([re.sub('[^\s\w\-]', '_', str($file.element_identifier)) for $file in $reduce_or_iterate.inputB]) | 63 #end if |
32 -names '$namesB' | 64 $bed |
33 #end if | 65 $count |
34 #end if | 66 > '${output}' |
35 $split | 67 ]]></command> |
36 $strand | |
37 #if $fraction_cond.fraction_select == "specify": | |
38 -f '${fraction_cond.overlap}' | |
39 $fraction_cond.reciprocal_cond.reciprocal | |
40 #if str($fraction_cond.reciprocal_cond.reciprocal) == '': | |
41 -F '${fraction_cond.reciprocal_cond.overlapB}' | |
42 $fraction_cond.reciprocal_cond.disjoint | |
43 #end if | |
44 #end if | |
45 $invert | |
46 $once | |
47 $header | |
48 $modes | |
49 $sorted | |
50 #if str($sorted) != '': | |
51 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'): | |
52 -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5) | |
53 #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'): | |
54 -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5) | |
55 #end if | |
56 #end if | |
57 $bed | |
58 $count | |
59 > '${output}' | |
60 ]]> | |
61 </command> | |
62 <inputs> | 68 <inputs> |
63 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputA" type="data" label="File A to intersect with B" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format" /> | 69 <param name="inputA" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File A to intersect with B" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format" /> |
64 <conditional name="reduce_or_iterate"> | 70 <conditional name="reduce_or_iterate"> |
65 <param name='reduce_or_iterate_selector' type='select' label='Combined or separate output files'> | 71 <param name="reduce_or_iterate_selector" type="select" label="Combined or separate output files"> |
66 <option value='iterate' selected='true'>One output file per 'input B' file</option> | 72 <option value="iterate" selected="true">One output file per 'input B' file</option> |
67 <option value='reduce'>Single output containing intersections of any 'input B' lines with A </option> | 73 <option value="reduce">Single output containing intersections of any 'input B' lines with A</option> |
68 </param> | 74 </param> |
69 <when value='iterate'> | 75 <when value="iterate"> |
70 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" | 76 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" |
77 label="File B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> | |
78 </when> | |
79 <when value="reduce"> | |
80 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" multiple="true" | |
71 label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> | 81 label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> |
72 </when> | 82 <param argument="-names" type="boolean" truevalue="yes" falsevalue="no" label="Add data set names instead of indices" /> |
73 <when value='reduce'> | |
74 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" multiple="true" | |
75 label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> | |
76 <param argument="names" type="boolean" truevalue="yes" falsevalue="no" label="add data set names instead of indices" help=""/> | |
77 </when> | 83 </when> |
78 </conditional> | 84 </conditional> |
79 <expand macro="strand2" /> | 85 <expand macro="strand2" /> |
80 <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?"> | 86 <param name="overlap_mode" type="select" multiple="true" label="What should be written to the output file?"> |
81 <option value="-wa">Write the original entry in A for each overlap (-wa)</option> | 87 <option value="-wa">Write the original entry in A for each overlap (-wa)</option> |
82 <option value="-wb">Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by the fraction- and reciprocal option (-wb)</option> | 88 <option value="-wb">Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by the fraction- and reciprocal option (-wb)</option> |
83 <option value="-wo">Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by the fraction- and reciprocal option (-wo)</option> | 89 <option value="-wo">Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by the fraction- and reciprocal option (-wo)</option> |
84 <option value="-wao">Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by the fraction- and reciprocal option (-wao)</option> | 90 <option value="-wao">Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by the fraction- and reciprocal option (-wao)</option> |
85 <option value="-loj">Perform a "left outer join". That is, for each feature in A report each overlap with B. If no overlaps are found, report a NULL feature for B (-loj)</option> | 91 <option value="-loj">Perform a "left outer join". That is, for each feature in A report each overlap with B. If no overlaps are found, report a NULL feature for B (-loj)</option> |
86 </param> | 92 </param> |
87 | 93 |
88 <expand macro="split" /> | 94 <expand macro="split" /> |
89 <conditional name="fraction_cond"> | 95 <conditional name="fraction_cond"> |
90 <param name='fraction_select' type='select' label='Required overlap'> | 96 <param name="fraction_select" type="select" label="Required overlap"> |
91 <option value='default' selected='true'>Default: 1bp</option> | 97 <option value="default" selected="true">Default: 1bp</option> |
92 <option value='specify'>Specify minimum overlap(s)</option> | 98 <option value="specify">Specify minimum overlap(s)</option> |
93 </param> | 99 </param> |
94 <when value="default"/> | 100 <when value="default"/> |
95 <when value='specify'> | 101 <when value="specify"> |
96 <expand macro="overlap" /> | 102 <expand macro="overlap" /> |
97 <conditional name="reciprocal_cond"> | 103 <conditional name="reciprocal_cond"> |
98 <expand macro="reciprocal" /> | 104 <expand macro="reciprocal" /> |
99 <when value="-r"/> | 105 <when value="-r"/> |
100 <when value=""> | 106 <when value=""> |
101 <expand macro="overlapB" /> | 107 <expand macro="overlap" name="overlapB" argument="-F" fracof="B"/> |
102 <param name="disjoint" argument="-e" type="boolean" checked="false" truevalue="-e" falsevalue="" | 108 <param name="disjoint" argument="-e" type="boolean" truevalue="-e" falsevalue="" checked="false" |
103 label="Require that the fraction of overlap is fulfilled for A OR B." help="If enabled, then for -f 0.90 and -F 0.10 this requires that either 90% of A is covered OR 10% of B is covered, otherwise, both fractions would have to be satisfied."/> | 109 label="Require that the fraction of overlap is fulfilled for A OR B." help="If enabled, then for -f 0.90 and -F 0.10 this requires that either 90% of A is covered OR 10% of B is covered, otherwise, both fractions would have to be satisfied."/> |
104 </when> | 110 </when> |
105 </conditional> | 111 </conditional> |
106 </when> | 112 </when> |
107 </conditional> | 113 </conditional> |
108 <!-- -v --> | 114 <!-- -v --> |
109 <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" | 115 <param name="invert" argument="-v" type="boolean" truevalue="-v" falsevalue="" checked="false" |
110 label="Report only those alignments that **do not** overlap with file(s) B" | 116 label="Report only those alignments that **do not** overlap with file(s) B" /> |
111 help="(-v)"/> | |
112 <!-- -u --> | 117 <!-- -u --> |
113 <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue="" | 118 <param name="once" argument="-u" type="boolean" truevalue="-u" falsevalue="" checked="false" |
114 label="Write the original A entry _once_ if _any_ overlaps found in B." | 119 label="Write the original A entry _once_ if _any_ overlaps found in B." |
115 help="Just report the fact >=1 hit was found. (-u)" /> | 120 help="Just report the fact >=1 hit was found" /> |
116 <!-- -c --> | 121 <!-- -c --> |
117 <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue="" | 122 <param name="count" argument="-c" type="boolean" truevalue="-c" falsevalue="" checked="false" |
118 label="For each entry in A, report the number of overlaps with B." | 123 label="For each entry in A, report the number of overlaps with B." |
119 help="Reports 0 for A entries that have no overlap with B. (-c)" /> | 124 help="Reports 0 for A entries that have no overlap with B" /> |
120 <!-- -bed --> | 125 <!-- -bed --> |
121 <param argument="-bed" type="boolean" checked="false" truevalue="-bed" falsevalue="" | 126 <param argument="-bed" type="boolean" truevalue="-bed" falsevalue="" checked="false" |
122 label="When using BAM input (-abam), write output as BED instead of BAM." /> | 127 label="When using BAM input (-abam), write output as BED instead of BAM." /> |
123 <!-- -sorted -g --> | 128 <!-- -sorted -g --> |
124 <param argument="-sorted" type="boolean" checked="false" truevalue="-sorted" falsevalue="" | 129 <param argument="-sorted" type="boolean" truevalue="-sorted" falsevalue="" checked="false" |
125 label="For coordinate sorted input file the more efficient sweeping algorithm is enabled." /> | 130 label="For coordinate sorted input file the more efficient sweeping algorithm is enabled." /> |
126 <expand macro="print_header" /> | 131 <expand macro="print_header" /> |
127 </inputs> | 132 </inputs> |
128 <outputs> | 133 <outputs> |
129 <data format_source="inputA" name="output" metadata_source="inputA"> | 134 <data name="output" format_source="inputA" metadata_source="inputA"> |
130 <change_format> | 135 <change_format> |
131 <when input="bed" value="-bed" format="bed" /> | 136 <when input="bed" value="-bed" format="bed" /> |
132 </change_format> | 137 </change_format> |
133 </data> | 138 </data> |
134 </outputs> | 139 </outputs> |
135 <tests> | 140 <tests> |
136 <!-- test adapted from the tutorial https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html --> | 141 <!-- test adapted from the tutorial https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html --> |
137 <test> | 142 <test> |
138 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 143 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
139 <conditional name="reduce_or_iterate"> | 144 <conditional name="reduce_or_iterate"> |
140 <param name='reduce_or_iterate_selector' value="iterate" /> | 145 <param name="reduce_or_iterate_selector" value="iterate" /> |
141 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 146 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
142 </conditional> | 147 </conditional> |
143 <output name="output" file="intersect-default.bed" ftype="bed" /> | 148 <output name="output" file="intersect-default.bed" ftype="bed" /> |
144 </test> | 149 </test> |
145 <test> | 150 <test> |
146 <param name="inputA" value="intersect-query.bed" ftype="bed" /> | 151 <param name="inputA" value="intersect-query.bed" ftype="bed" /> |
147 <conditional name="reduce_or_iterate"> | 152 <conditional name="reduce_or_iterate"> |
148 <param name='reduce_or_iterate_selector' value="reduce" /> | 153 <param name="reduce_or_iterate_selector" value="reduce" /> |
149 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 154 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
150 </conditional> | 155 </conditional> |
151 <output name="output" file="intersect-multiple.bed" ftype="bed" /> | 156 <output name="output" file="intersect-multiple.bed" ftype="bed" /> |
152 </test> | 157 </test> |
153 <test> | 158 <test> |
154 <param name="inputA" value="intersect-query.bed" ftype="bed" /> | 159 <param name="inputA" value="intersect-query.bed" ftype="bed" /> |
155 <conditional name="reduce_or_iterate"> | 160 <conditional name="reduce_or_iterate"> |
156 <param name='reduce_or_iterate_selector' value="reduce" /> | 161 <param name="reduce_or_iterate_selector" value="reduce" /> |
157 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 162 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
158 </conditional> | 163 </conditional> |
159 <param name="overlap_mode" value="-wa,-wb" /> | 164 <param name="overlap_mode" value="-wa,-wb" /> |
160 <param name="sorted" value="-sorted" /> | 165 <param name="sorted" value="-sorted" /> |
161 <output name="output" file="intersect-multiple-wa-wb.bed" ftype="bed" /> | 166 <output name="output" file="intersect-multiple-wa-wb.bed" ftype="bed" /> |
162 </test> | 167 </test> |
163 <test> | 168 <test> |
164 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 169 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
165 <param name="inputA" value="intersect-query.bed" ftype="bed" /> | 170 <param name="inputA" value="intersect-query.bed" ftype="bed" /> |
166 <conditional name="reduce_or_iterate"> | 171 <conditional name="reduce_or_iterate"> |
167 <param name='reduce_or_iterate_selector' value="reduce" /> | 172 <param name="reduce_or_iterate_selector" value="reduce" /> |
168 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 173 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
169 <param name="names" value="yes" /> | 174 <param name="names" value="yes" /> |
170 </conditional> | 175 </conditional> |
171 <param name="overlap_mode" value="-wa,-wb" /> | 176 <param name="overlap_mode" value="-wa,-wb" /> |
172 <param name="sorted" value="-sorted" /> | 177 <param name="sorted" value="-sorted" /> |
173 <output name="output" file="intersect-multiple-wa-wb-wnames.bed" ftype="bed" /> | 178 <output name="output" file="intersect-multiple-wa-wb-wnames.bed" ftype="bed" /> |
174 </test> | 179 </test> |
175 <test> | 180 <test> |
176 <param name="inputA" value="intersect-query.bed" ftype="bed" /> | 181 <param name="inputA" value="intersect-query.bed" ftype="bed" /> |
177 <conditional name="reduce_or_iterate"> | 182 <conditional name="reduce_or_iterate"> |
178 <param name='reduce_or_iterate_selector' value="reduce" /> | 183 <param name="reduce_or_iterate_selector" value="reduce" /> |
179 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 184 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
180 </conditional> | 185 </conditional> |
181 <param name="invert" value="-v" /> | 186 <param name="invert" value="-v" /> |
182 <param name="sorted" value="-sorted" /> | 187 <param name="sorted" value="-sorted" /> |
183 <output name="output" file="intersect-multiple-invert.bed" ftype="bed" /> | 188 <output name="output" file="intersect-multiple-invert.bed" ftype="bed" /> |
184 </test> | 189 </test> |
185 <test> | 190 <test> |
186 <param name="inputA" value="intersect-query.bed" ftype="bed" /> | 191 <param name="inputA" value="intersect-query.bed" ftype="bed" /> |
187 <conditional name="reduce_or_iterate"> | 192 <conditional name="reduce_or_iterate"> |
188 <param name='reduce_or_iterate_selector' value="reduce" /> | 193 <param name="reduce_or_iterate_selector" value="reduce" /> |
189 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> | 194 <param name="inputB" value="intersect-d1.bed,intersect-d2.bed,intersect-d3.bed" ftype="bed" /> |
190 </conditional> | 195 </conditional> |
191 <param name="overlap_mode" value="-wa,-wb" /> | 196 <param name="overlap_mode" value="-wa,-wb" /> |
192 <conditional name="fraction_cond"> | 197 <conditional name="fraction_cond"> |
193 <param name='fraction_select' value='specify'/> | 198 <param name="fraction_select" value="specify"/> |
194 <param name="overlap" value="1.0" /> | 199 <param name="overlap" value="1.0" /> |
195 </conditional> | 200 </conditional> |
196 <param name="sorted" value="-sorted" /> | 201 <param name="sorted" value="-sorted" /> |
197 <output name="output" file="intersect-multiple-fracA.bed" ftype="bed" /> | 202 <output name="output" file="intersect-multiple-fracA.bed" ftype="bed" /> |
198 </test> | 203 </test> |
199 <test> | 204 <test> |
200 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 205 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
201 <conditional name="reduce_or_iterate"> | 206 <conditional name="reduce_or_iterate"> |
202 <param name='reduce_or_iterate_selector' value="iterate" /> | 207 <param name="reduce_or_iterate_selector" value="iterate" /> |
203 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 208 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
204 </conditional> | 209 </conditional> |
205 <param name="overlap_mode" value="-wa" /> | 210 <param name="overlap_mode" value="-wa" /> |
206 <output name="output" file="intersect-wa.bed" ftype="bed" /> | 211 <output name="output" file="intersect-wa.bed" ftype="bed" /> |
207 </test> | 212 </test> |
208 <test> | 213 <test> |
209 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 214 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
210 <conditional name="reduce_or_iterate"> | 215 <conditional name="reduce_or_iterate"> |
211 <param name='reduce_or_iterate_selector' value="iterate" /> | 216 <param name="reduce_or_iterate_selector" value="iterate" /> |
212 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 217 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
213 </conditional> | 218 </conditional> |
214 <param name="overlap_mode" value="-wb" /> | 219 <param name="overlap_mode" value="-wb" /> |
215 <output name="output" file="intersect-wb.bed" ftype="bed" /> | 220 <output name="output" file="intersect-wb.bed" ftype="bed" /> |
216 </test> | 221 </test> |
217 <test> | 222 <test> |
218 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 223 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
219 <conditional name="reduce_or_iterate"> | 224 <conditional name="reduce_or_iterate"> |
220 <param name='reduce_or_iterate_selector' value="iterate" /> | 225 <param name="reduce_or_iterate_selector" value="iterate" /> |
221 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 226 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
222 </conditional> | 227 </conditional> |
223 <param name="overlap_mode" value="-wa,-wb" /> | 228 <param name="overlap_mode" value="-wa,-wb" /> |
224 <output name="output" file="intersect-wa-wb.bed" ftype="bed" /> | 229 <output name="output" file="intersect-wa-wb.bed" ftype="bed" /> |
225 </test> | 230 </test> |
226 <test> | 231 <test> |
227 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 232 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
228 <conditional name="reduce_or_iterate"> | 233 <conditional name="reduce_or_iterate"> |
229 <param name='reduce_or_iterate_selector' value="iterate" /> | 234 <param name="reduce_or_iterate_selector" value="iterate" /> |
230 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 235 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
231 </conditional> | 236 </conditional> |
232 <param name="overlap_mode" value="-loj" /> | 237 <param name="overlap_mode" value="-loj" /> |
233 <output name="output" file="intersect-loj.bed" ftype="bed" /> | 238 <output name="output" file="intersect-loj.bed" ftype="bed" /> |
234 </test> | 239 </test> |
235 <test> | 240 <test> |
236 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 241 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
237 <conditional name="reduce_or_iterate"> | 242 <conditional name="reduce_or_iterate"> |
238 <param name='reduce_or_iterate_selector' value="iterate" /> | 243 <param name="reduce_or_iterate_selector" value="iterate" /> |
239 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 244 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
240 </conditional> | 245 </conditional> |
241 <param name="overlap_mode" value="-wo" /> | 246 <param name="overlap_mode" value="-wo" /> |
242 <output name="output" file="intersect-wo.bed" ftype="bed" /> | 247 <output name="output" file="intersect-wo.bed" ftype="bed" /> |
243 </test> | 248 </test> |
244 <test> | 249 <test> |
245 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 250 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
246 <conditional name="reduce_or_iterate"> | 251 <conditional name="reduce_or_iterate"> |
247 <param name='reduce_or_iterate_selector' value="iterate" /> | 252 <param name="reduce_or_iterate_selector" value="iterate" /> |
248 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 253 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
249 </conditional> | 254 </conditional> |
250 <param name="overlap_mode" value="-wao" /> | 255 <param name="overlap_mode" value="-wao" /> |
251 <output name="output" file="intersect-wao.bed" ftype="bed" /> | 256 <output name="output" file="intersect-wao.bed" ftype="bed" /> |
252 </test> | 257 </test> |
253 <test> | 258 <test> |
254 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 259 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
255 <conditional name="reduce_or_iterate"> | 260 <conditional name="reduce_or_iterate"> |
256 <param name='reduce_or_iterate_selector' value="iterate" /> | 261 <param name="reduce_or_iterate_selector" value="iterate" /> |
257 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 262 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
258 </conditional> | 263 </conditional> |
259 <param name="once" value="-u" /> | 264 <param name="once" value="-u" /> |
260 <output name="output" file="intersect-unique.bed" ftype="bed" /> | 265 <output name="output" file="intersect-unique.bed" ftype="bed" /> |
261 </test> | 266 </test> |
262 <test> | 267 <test> |
263 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 268 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
264 <conditional name="reduce_or_iterate"> | 269 <conditional name="reduce_or_iterate"> |
265 <param name='reduce_or_iterate_selector' value="iterate" /> | 270 <param name="reduce_or_iterate_selector" value="iterate" /> |
266 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 271 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
267 </conditional> | 272 </conditional> |
268 <param name="count" value="-c"/> | 273 <param name="count" value="-c"/> |
269 <output name="output" file="intersect-count.bed" ftype="bed" /> | 274 <output name="output" file="intersect-count.bed" ftype="bed" /> |
270 </test> | 275 </test> |
271 <test> | 276 <test> |
272 <param name="inputA" value="intersect-A.bed" ftype="bed" /> | 277 <param name="inputA" value="intersect-A.bed" ftype="bed" /> |
273 <conditional name="reduce_or_iterate"> | 278 <conditional name="reduce_or_iterate"> |
274 <param name='reduce_or_iterate_selector' value="iterate" /> | 279 <param name="reduce_or_iterate_selector" value="iterate" /> |
275 <param name="inputB" value="intersect-B.bed" ftype="bed" /> | 280 <param name="inputB" value="intersect-B.bed" ftype="bed" /> |
276 </conditional> | 281 </conditional> |
277 <param name="invert" value="-v"/> | 282 <param name="invert" value="-v"/> |
278 <output name="output" file="intersect-invert.bed" ftype="bed" /> | 283 <output name="output" file="intersect-invert.bed" ftype="bed" /> |
279 </test> | 284 </test> |
280 <test> | 285 <test> |
281 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> | 286 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> |
282 <conditional name="reduce_or_iterate"> | 287 <conditional name="reduce_or_iterate"> |
283 <param name='reduce_or_iterate_selector' value="iterate" /> | 288 <param name="reduce_or_iterate_selector" value="iterate" /> |
284 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> | 289 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> |
285 </conditional> | 290 </conditional> |
286 <param name="overlap_mode" value="-wa,-wb" /> | 291 <param name="overlap_mode" value="-wa,-wb" /> |
287 <conditional name="fraction_cond"> | 292 <conditional name="fraction_cond"> |
288 <param name='fraction_select' value='specify'/> | 293 <param name="fraction_select" value="specify"/> |
289 <param name="overlap" value="0.5" /> | 294 <param name="overlap" value="0.5" /> |
290 </conditional> | 295 </conditional> |
291 <output name="output" file="intersect-fracA.bed" ftype="bed" /> | 296 <output name="output" file="intersect-fracA.bed" ftype="bed" /> |
292 </test> | 297 </test> |
293 <test> | 298 <test> |
294 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> | 299 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> |
295 <conditional name="reduce_or_iterate"> | 300 <conditional name="reduce_or_iterate"> |
296 <param name='reduce_or_iterate_selector' value="iterate" /> | 301 <param name="reduce_or_iterate_selector" value="iterate" /> |
297 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> | 302 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> |
298 </conditional> | 303 </conditional> |
299 <param name="overlap_mode" value="-wa,-wb" /> | 304 <param name="overlap_mode" value="-wa,-wb" /> |
300 <conditional name="fraction_cond"> | 305 <conditional name="fraction_cond"> |
301 <param name='fraction_select' value='specify'/> | 306 <param name="fraction_select" value="specify"/> |
302 <param name="overlap" value="0.5" /> | 307 <param name="overlap" value="0.5" /> |
303 <conditional name="reciprocal_cond"> | 308 <conditional name="reciprocal_cond"> |
304 <param name="reciprocal" value="-r" /> | 309 <param name="reciprocal" value="-r" /> |
305 </conditional> | 310 </conditional> |
306 </conditional> | 311 </conditional> |
307 <output name="output" file="intersect-fracA-rec.bed" ftype="bed" /> | 312 <output name="output" file="intersect-fracA-rec.bed" ftype="bed" /> |
308 </test> | 313 </test> |
309 <test> | 314 <test> |
310 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> | 315 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> |
311 <conditional name="reduce_or_iterate"> | 316 <conditional name="reduce_or_iterate"> |
312 <param name='reduce_or_iterate_selector' value="iterate" /> | 317 <param name="reduce_or_iterate_selector" value="iterate" /> |
313 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> | 318 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> |
314 </conditional> | 319 </conditional> |
315 <param name="overlap_mode" value="-wa,-wb" /> | 320 <param name="overlap_mode" value="-wa,-wb" /> |
316 <conditional name="fraction_cond"> | 321 <conditional name="fraction_cond"> |
317 <param name='fraction_select' value='specify'/> | 322 <param name="fraction_select" value="specify"/> |
318 <param name="overlap" value="0.5" /> | 323 <param name="overlap" value="0.5" /> |
319 <conditional name="reciprocal_cond"> | 324 <conditional name="reciprocal_cond"> |
320 <param name="overlapB" value="0.5" /> | 325 <param name="overlapB" value="0.5" /> |
321 </conditional> | 326 </conditional> |
322 </conditional> | 327 </conditional> |
323 <output name="output" file="intersect-fracA-rec.bed" ftype="bed" /> | 328 <output name="output" file="intersect-fracA-rec.bed" ftype="bed" /> |
324 </test> | 329 </test> |
325 <test> | 330 <test> |
326 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> | 331 <param name="inputA" value="intersect-A2.bed" ftype="bed" /> |
327 <conditional name="reduce_or_iterate"> | 332 <conditional name="reduce_or_iterate"> |
328 <param name='reduce_or_iterate_selector' value="iterate" /> | 333 <param name="reduce_or_iterate_selector" value="iterate" /> |
329 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> | 334 <param name="inputB" value="intersect-B2.bed" ftype="bed" /> |
330 </conditional> | 335 </conditional> |
331 <param name="overlap_mode" value="-wa,-wb" /> | 336 <param name="overlap_mode" value="-wa,-wb" /> |
332 <conditional name="fraction_cond"> | 337 <conditional name="fraction_cond"> |
333 <param name='fraction_select' value='specify'/> | 338 <param name="fraction_select" value="specify"/> |
334 <param name="overlap" value="0.5" /> | 339 <param name="overlap" value="0.5" /> |
335 <conditional name="reciprocal_cond"> | 340 <conditional name="reciprocal_cond"> |
336 <param name="overlapB" value="0.5" /> | 341 <param name="overlapB" value="0.5" /> |
337 <param name="disjoint" value="-e" /> | 342 <param name="disjoint" value="-e" /> |
338 </conditional> | 343 </conditional> |
360 <param name="invert" value="True" /> | 365 <param name="invert" value="True" /> |
361 <param name="split" value="False" /> | 366 <param name="split" value="False" /> |
362 <output name="output" file="intersectBed_result3.bed" ftype="bed" /> | 367 <output name="output" file="intersectBed_result3.bed" ftype="bed" /> |
363 </test> | 368 </test> |
364 </tests> | 369 </tests> |
365 <help> | 370 <help><![CDATA[ |
366 <![CDATA[ | |
367 **What it does** | 371 **What it does** |
368 | 372 |
369 By far, the most common question asked of two sets of genomic features is whether or not any of the features in the two sets “overlap” with one another. This is known as feature intersection. bedtools intersect allows one to screen for overlaps between two sets of genomic features. Moreover, it allows one to have fine control as to how the intersections are reported. bedtools intersect works with both @STD_BEDTOOLS_INPUT_LABEL@ and BAM files as input. | 373 By far, the most common question asked of two sets of genomic features is whether or not any of the features in the two sets “overlap” with one another. This is known as feature intersection. bedtools intersect allows one to screen for overlaps between two sets of genomic features. Moreover, it allows one to have fine control as to how the intersections are reported. bedtools intersect works with both @STD_BEDTOOLS_INPUT_LABEL@ and BAM files as input. |
370 | 374 |
371 .. image:: $PATH_TO_IMAGES/intersect-glyph.png | 375 .. image:: $PATH_TO_IMAGES/intersect-glyph.png |
377 .. class:: infomark | 381 .. class:: infomark |
378 | 382 |
379 Note that a BAM alignment will be sent to the output file **once** even if it overlaps more than one interval in the BED file. | 383 Note that a BAM alignment will be sent to the output file **once** even if it overlaps more than one interval in the BED file. |
380 | 384 |
381 @REFERENCES@ | 385 @REFERENCES@ |
382 ]]> | 386 ]]></help> |
383 </help> | |
384 <expand macro="citations" /> | 387 <expand macro="citations" /> |
385 </tool> | 388 </tool> |