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