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