comparison closestBed.xml @ 15:b73962f8fcbf draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit c5007eff737fcabb28fa726ac40f13a1cd4893c1
author iuc
date Wed, 05 Jul 2017 17:12:00 -0400
parents 7308cc546a36
children 95a3b2c25bd1
comparison
equal deleted inserted replaced
14:304a594a7ef6 15:b73962f8fcbf
3 <macros> 3 <macros>
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><![CDATA[
9 <![CDATA[ 9 closestBed
10 #set inputBs = "' '".join([str( $file ) for $file in $inputB]) 10 $strand
11 11 $addition
12 closestBed 12 #if $addition2.addition2_select:
13 $strand 13 -D $addition2.addition2_select
14 $addition 14 $addition2.iu
15 #if $addition2.addition2_select: 15 $addition2.id
16 -D $addition2.addition2_select 16 #end if
17 $addition2.iu 17 $io
18 $addition2.id 18 -mdb $mdb
19 #end if 19 -t $ties
20 $io 20 #if str($k):
21 -mdb $mdb 21 -k $k
22 -t $ties 22 #end if
23 #if $k: 23 -a '$inputA'
24 -k $k 24 #if str($overlap_with.source) == "data_table":
25 #end if 25 -b '$overlap_with.table.fields.path'
26 -a '$inputA' 26 #else
27 -b '$inputBs' 27 #set inputBs = "' '".join([str( $file ) for $file in $overlap_with.inputB])
28 > '$output' 28 -b '$inputBs'
29 ]]> 29 #end if
30 </command> 30 > '$output'
31 ]]></command>
31 <inputs> 32 <inputs>
32 <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/> 33 <param name="inputA" type="data" format="bed,vcf,gff,gff3" label="BED/VCF/GFF file"/>
33 <param format="bed,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="overlap intervals in this BED/VCF/GFF file?"/> 34 <!-- overlap with file (inputB) -->
35 <conditional name="overlap_with">
36 <param name="source" type="select" label="Overlap with: will you select a BED/VCF/GFF file from your history or use a built-in GFF file?" help="Built-in GFF files contain full annotation of a reference genome">
37 <option value="history" selected="true">Use a BED/VCF/GFF file from the history</option>
38 <option value="data_table">Use a built-in GFF file</option>
39 </param>
40 <when value="data_table">
41 <param name="table" type="select" label="Select reference GFF" help="If your genome of interest is not listed, contact the Galaxy team">
42 <options from_data_table="all_gff">
43 <filter type="sort_by" column="2"/>
44 <validator type="no_options" message="No files are available"/>
45 </options>
46 </param>
47 </when>
48 <when value="history">
49 <param name="inputB" type="data" format="bed,gff,vcf,gff3" multiple="true" label="Select a BED/VCF/GFF file" />
50 </when>
51 </conditional>
34 52
35 <param name="ties" type="select" 53 <param name="ties" type="select"
36 label="How ties for closest feature should be handled" 54 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."> 55 help="This occurs when two features in B have exactly the same overlap with a feature in A.">
38 <option value="all" selected="True">all - Report all ties (default)</option> 56 <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> 57 <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> 58 <option value="last">last - Report the last tie that occurred in the B file</option>
41 </param> 59 </param>
42 60
43 <expand macro="strand2" /> 61 <expand macro="strand2" />
44 62
45 <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue="" 63 <param name="addition" argument="-d" type="boolean" truevalue="-d" falsevalue="" checked="false"
46 label="In addition to the closest feature in B, report its distance to A as an extra column" 64 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)" /> 65 help="The reported distance for overlapping features will be 0" />
48 66
49 <conditional name="addition2"> 67 <conditional name="addition2">
50 <param name="addition2_select" type="select" 68 <param name="addition2_select" argument="-D" type="select"
51 label="Add additional columns to report distance to upstream feature. Distance defintion" 69 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)"> 70 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">
53 <option value="" selected="True">Do not report the distance et all.</option> 71 <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> 72 <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> 73 <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> 74 <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> 75 </param>
58 <when value="" /> 76 <when value="" />
65 <when value="b"> 83 <when value="b">
66 <expand macro="closest_D_option" /> 84 <expand macro="closest_D_option" />
67 </when> 85 </when>
68 </conditional> 86 </conditional>
69 87
70 <param name="k" type="integer" value="1" optional="True" min="1" 88 <param argument="-k" type="integer" min="1" value="1" optional="true"
71 label="Report the k closest hits" help="(-k)"/> 89 label="Report the k closest hits" />
72 90
73 <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue="" 91 <param argument="-io" type="boolean" truevalue="-io" falsevalue="" checked="false"
74 label="Ignore features in B that overlap A" 92 label="Ignore features in B that overlap A"
75 help="That is, we want close, yet not touching features only. (-io)" /> 93 help="That is, we want close, yet not touching features only" />
76 94
77 <param name="mdb" type="select" optional="True" 95 <param argument="-mdb" type="select"
78 label="How multiple databases are resolved" 96 label="How multiple databases are resolved">
79 help="(-mdb)"> 97 <option value="each" selected="true">Report closest records for each database. (-each)</option>
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> 98 <option value="all">Report closest records among all databases. (-all)</option>
82 </param> 99 </param>
83 </inputs> 100 </inputs>
84 <outputs> 101 <outputs>
85 <!-- Would like to use a nicer name, but since there are possibly many inputB datasets, falling back to ${on_string} --> 102 <!-- Would like to use a nicer name, but since there are possibly many inputB datasets, falling back to ${on_string} -->
86 <!-- <data format_source="inputA" name="output" metadata_source="inputA" label="Closest regions from ${inputB[0].name} to ${inputA.name}"/> --> 103 <!-- <data format_source="inputA" name="output" metadata_source="inputA" label="Closest regions from ${inputB[0].name} to ${inputA.name}"/> -->
87 <data format_source="inputA" name="output" metadata_source="inputA" label="Closest regions from ${on_string}"/> 104 <data name="output" format_source="inputA" metadata_source="inputA" label="Closest regions from ${on_string}" />
88 </outputs> 105 </outputs>
89 <tests> 106 <tests>
90 <test> 107 <test>
91 <param name="inputA" value="closestBedA.bed" ftype="bed" /> 108 <param name="inputA" value="closestBedA.bed" ftype="bed" />
109 <param name="source" value="history" />
92 <param name="inputB" value="closestBedB.bed" ftype="bed" /> 110 <param name="inputB" value="closestBedB.bed" ftype="bed" />
93 <output name="output" file="closestBed_result1.bed" ftype="bed" /> 111 <output name="output" file="closestBed_result1.bed" ftype="bed" />
94 </test> 112 </test>
95 <test> 113 <test>
96 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> 114 <param name="inputA" value="closestBed_a.bed" ftype="bed" />
115 <param name="source" value="history" />
97 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> 116 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />
98 <param name="addition" value="True" /> 117 <param name="addition" value="true" />
99 <output name="output" file="closestBed_result2.bed" ftype="bed" /> 118 <output name="output" file="closestBed_result2.bed" ftype="bed" />
100 </test> 119 </test>
101 <test> 120 <test>
102 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> 121 <param name="inputA" value="closestBed_a.bed" ftype="bed" />
122 <param name="source" value="history" />
103 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> 123 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" />
104 <param name="addition" value="True" /> 124 <param name="addition" value="True" />
105 <param name="mdb" value="all" /> 125 <param name="mdb" value="all" />
106 <output name="output" file="closestBed_result3.bed" ftype="bed" /> 126 <output name="output" file="closestBed_result3.bed" ftype="bed" />
107 </test> 127 </test>
108 <test> 128 <test>
109 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> 129 <param name="inputA" value="closestBed_c.bed" ftype="bed" />
130 <param name="source" value="history" />
110 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> 131 <param name="inputB" value="closestBed_d.bed" ftype="bed" />
111 <param name="addition2_select" value="ref" /> 132 <param name="addition2_select" value="ref" />
112 <output name="output" file="closestBed_result4.bed" ftype="bed" /> 133 <output name="output" file="closestBed_result4.bed" ftype="bed" />
113 </test> 134 </test>
114 <test> 135 <test>
115 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> 136 <param name="inputA" value="closestBed_c.bed" ftype="bed" />
137 <param name="source" value="history" />
116 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> 138 <param name="inputB" value="closestBed_d.bed" ftype="bed" />
117 <param name="addition2_select" value="a" /> 139 <param name="addition2_select" value="a" />
118 <output name="output" file="closestBed_result5.bed" ftype="bed" /> 140 <output name="output" file="closestBed_result5.bed" ftype="bed" />
119 </test> 141 </test>
120 <test> 142 <test>
121 <param name="inputA" value="closestBedA.bed" ftype="bed" /> 143 <param name="inputA" value="closestBedA.bed" ftype="bed" />
144 <param name="source" value="history" />
122 <param name="inputB" value="a.bed" ftype="bed" /> 145 <param name="inputB" value="a.bed" ftype="bed" />
123 <param name="k" value="3" /> 146 <param name="k" value="3" />
124 <output name="output" file="closestBed_result6.bed" ftype="bed" /> 147 <output name="output" file="closestBed_result6.bed" ftype="bed" />
125 </test> 148 </test>
126 </tests> 149 </tests>
127 <help> 150 <help><![CDATA[
128 <![CDATA[
129 **What it does** 151 **What it does**
130 152
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. 153 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 154
133 .. image:: $PATH_TO_IMAGES/closest-glyph.png 155 .. image:: $PATH_TO_IMAGES/closest-glyph.png
134 156
135
136 @REFERENCES@ 157 @REFERENCES@
137 ]]> 158 ]]></help>
138 </help>
139 <expand macro="citations" /> 159 <expand macro="citations" />
140 </tool> 160 </tool>