Mercurial > repos > iuc > bedtools
annotate closestBed.xml @ 11:7308cc546a36 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
author | iuc |
---|---|
date | Mon, 17 Oct 2016 10:13:35 -0400 |
parents | d25966c8ddeb |
children | b73962f8fcbf |
rev | line source |
---|---|
0 | 1 <tool id="bedtools_closestbed" name="ClosestBed" version="@WRAPPER_VERSION@.0"> |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
2 <description>find the closest, potentially non-overlapping interval</description> |
0 | 3 <macros> |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements" /> | |
7 <expand macro="stdio" /> | |
8 <command> | |
1 | 9 <![CDATA[ |
6
d25966c8ddeb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6ce9a5a91d803b9ac9e743d9721ff0ccd2a5a59f-dirty
iuc
parents:
5
diff
changeset
|
10 #set inputBs = "' '".join([str( $file ) for $file in $inputB]) |
1 | 11 |
0 | 12 closestBed |
13 $strand | |
14 $addition | |
1 | 15 #if $addition2.addition2_select: |
16 -D $addition2.addition2_select | |
17 $addition2.iu | |
18 $addition2.id | |
19 #end if | |
20 $io | |
21 -mdb $mdb | |
0 | 22 -t $ties |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
23 #if $k: |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
24 -k $k |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
25 #end if |
6
d25966c8ddeb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6ce9a5a91d803b9ac9e743d9721ff0ccd2a5a59f-dirty
iuc
parents:
5
diff
changeset
|
26 -a '$inputA' |
d25966c8ddeb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6ce9a5a91d803b9ac9e743d9721ff0ccd2a5a59f-dirty
iuc
parents:
5
diff
changeset
|
27 -b '$inputBs' |
11
7308cc546a36
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
iuc
parents:
6
diff
changeset
|
28 > '$output' |
1 | 29 ]]> |
0 | 30 </command> |
31 <inputs> | |
32 <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/> | |
1 | 33 <param format="bed,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="overlap intervals in this BED/VCF/GFF file?"/> |
0 | 34 |
1 | 35 <param name="ties" type="select" |
36 label="How ties for closest feature should be handled" | |
37 help="This occurs when two features in B have exactly the same overlap with a feature in A."> | |
0 | 38 <option value="all" selected="True">all - Report all ties (default)</option> |
39 <option value="first">first - Report the first tie that occurred in the B file</option> | |
40 <option value="last">last - Report the last tie that occurred in the B file</option> | |
41 </param> | |
42 | |
1 | 43 <expand macro="strand2" /> |
44 | |
45 <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue="" | |
5
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
46 label="In addition to the closest feature in B, report its distance to A as an extra column" |
1 | 47 help="The reported distance for overlapping features will be 0. (-d)" /> |
48 | |
49 <conditional name="addition2"> | |
5
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
50 <param name="addition2_select" type="select" |
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
51 label="Add additional columns to report distance to upstream feature. Distance defintion" |
1 | 52 help="Like -d, report the closest feature in B, and its distance to A as an extra column. However unlike -d, use negative distances to report upstream features. (-D)"> |
53 <option value="" selected="True">Do not report the distance et all.</option> | |
54 <option value="ref">Report distance with respect to the reference genome. B features with a lower (start, stop) are upstream. (-ref)</option> | |
55 <option value="a">Report distance with respect to A. When A is on the - strand, "upstream" means B has a higher (start,stop). (-a)</option> | |
56 <option value="b">Report distance with respect to B. When B is on the - strand, "upstream" means A has a higher (start,stop). (-b)</option> | |
57 </param> | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
58 <when value="" /> |
1 | 59 <when value="ref"> |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
60 <expand macro="closest_D_option" /> |
1 | 61 </when> |
62 <when value="a"> | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
63 <expand macro="closest_D_option" /> |
1 | 64 </when> |
65 <when value="b"> | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
66 <expand macro="closest_D_option" /> |
1 | 67 </when> |
68 </conditional> | |
69 | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
70 <param name="k" type="integer" value="1" optional="True" min="1" |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
71 label="Report the k closest hits" help="(-k)"/> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
72 |
1 | 73 <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue="" |
5
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
74 label="Ignore features in B that overlap A" |
1 | 75 help="That is, we want close, yet not touching features only. (-io)" /> |
76 | |
77 <param name="mdb" type="select" optional="True" | |
5
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
78 label="How multiple databases are resolved" |
1 | 79 help="(-mdb)"> |
80 <option value="each" selected="True">Report closest records for each database. (-each)</option> | |
81 <option value="all">Report closest records among all databases. (-all)</option> | |
82 </param> | |
0 | 83 </inputs> |
84 <outputs> | |
5
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
85 <!-- Would like to use a nicer name, but since there are possibly many inputB datasets, falling back to ${on_string} --> |
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
86 <!-- <data format_source="inputA" name="output" metadata_source="inputA" label="Closest regions from ${inputB[0].name} to ${inputA.name}"/> --> |
f8b7dc21b4ee
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 33ef87ff883d6a5814ab5b4552d7b597711cae4c
iuc
parents:
4
diff
changeset
|
87 <data format_source="inputA" name="output" metadata_source="inputA" label="Closest regions from ${on_string}"/> |
0 | 88 </outputs> |
1 | 89 <tests> |
90 <test> | |
91 <param name="inputA" value="closestBedA.bed" ftype="bed" /> | |
92 <param name="inputB" value="closestBedB.bed" ftype="bed" /> | |
93 <output name="output" file="closestBed_result1.bed" ftype="bed" /> | |
94 </test> | |
95 <test> | |
96 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
97 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
98 <param name="addition" value="True" /> | |
99 <output name="output" file="closestBed_result2.bed" ftype="bed" /> | |
100 </test> | |
101 <test> | |
102 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
103 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
104 <param name="addition" value="True" /> | |
105 <param name="mdb" value="all" /> | |
106 <output name="output" file="closestBed_result3.bed" ftype="bed" /> | |
107 </test> | |
108 <test> | |
109 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
110 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
111 <param name="addition2_select" value="ref" /> | |
112 <output name="output" file="closestBed_result4.bed" ftype="bed" /> | |
113 </test> | |
114 <test> | |
115 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
116 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
117 <param name="addition2_select" value="a" /> | |
118 <output name="output" file="closestBed_result5.bed" ftype="bed" /> | |
119 </test> | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
120 <test> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
121 <param name="inputA" value="closestBedA.bed" ftype="bed" /> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
122 <param name="inputB" value="a.bed" ftype="bed" /> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
123 <param name="k" value="3" /> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
124 <output name="output" file="closestBed_result6.bed" ftype="bed" /> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
125 </test> |
1 | 126 </tests> |
0 | 127 <help> |
1 | 128 <![CDATA[ |
0 | 129 **What it does** |
130 | |
131 Similar to intersectBed, closestBed searches for overlapping features in A and B. In the event that no feature in B overlaps the current feature in A, closestBed will report the closest (that is, least genomic distance from the start or end of A) feature in B. For example, one might want to find which is the closest gene to a significant GWAS polymorphism. Note that closestBed will report an overlapping feature as the closest—that is, it does not restrict to closest non-overlapping feature. | |
132 | |
1 | 133 .. image:: $PATH_TO_IMAGES/closest-glyph.png |
134 | |
135 | |
0 | 136 @REFERENCES@ |
1 | 137 ]]> |
0 | 138 </help> |
139 <expand macro="citations" /> | |
140 </tool> |