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