Mercurial > repos > iuc > bedtools
annotate intersectBed.xml @ 42:d279800f4ff9 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
| author | iuc |
|---|---|
| date | Thu, 26 Apr 2018 17:02:24 -0400 |
| parents | 1133660b0f9d |
| children | 9224d51be786 |
| rev | line source |
|---|---|
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
1 <tool id="bedtools_intersectbed" name="Intersect intervals" version="@WRAPPER_VERSION@.1"> |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
2 <description>find overlapping intervals in various ways</description> |
| 8 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements" /> | |
| 7 <expand macro="stdio" /> | |
| 8 <command> | |
| 9 <![CDATA[ | |
| 10 #set modes = ' '.join( str($overlap_mode).split(',') ) | |
| 11 | |
| 12 bedtools intersect | |
|
28
f0aca67fdb71
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 391d2d41095edb2badf70924d3636238453ee377
iuc
parents:
18
diff
changeset
|
13 #if $inputA.is_of_type('bam'): |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
14 -abam '${inputA}' |
| 8 | 15 #else: |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
16 -a '${inputA}' |
| 8 | 17 #end if |
| 18 | |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
19 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
20 -b '$reduce_or_iterate.inputB' |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
21 #else: |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
22 #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
23 -b '$inputBs' |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
24 #end if |
| 8 | 25 $split |
| 26 $strand | |
| 27 #if str($fraction) != "None" and str($fraction): | |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
28 -f '${fraction}' |
| 8 | 29 #end if |
| 30 $reciprocal | |
| 31 $invert | |
| 32 $once | |
| 33 $header | |
| 34 $modes | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
35 $count |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
36 > '${output}' |
| 8 | 37 ]]> |
| 38 </command> | |
| 39 <inputs> | |
|
42
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
40 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputA" type="data" label="File A to intersect with B" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format" /> |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
41 <conditional name="reduce_or_iterate"> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
42 <param name='reduce_or_iterate_selector' type='select' label='Combined or separate output files'> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
43 <option value='iterate' selected='true'>One output file per 'input B' file</option> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
44 <option value='reduce'>Single output containing intersections of any 'input B' lines with A </option> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
45 </param> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
46 <when value='iterate'> |
|
42
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
47 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" |
|
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
48 label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
49 </when> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
50 <when value='reduce'> |
|
42
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
51 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" multiple="true" |
|
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
52 label="File(s) B to intersect with A" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
53 </when> |
|
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
54 </conditional> |
| 8 | 55 <expand macro="strand2" /> |
| 56 <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?"> | |
| 57 <option value="-wa" selected="True">Write the original entry in A for each overlap (-wa)</option> | |
| 58 <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> | |
| 59 <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> | |
| 60 <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> | |
| 61 <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> | |
| 62 </param> | |
| 63 | |
| 64 <expand macro="split" /> | |
| 65 <!-- -f --> | |
| 66 <param name="fraction" type="text" | |
| 67 label="Minimum overlap required as a fraction of the BAM alignment" | |
| 68 help="Alignments are only retained if the overlap with the an interval in the BED file comprises at least this fraction of the BAM alignment's length. For example, to require that the overlap affects 50% of the BAM alignment, use 0.50. (-f)"/> | |
| 69 <!-- -r --> | |
| 70 <expand macro="reciprocal" /> | |
| 71 <!-- -v --> | |
| 72 <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" | |
|
36
1133660b0f9d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
iuc
parents:
28
diff
changeset
|
73 label="Report only those alignments that **do not** overlap with file(s) B" |
| 8 | 74 help="(-v)"/> |
| 75 <!-- -u --> | |
| 76 <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue="" | |
| 77 label="Write the original A entry _once_ if _any_ overlaps found in B." | |
| 78 help="Just report the fact >=1 hit was found. (-u)" /> | |
| 79 <!-- -c --> | |
| 80 <param name="count" type="boolean" checked="false" truevalue="-c" falsevalue="" | |
| 81 label="For each entry in A, report the number of overlaps with B." | |
| 82 help="Reports 0 for A entries that have no overlap with B. (-c)" /> | |
| 83 <expand macro="print_header" /> | |
| 84 </inputs> | |
| 85 <outputs> | |
| 86 <data format_source="inputA" name="output" metadata_source="inputA"/> | |
| 87 </outputs> | |
| 88 <tests> | |
| 89 <test> | |
| 90 <param name="inputA" value="intersectBed1.bed" ftype="bed" /> | |
| 91 <param name="inputB" value="intersectBed2.bed" ftype="bed" /> | |
| 92 <param name="overlap_mode" value="-wa" /> | |
| 93 <param name="split" value="False" /> | |
| 94 <output name="output" file="intersectBed_result1.bed" ftype="bed" /> | |
| 95 </test> | |
| 96 <test> | |
| 97 <param name="inputA" value="intersectBed1.bed" ftype="bed" /> | |
| 98 <param name="inputB" value="intersectBed2.bed" ftype="bed" /> | |
| 99 <param name="overlap_mode" value="-wa,-wb" /> | |
| 100 <param name="split" value="False" /> | |
| 101 <output name="output" file="intersectBed_result2.bed" ftype="bed" /> | |
| 102 </test> | |
| 103 <test> | |
| 104 <param name="inputA" value="intersectBed1.bed" ftype="bed" /> | |
| 105 <param name="inputB" value="intersectBed2.bed" ftype="bed" /> | |
| 106 <param name="invert" value="True" /> | |
| 107 <param name="split" value="False" /> | |
| 108 <output name="output" file="intersectBed_result3.bed" ftype="bed" /> | |
| 109 </test> | |
| 110 </tests> | |
| 111 <help> | |
| 112 <![CDATA[ | |
| 113 **What it does** | |
| 114 | |
|
42
d279800f4ff9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b75b9e79cf3186a22dc2e1e9d27c1a080b891b59
iuc
parents:
36
diff
changeset
|
115 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. |
| 8 | 116 |
| 117 .. image:: $PATH_TO_IMAGES/intersect-glyph.png | |
| 118 | |
| 119 .. class:: infomark | |
| 120 | |
| 121 Note that each BAM alignment is treated individually. Therefore, if one end of a paired-end alignment overlaps an interval in the BED file, yet the other end does not, the output file will only include the overlapping end. | |
| 122 | |
| 123 .. class:: infomark | |
| 124 | |
| 125 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. | |
| 126 | |
| 127 @REFERENCES@ | |
| 128 ]]> | |
| 129 </help> | |
| 130 <expand macro="citations" /> | |
| 131 </tool> |
