Mercurial > repos > iuc > bedtools
annotate closestBed.xml @ 4:607c0576c6ab draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
author | iuc |
---|---|
date | Wed, 27 Jan 2016 15:15:59 -0500 |
parents | 82aac94b06c3 |
children | f8b7dc21b4ee |
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[ |
10 #set inputBs = ' '.join( [ str( $file ) for $file in $inputB ] ) | |
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 |
0 | 26 -a $inputA |
1 | 27 -b $inputBs |
28 > $output | |
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="" | |
46 label="In addition to the closest feature in B, report its distance to A as an extra column" | |
47 help="The reported distance for overlapping features will be 0. (-d)" /> | |
48 | |
49 <conditional name="addition2"> | |
50 <param name="addition2_select" type="select" optional="True" | |
51 label="Add additional columns to report distance to upstream feature. Distance defintion" | |
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="" |
74 label="Ignore features in B that overlap A" | |
75 help="That is, we want close, yet not touching features only. (-io)" /> | |
76 | |
77 <param name="mdb" type="select" optional="True" | |
78 label="How multiple databases are resolved" | |
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> | |
1 | 85 <data format_source="inputA" name="output" metadata_source="inputA" label="Clostest region of ${inputA} in ${inputB}"/> |
0 | 86 </outputs> |
1 | 87 <tests> |
88 <test> | |
89 <param name="inputA" value="closestBedA.bed" ftype="bed" /> | |
90 <param name="inputB" value="closestBedB.bed" ftype="bed" /> | |
91 <output name="output" file="closestBed_result1.bed" ftype="bed" /> | |
92 </test> | |
93 <test> | |
94 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
95 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
96 <param name="addition" value="True" /> | |
97 <output name="output" file="closestBed_result2.bed" ftype="bed" /> | |
98 </test> | |
99 <test> | |
100 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
101 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
102 <param name="addition" value="True" /> | |
103 <param name="mdb" value="all" /> | |
104 <output name="output" file="closestBed_result3.bed" ftype="bed" /> | |
105 </test> | |
106 <test> | |
107 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
108 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
109 <param name="addition2_select" value="ref" /> | |
110 <output name="output" file="closestBed_result4.bed" ftype="bed" /> | |
111 </test> | |
112 <test> | |
113 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
114 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
115 <param name="addition2_select" value="a" /> | |
116 <output name="output" file="closestBed_result5.bed" ftype="bed" /> | |
117 </test> | |
4
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
118 <test> |
607c0576c6ab
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 6692e3a4fa1bf6e9a407735afdbb2454ed32b316
iuc
parents:
1
diff
changeset
|
119 <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
|
120 <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
|
121 <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
|
122 <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
|
123 </test> |
1 | 124 </tests> |
0 | 125 <help> |
1 | 126 <![CDATA[ |
0 | 127 **What it does** |
128 | |
129 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. | |
130 | |
1 | 131 .. image:: $PATH_TO_IMAGES/closest-glyph.png |
132 | |
133 | |
0 | 134 @REFERENCES@ |
1 | 135 ]]> |
0 | 136 </help> |
137 <expand macro="citations" /> | |
138 </tool> |