comparison closestBed.xml @ 1:82aac94b06c3 draft

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