Mercurial > repos > rmarenco > hubarchivecreator
annotate hubArchiveCreator.xml @ 14:cbd8982c9f51 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 38f01a73fea83321618501978a3a505b5e8ab527
author | rmarenco |
---|---|
date | Mon, 15 Aug 2016 19:19:32 -0400 |
parents | 25809f699cb3 |
children | 2a45cd656e8e |
rev | line source |
---|---|
11
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
1 <tool id="hubArchiveCreator" name="Hub Archive Creator" version="2.3.0"> |
0 | 2 <description> |
3 This Galaxy tool permits to prepare your files to be ready for | |
4 Assembly Hub visualization. | |
5 </description> | |
6 | |
7 <requirements> | |
8 <requirement type="package" version="312">ucsc_tools</requirement> | |
4
1b653b332695
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 64cfc08088d11f6818c1b4e5514ef9e67969eaff-dirty
rmarenco
parents:
3
diff
changeset
|
9 <requirement type="package" version="0.0.1">gff3ToGenePred</requirement> |
1b653b332695
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 64cfc08088d11f6818c1b4e5514ef9e67969eaff-dirty
rmarenco
parents:
3
diff
changeset
|
10 <requirement type="package" version="0.0.1">gtfToGenePred</requirement> |
1b653b332695
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 64cfc08088d11f6818c1b4e5514ef9e67969eaff-dirty
rmarenco
parents:
3
diff
changeset
|
11 <requirement type="package" version="0.0.1">genePredToBed</requirement> |
14
cbd8982c9f51
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 38f01a73fea83321618501978a3a505b5e8ab527
rmarenco
parents:
13
diff
changeset
|
12 <requirement type="package" version="0.0.1">genePredToBigGenePred</requirement> |
0 | 13 <requirement type="package" version="1.2">samtools</requirement> |
14 <!-- Conda dependencies --> | |
11
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
15 <requirement type="package" version="332">ucsc-bedtobigbed</requirement> |
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
16 <requirement type="package" version="332">ucsc-fatotwobit</requirement> |
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
17 <requirement type="package" version="324">ucsc-genepredtobed</requirement> |
13
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
18 <requirement type="package" version="332">ucsc-genepredtobiggenepred</requirement> |
0 | 19 <requirement type="package" version="324">ucsc-gff3togenepred</requirement> |
20 <requirement type="package" version="324">ucsc-gtftogenepred</requirement> | |
11
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
21 <requirement type="package" version="324">ucsc-twobitinfo</requirement> |
0 | 22 <requirement type="package" version="1.3.1">samtools</requirement> |
23 </requirements> | |
24 | |
25 <stdio> | |
26 <regex match="^pass1" | |
27 source="stderr" | |
28 level="log" | |
29 description="bedToBigBed"/> | |
30 <!-- TODO: Add the case pass1 and 0 chroms --> | |
31 <!-- TODO: Add the case pass2 and 0 records or 0 fields --> | |
32 </stdio> | |
33 | |
34 <!-- Idea: python \ -augustus [parameters] \ -trfBig [parameters] --> | |
35 <command detect_errors="exit_code"><![CDATA[ | |
36 mkdir -p $output.extra_files_path; | |
37 python $__tool_directory__/hubArchiveCreator.py | |
38 | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
39 ## Ask the user to enter the genome name |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
40 --genome_name '$genome_name' |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
41 |
0 | 42 #import json |
43 | |
44 #set global data_parameter_dict = {} | |
45 | |
46 ## Function to retrieve the data of the inputs | |
47 #def prepare_json($input_to_prepare, $order_index, $extra_data_dict={}) | |
48 #set false_path = str($input_to_prepare) | |
49 #set name = $input_to_prepare.name | |
50 | |
51 #set data_dict = {"name": $name} | |
52 #silent data_dict.update($extra_data_dict) | |
53 | |
54 ## Add the ordering by taking the tool form indexes | |
55 #silent $data_dict.update({"order_index": $order_index + 1}) | |
56 | |
57 #silent $data_parameter_dict.update({$false_path: $data_dict}) | |
58 | |
59 #end def | |
60 | |
61 #for $i, $f in enumerate( $format ) | |
62 #if $f.formatChoice.format_select == "bam" | |
63 --bam $f.formatChoice.BAM | |
64 #set bam_index = $f.formatChoice.BAM.metadata.bam_index | |
65 #silent $prepare_json($f.formatChoice.BAM, $i, {"index": $bam_index}) | |
66 #end if | |
67 #if $f.formatChoice.format_select == "bed" | |
68 #if $f.formatChoice.bedChoice.bed_select == "bed" | |
69 --bed $f.formatChoice.bedChoice.BED | |
70 #silent $prepare_json($f.formatChoice.bedChoice.BED, $i) | |
71 #end if | |
72 #if $f.formatChoice.bedChoice.bed_select == "bed_simple_repeats_option" | |
73 --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats | |
74 #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, $i) | |
75 #end if | |
76 #end if | |
77 #if $f.formatChoice.format_select == "bigwig" | |
78 --bigwig $f.formatChoice.BIGWIG | |
79 #silent $prepare_json($f.formatChoice.BIGWIG, $i) | |
80 #end if | |
81 #if $f.formatChoice.format_select == "gff3" | |
82 --gff3 $f.formatChoice.GFF3 | |
83 #silent $prepare_json($f.formatChoice.GFF3, $i) | |
84 #end if | |
85 #if $f.formatChoice.format_select == "gtf" | |
86 ## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8 | |
87 --gtf $f.formatChoice.GTF | |
88 #silent $prepare_json($f.formatChoice.GTF, $i) | |
89 #end if | |
90 #end for | |
91 | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
92 ## We combine the fasta file dataset name with his false path in a JSON object |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
93 #set fasta_json = json.dumps({"false_path": str($fasta_file), "name": $fasta_file.name}) |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
94 -f '$fasta_json' |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
95 |
0 | 96 ## Dump the final json |
97 #set all_data_json = json.dumps($data_parameter_dict) | |
98 | |
99 --data_json '$all_data_json' | |
100 | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
101 ## Retrieve the user email |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
102 --user_email $__user_email__ |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
103 |
13
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
104 -d $__tool_directory__ |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
105 |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
106 -e $output.files_path |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
107 |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
108 $advanced_options.debug_mode |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
109 |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
110 -o $output; |
0 | 111 ]]></command> |
112 | |
113 <inputs> | |
114 <param | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
115 name="genome_name" |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
116 type="text" |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
117 size="30" |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
118 value="unknown" |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
119 label="UCSC Genome Browser assembly ID" |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
120 /> |
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
121 <param |
0 | 122 format="fasta" |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
123 name="fasta_file" |
0 | 124 type="data" |
125 label="Reference genome" | |
126 /> | |
127 <repeat name="format" title="Formats"> | |
128 <conditional name="formatChoice"> | |
129 <param name="format_select" type="select" label="Format"> | |
130 <option value="bam" selected="true">BAM</option> | |
131 <option value="bed">BED</option> | |
132 <option value="bigwig">BIGWIG</option> | |
133 <option value="gff3">GFF3</option> | |
134 <option value="gtf">GTF</option> | |
135 </param> | |
136 | |
137 <when value="bam"> | |
138 <param | |
139 format="bam" | |
140 name="BAM" | |
141 type="data" | |
142 label="BAM File" | |
143 /> | |
144 </when> | |
145 <when value="bigwig"> | |
146 <param | |
147 format="bigwig" | |
148 name="BIGWIG" | |
149 type="data" | |
150 label="BIGWIG File" | |
151 /> | |
152 </when> | |
153 <when value="gff3"> | |
154 <param | |
155 format="gff3" | |
156 name="GFF3" | |
157 type="data" | |
158 label="GFF3 File" | |
159 /> | |
160 </when> | |
161 <when value="gtf"> | |
162 <param | |
163 format="gtf" | |
164 name="GTF" | |
165 type="data" | |
166 label="GTF File" | |
167 /> | |
168 </when> | |
169 <when value="bed"> | |
170 <conditional name="bedChoice"> | |
171 <param name="bed_select" type="select" label="Bed Choice"> | |
11
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
172 <option value="bed" selected="true">BED Generic (bed3+)</option> |
d05236b15f81
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
rmarenco
parents:
10
diff
changeset
|
173 <option value="bed_simple_repeats_option">BED Simple repeat (bed4+12 / simpleRepeat.as)</option> |
0 | 174 </param> |
175 <when value="bed"> | |
176 <param | |
177 format="bed" | |
178 name="BED" | |
179 type="data" | |
180 label="Generic Bed File Choice" | |
181 /> | |
182 </when> | |
183 <when value="bed_simple_repeats_option"> | |
184 <param | |
185 format="bed" | |
186 name="BED_simple_repeats" | |
187 type="data" | |
188 label="Bed Simple Repeats (Bed4+12) File" | |
189 /> | |
190 </when> | |
191 </conditional> | |
192 </when> | |
193 </conditional> | |
194 </repeat> | |
13
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
195 <conditional name="advanced_options"> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
196 <param name="advanced_options_selector" type="select" label="Advanced options"> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
197 <option value="off" selected="true">Hide advanced options</option> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
198 <option value="on">Display advanced options</option> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
199 </param> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
200 <!-- TODO: Avoid redundancy here --> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
201 <when value="on"> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
202 <param name="debug_mode" type="boolean" |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
203 label="Activate debug mode" checked="false" |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
204 truevalue="--debug_mode" falsevalue=""> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
205 <help> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
206 Use this option if you are a G-OnRamp developer |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
207 </help> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
208 </param> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
209 </when> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
210 <when value="off"> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
211 <param name="debug_mode" type="hidden" |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
212 value=""> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
213 </param> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
214 </when> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
215 </conditional> |
25809f699cb3
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 65ab931ef2b05a5acf06cbde3a746c94a0a0a4cb
rmarenco
parents:
11
diff
changeset
|
216 </inputs> |
0 | 217 |
218 <outputs> | |
219 <data format="trackhub" name="output"/> | |
220 </outputs> | |
221 | |
222 <tests> | |
223 <!-- Can also use assert_command to test command --> | |
224 <!-- Testing GFF3 input --> | |
225 <test> | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
226 <param name="fasta_file" value="dbia3.fa"/> |
0 | 227 <repeat name="format"> |
228 <conditional name="formatChoice"> | |
229 <param name="format_select" value="gff3"/> | |
230 <param name="GFF3" value="augustusDbia3.gff3"/> | |
231 </conditional> | |
232 </repeat> | |
233 <repeat name="format"> | |
234 <param name="BED_simple_repeats" value="dbia3_trfBig_unsorted.bed"/> | |
235 <!-- TODO: Ask why the tests are not passing with this xml: | |
236 Error creating a job for these tool inputs - Error executing tool: 'NoneType' object has no attribute 'current_history' | |
237 <conditional name="formatChoice"> | |
238 <param name="format_select" value="bed"/> | |
239 <conditional name="bedChoice"> | |
240 <param name="bed_select" value="bed_simple_repeats_option"/> | |
241 <param name="BED_simple_repeats" value="dbia3_trfBig_unsorted.bed"/> | |
242 </conditional> | |
243 </conditional> | |
244 --> | |
245 </repeat> | |
246 | |
247 <output name="output"> | |
248 <assert_contents> | |
249 <has_text text="myHub"/> | |
250 </assert_contents> | |
251 <assert_contents> | |
252 <has_text text="dbia3_trfBig.bb"/> | |
253 </assert_contents> | |
254 <assert_contents> | |
255 <has_text text="SAODOAii qwwqod92921"/> | |
256 </assert_contents> | |
257 </output> | |
258 </test> | |
259 <test> | |
10
acc233161f50
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1b1063f90004764bcf504f4340738eca5c4b1f9d
rmarenco
parents:
4
diff
changeset
|
260 <param name="fasta_file" value="dbia3.fa"/> |
0 | 261 <param name="GFF3" value="augustusDbia3.gff3"/> |
262 <output name="output" file="augustusOutput.html" lines_diff="2"> | |
263 <extra_files type="directory" value="myHub"/> | |
264 <extra_files type="file" name="myHub/dbia3/tracks/augustusDbia3.bb" value="augustusDbia3.bb"/> | |
265 </output> | |
266 </test> | |
267 <!-- Testing Generic BED input --> | |
268 <!-- Testing Bed Simple repeat input --> | |
269 </tests> | |
270 | |
271 <help> | |
272 This Galaxy tool permits to prepare your files to be ready for | |
273 Assembly Hub visualization. | |
274 </help> | |
275 </tool> |