annotate closestBed.xml @ 1:82aac94b06c3 draft

Uploaded
author iuc
date Thu, 08 Jan 2015 14:25:51 -0500
parents b8348686a0b9
children 607c0576c6ab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
1 <tool id="bedtools_closestbed" name="ClosestBed" version="@WRAPPER_VERSION@.0">
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
2 <description></description>
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 #set inputBs = ' '.join( [ str( $file ) for $file in $inputB ] )
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
11
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
12 closestBed
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
13 $strand
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
14 $addition
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
15 #if $addition2.addition2_select:
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
16 -D $addition2.addition2_select
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
17 $addition2.iu
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
18 $addition2.id
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
19 #end if
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
20 $io
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
21 -mdb $mdb
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
22 -t $ties
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
23 -a $inputA
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
24 -b $inputBs
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
25 > $output
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
26 ]]>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
27 </command>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
28 <inputs>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
29 <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/>
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
30 <param format="bed,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="overlap intervals in this BED/VCF/GFF file?"/>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
31
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
32 <param name="ties" type="select"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
33 label="How ties for closest feature should be handled"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
34 help="This occurs when two features in B have exactly the same overlap with a feature in A.">
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
35 <option value="all" selected="True">all - Report all ties (default)</option>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
36 <option value="first">first - Report the first tie that occurred in the B file</option>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
37 <option value="last">last - Report the last tie that occurred in the B file</option>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
38 </param>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
39
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
40 <expand macro="strand2" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
41
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
42 <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
43 label="In addition to the closest feature in B, report its distance to A as an extra column"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
44 help="The reported distance for overlapping features will be 0. (-d)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
45
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
46 <conditional name="addition2">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
47 <param name="addition2_select" type="select" optional="True"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
48 label="Add additional columns to report distance to upstream feature. Distance defintion"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
49 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)">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
50 <option value="" selected="True">Do not report the distance et all.</option>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
51 <option value="ref">Report distance with respect to the reference genome. B features with a lower (start, stop) are upstream. (-ref)</option>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
52 <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>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
53 <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>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
54 </param>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
55 <when value="ref">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
56 <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
57 label="Ignore features in B that are upstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
58 help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
59
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
60 <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
61 label="Ignore features in B that are downstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
62 help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
63 </when>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
64 <when value="a">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
65 <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
66 label="Ignore features in B that are upstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
67 help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
68
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
69 <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
70 label="Ignore features in B that are downstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
71 help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
72 </when>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
73 <when value="b">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
74 <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
75 label="Ignore features in B that are upstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
76 help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
77
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
78 <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
79 label="Ignore features in B that are downstream of features in A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
80 help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
81 </when>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
82 </conditional>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
83
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
84 <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue=""
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
85 label="Ignore features in B that overlap A"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
86 help="That is, we want close, yet not touching features only. (-io)" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
87
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
88 <param name="mdb" type="select" optional="True"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
89 label="How multiple databases are resolved"
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
90 help="(-mdb)">
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
91 <option value="each" selected="True">Report closest records for each database. (-each)</option>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
92 <option value="all">Report closest records among all databases. (-all)</option>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
93 </param>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
94 </inputs>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
95 <outputs>
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
96 <data format_source="inputA" name="output" metadata_source="inputA" label="Clostest region of ${inputA} in ${inputB}"/>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
97 </outputs>
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
98 <tests>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
99 <test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
100 <param name="inputA" value="closestBedA.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
101 <param name="inputB" value="closestBedB.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
102 <output name="output" file="closestBed_result1.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
103 </test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
104 <test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
105 <param name="inputA" value="closestBed_a.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
106 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
107 <param name="addition" value="True" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
108 <output name="output" file="closestBed_result2.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
109 </test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
110 <test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
111 <param name="inputA" value="closestBed_a.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
112 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
113 <param name="addition" value="True" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
114 <param name="mdb" value="all" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
115 <output name="output" file="closestBed_result3.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
116 </test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
117 <test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
118 <param name="inputA" value="closestBed_c.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
119 <param name="inputB" value="closestBed_d.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
120 <param name="addition2_select" value="ref" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
121 <output name="output" file="closestBed_result4.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
122 </test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
123 <test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
124 <param name="inputA" value="closestBed_c.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
125 <param name="inputB" value="closestBed_d.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
126 <param name="addition2_select" value="a" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
127 <output name="output" file="closestBed_result5.bed" ftype="bed" />
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
128 </test>
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
129 </tests>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
130 <help>
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
131 <![CDATA[
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
132 **What it does**
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
133
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
134 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.
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
135
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
136 .. image:: $PATH_TO_IMAGES/closest-glyph.png
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
137
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
138
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
139 @REFERENCES@
1
82aac94b06c3 Uploaded
iuc
parents: 0
diff changeset
140 ]]>
0
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
141 </help>
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
142 <expand macro="citations" />
b8348686a0b9 Imported from capsule None
iuc
parents:
diff changeset
143 </tool>