Mercurial > repos > yating-l > jbrowsearchivecreator
comparison jbrowse_hub.xml @ 0:804a93e87cc8 draft
planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit f22711ea7a464bdaf4d5aaea07f2eacf967aa66e-dirty
author | yating-l |
---|---|
date | Wed, 12 Apr 2017 17:41:55 -0400 |
parents | |
children | ac83821b0e06 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:804a93e87cc8 |
---|---|
1 <tool id="jbrowse_hub" name="JBrowse Hub Creator" version="1.0"> | |
2 <description> | |
3 This Galaxy tool is used to prepare your files to be ready for displaying on JBrowse | |
4 </description> | |
5 | |
6 <requirements> | |
7 <requirement type="package" version="1.2">samtools</requirement> | |
8 <requirement type="package" version="1.9">numpy</requirement> | |
9 <requirement type="package" version="1.68">biopython</requirement> | |
10 <requirement type="package" version="1.0">ucsc_tools_340</requirement> | |
11 <requirement type="package" version="1.12.1">jbrowse_tools</requirement> | |
12 </requirements> | |
13 | |
14 <stdio> | |
15 </stdio> | |
16 | |
17 <command detect_errors="exit_code"><![CDATA[ | |
18 python $__tool_directory__/jbrowse_hub.py | |
19 --fasta '$reference' | |
20 --genome_name '$genome_name' | |
21 | |
22 #set galaxy_url = str($GALAXY_URL) | |
23 #set $jbrowse_url = galaxy_url.replace("8080", "80") | |
24 --jbrowse_host '$jbrowse_url' | |
25 | |
26 ## json metadata recording from Remi's hub-archive-creator.xml | |
27 #import json | |
28 #set global data_parameter_dict = {} | |
29 | |
30 ## Function to retrieve the data of the inputs | |
31 #def prepare_json($input_to_prepare, $extra_data_dict={}) | |
32 #set false_path = str($input_to_prepare) | |
33 #set name = $input_to_prepare.name | |
34 | |
35 #set data_dict = {"name": $name} | |
36 #silent data_dict.update($extra_data_dict) | |
37 | |
38 #silent $data_parameter_dict.update({$false_path: $data_dict}) | |
39 | |
40 #end def | |
41 | |
42 #for $g in $group | |
43 #for $f in $g.format | |
44 #set track_label = str($f.formatChoice.label) | |
45 #set group_name = str($g.group_name) | |
46 #set extra_data_dict = {"label" : $track_label, "category" : $group_name} | |
47 #if $f.formatChoice.format_select == 'bed' | |
48 #set track_color = str($f.formatChoice.track_color) | |
49 #silent extra_data_dict.update({"color" : $track_color}) | |
50 #if $f.formatChoice.bedChoice.bed_select == 'bed_generic_option' | |
51 --bed $f.formatChoice.bedChoice.BED_generic | |
52 #silent $prepare_json($f.formatChoice.bedChoice.BED_generic, extra_data_dict) | |
53 #elif $f.formatChoice.bedChoice.bed_select == 'bed_simple_repeats_option' | |
54 --bedSimpleRepeats $f.formatChoice.bedChoice.BED_simple_repeats | |
55 #silent $prepare_json($f.formatChoice.bedChoice.BED_simple_repeats, extra_data_dict) | |
56 #elif $f.formatChoice.bedChoice.bed_select == 'bed_splice_junctions_option' | |
57 --bedSpliceJunctions $f.formatChoice.bedChoice.BED_splice_junctions | |
58 #silent $prepare_json($f.formatChoice.bedChoice.BED_splice_junctions, extra_data_dict) | |
59 #end if | |
60 #end if | |
61 #if $f.formatChoice.format_select == 'bam' | |
62 --bam $f.formatChoice.BAM | |
63 #silent $prepare_json($f.formatChoice.BAM, extra_data_dict) | |
64 #end if | |
65 #if $f.formatChoice.format_select == 'gff3' | |
66 #set track_color = str($f.formatChoice.track_color) | |
67 #silent extra_data_dict.update({"color" : $track_color}) | |
68 #if $f.formatChoice.gff3Choice.gff3_select == 'gff3_generic' | |
69 --gff3 $f.formatChoice.gff3Choice.GFF3_generic | |
70 #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_generic, extra_data_dict) | |
71 #elif $f.formatChoice.gff3Choice.gff3_select == 'gff3_transcript' | |
72 --gff3_transcript $f.formatChoice.gff3Choice.GFF3_transcript | |
73 #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_transcript, extra_data_dict) | |
74 #elif $f.formatChoice.gff3Choice.gff3_select == 'gff3_mrna' | |
75 --gff3_mrna $f.formatChoice.gff3Choice.GFF3_mrna | |
76 #silent $prepare_json($f.formatChoice.gff3Choice.GFF3_mrna, extra_data_dict) | |
77 #end if | |
78 #end if | |
79 #if $f.formatChoice.format_select == 'blastxml' | |
80 --blastxml $f.formatChoice.BlastXML | |
81 #silent $prepare_json($f.formatChoice.BlastXML, extra_data_dict) | |
82 #end if | |
83 #if $f.formatChoice.format_select == 'gtf' | |
84 --gtf $f.formatChoice.GTF | |
85 #set track_color = str($f.formatChoice.track_color) | |
86 #silent extra_data_dict.update({"color" : $track_color}) | |
87 #silent $prepare_json($f.formatChoice.GTF, extra_data_dict) | |
88 #end if | |
89 #if $f.formatChoice.format_select == 'bigwig' | |
90 --bigwig $f.formatChoice.BIGWIG | |
91 #set pos_color = str($f.formatChoice.pos_color) | |
92 #set neg_color = str($f.formatChoice.neg_color) | |
93 #silent $extra_data_dict.update({"style" : {"pos_color" : $pos_color, "neg_color" : $neg_color}}) | |
94 #silent $prepare_json($f.formatChoice.BIGWIG, extra_data_dict) | |
95 #end if | |
96 #end for | |
97 #end for | |
98 | |
99 #set all_data_json = json.dumps($data_parameter_dict) | |
100 -j '$all_data_json' | |
101 -e '$output.extra_files_path' | |
102 -o '$output' | |
103 | |
104 ]]></command> | |
105 | |
106 <inputs> | |
107 <param name="GALAXY_URL" type="baseurl" value="" /> | |
108 <param name="reference" type="data" format="fasta" label="Reference Genome" /> | |
109 <param name="genome_name" type="text" size="30" value="unknown" label="Genome name" /> | |
110 <repeat name="group" title="New group"> | |
111 <param type="text" name="group_name" label="Group name" value="Default group"/> | |
112 <repeat name="format" title="New track"> | |
113 <conditional name="formatChoice"> | |
114 <param name="format_select" type="select" label="Format"> | |
115 <option value="bam" selected="true">BAM</option> | |
116 <option value="bed">BED</option> | |
117 <option value="blastxml">BLASTXML</option> | |
118 <option value="bigwig">BIGWIG</option> | |
119 <option value="gff3">GFF3</option> | |
120 <option value="gtf">GTF</option> | |
121 </param> | |
122 | |
123 <when value="bam"> | |
124 <param | |
125 format="bam" | |
126 name="BAM" | |
127 type="data" | |
128 label="BAM File" | |
129 /> | |
130 <param name="label" type="text" size="30" value = "Sequence Alignment" label="Track name" /> | |
131 </when> | |
132 <when value="bed"> | |
133 <conditional name="bedChoice"> | |
134 <param name="bed_select" type="select" label="Bed Choice"> | |
135 <option value="bed_generic_option">BED format</option> | |
136 <option value="bed_simple_repeats_option">BED Simple repeat (bed4+12 / simpleRepeat.as)</option> | |
137 <option value="bed_splice_junctions_option">BED Splice junctions (bed12+1 / spliceJunctions.as)</option> | |
138 </param> | |
139 <when value="bed_generic_option"> | |
140 <param | |
141 format="bed" | |
142 name="BED_generic" | |
143 type="data" | |
144 label="Bed File" | |
145 /> | |
146 </when> | |
147 <when value="bed_simple_repeats_option"> | |
148 <param | |
149 format="bed" | |
150 name="BED_simple_repeats" | |
151 type="data" | |
152 label="Bed Simple Repeats (Bed4+12) File" | |
153 /> | |
154 </when> | |
155 <when value="bed_splice_junctions_option"> | |
156 <param | |
157 format="bed" | |
158 name="BED_splice_junctions" | |
159 type="data" | |
160 label="Bed Splice Junctions (Bed12+1) File" | |
161 /> | |
162 </when> | |
163 </conditional> | |
164 <param name="label" type="text" size="30" value="BED file" label="Track name" /> | |
165 <param name="track_color" type="color" label="Track color" value="#daa520"> | |
166 <sanitizer> | |
167 <valid initial="string.letters,string.digits"> | |
168 <add value="#"/> | |
169 </valid> | |
170 </sanitizer> | |
171 </param> | |
172 </when> | |
173 <when value="blastxml"> | |
174 <param | |
175 format="blastxml" | |
176 name="BlastXML" | |
177 type="data" | |
178 label="Blast Alignments File" | |
179 /> | |
180 <param name="label" type="text" size="30" value="Blast Alignment" label="Track name" /> | |
181 </when> | |
182 <when value="bigwig"> | |
183 <param | |
184 format="bigwig" | |
185 name="BIGWIG" | |
186 type="data" | |
187 label="BIGWIG File" | |
188 /> | |
189 <param name="label" type="text" size="30" value="Sequence Coverage" label="Track name" /> | |
190 <param name="pos_color" type="color" label="Positive Coverage Color" value="#FFA600"> | |
191 <sanitizer> | |
192 <valid initial="string.letters,string.digits"> | |
193 <add value="#"/> | |
194 </valid> | |
195 </sanitizer> | |
196 </param> | |
197 <param name="neg_color" type="color" label="Negative Coverage Color" value="#005EFF"> | |
198 <sanitizer> | |
199 <valid initial="string.letters,string.digits"> | |
200 <add value="#"/> | |
201 </valid> | |
202 </sanitizer> | |
203 </param> | |
204 </when> | |
205 <when value="gff3"> | |
206 <conditional name="gff3Choice"> | |
207 <param name="gff3_select" type="select" label="gff3 type"> | |
208 <option value="gff3_generic">GFF3 format</option> | |
209 <option value="gff3_transcript">GFF3 format output from gene prediction tools (e.g. Augustus), structure: gene->transcription->CDS</option> | |
210 <option value="gff3_mrna">GFF3 format output from gene prediction tools (e.g. SNAP), structure: gene->mRNA->CDS</option> | |
211 </param> | |
212 <when value="gff3_generic"> | |
213 <param | |
214 format="gff3" | |
215 name="GFF3_generic" | |
216 type="data" | |
217 label="GFF3 File" | |
218 /> | |
219 </when> | |
220 <when value="gff3_transcript"> | |
221 <param | |
222 format="gff3" | |
223 name="GFF3_transcript" | |
224 type="data" | |
225 label="GFF3 File from gene prediction" | |
226 /> | |
227 </when> | |
228 <when value="gff3_mrna"> | |
229 <param | |
230 format="gff3" | |
231 name="GFF3_mrna" | |
232 type="data" | |
233 label="GFF3 File from gene prediction" | |
234 /> | |
235 </when> | |
236 </conditional> | |
237 <param name="label" type="text" size="30" value="Gene Prediction" label="Track name" /> | |
238 <param name="track_color" type="color" label="Track color" value="#daa520"> | |
239 <sanitizer> | |
240 <valid initial="string.letters,string.digits"> | |
241 <add value="#"/> | |
242 </valid> | |
243 </sanitizer> | |
244 </param> | |
245 </when> | |
246 <when value="gtf"> | |
247 <param | |
248 format="gtf" | |
249 name="GTF" | |
250 type="data" | |
251 label="GTF File" | |
252 /> | |
253 <param name="label" type="text" size="30" value="Assembled Transcripts" label="Track name" /> | |
254 <param name="track_color" type="color" label="Track color" value="#daa520"> | |
255 <sanitizer> | |
256 <valid initial="string.letters,string.digits"> | |
257 <add value="#"/> | |
258 </valid> | |
259 </sanitizer> | |
260 </param> | |
261 </when> | |
262 </conditional> | |
263 </repeat> | |
264 </repeat> | |
265 </inputs> | |
266 | |
267 <outputs> | |
268 <data format="html" name="output" label="${tool.name}" /> | |
269 </outputs> | |
270 <tests> | |
271 <test> | |
272 <param name="reference" value="dbia3/raw/dbia3.fa" /> | |
273 <param name="output" value="hubtest" /> | |
274 <repeat name="group"> | |
275 <param name="group_name" value="Default group"/> | |
276 <repeat name="format"> | |
277 <conditional name="formatChoice"> | |
278 <param name="format_select" value="gff3_transcript"/> | |
279 <param name="GFF3_transcript" value="dbia3/raw/Augustus_on_data_3__GTF_GFF.gff3" /> | |
280 </conditional> | |
281 </repeat> | |
282 </repeat> | |
283 <output name="output" file="hubtest" > | |
284 </output> | |
285 </test> | |
286 </tests> | |
287 <help> | |
288 This Galaxy tool will create a tar file which including raw datasets and json datasets that can be used for | |
289 JBrowse visualization. | |
290 </help> | |
291 <citations> | |
292 </citations> | |
293 </tool> |