Mercurial > repos > jkanche > epiviz
annotate epiviz_export.xml @ 0:78367907d256 draft default tip
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
author | jkanche |
---|---|
date | Fri, 20 Sep 2019 07:23:50 -0400 |
parents | |
children |
rev | line source |
---|---|
0
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
1 <tool id="epiviz_export" name="Interactively visualize genomic data with Epiviz" version="0.1.0" python_template_version="3.5"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
2 <requirements> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
3 </requirements> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
4 <command detect_errors="exit_code"><![CDATA[ |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
5 python $script_file |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
6 ]]></command> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
7 <configfiles> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
8 <configfile name="script_file"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
9 import os |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
10 import sys |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
11 import json |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
12 file_location = [] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
13 file_type = [] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
14 file_annotations = [] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
15 #for $i, $s in enumerate($files) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
16 tloc = '${s.input}' |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
17 tlocs = tloc.split("/") |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
18 file_location.append("/data/" + tlocs[len(tlocs)-1]) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
19 file_type.append('${s.format}') |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
20 tanno = '${s.fileanno}' |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
21 print(tanno) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
22 tanno = tanno.split(",") |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
23 print(tanno) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
24 ttanno = {} |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
25 for i in tanno: |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
26 ti = i.split(":") |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
27 ttanno[ti[0]] = ti[1] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
28 |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
29 file_annotations.append(ttanno) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
30 #end for |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
31 epiviz_json = [] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
32 for i in range(0,len(file_location)): |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
33 fdatatype = "bp" if file_type[i] == "BigWig" else "annotation" |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
34 epiviz_json.append( |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
35 { |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
36 "url": file_location[i], |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
37 "file_type": file_type[i], |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
38 "datatype": fdatatype, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
39 "name": file_location[i], |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
40 "id": file_location[i], |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
41 "annotation": file_annotations[i], |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
42 "metadata": [] |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
43 } |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
44 ) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
45 print epiviz_json |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
46 fout = open('$output', "w") |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
47 json.dump(epiviz_json, fout) |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
48 fout.close() |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
49 </configfile> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
50 </configfiles> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
51 <inputs> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
52 <repeat name="files" title="Add File"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
53 <param type="data" name="input" format="bigbed,bigwig"/> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
54 <param name="format" type="select" label="Data Format"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
55 <option value="BigWig" selected="true">BigWig</option> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
56 <option value="BigBed">BigBed</option> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
57 <option value="tbx">tbx</option> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
58 </param> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
59 <param type ="text" name="fileanno" format="json" /> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
60 </repeat> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
61 </inputs> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
62 <outputs> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
63 <data name="output" format="json" from_work_dir="output.json" /> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
64 </outputs> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
65 <tests> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
66 <test> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
67 <param name="input" value="/test"/> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
68 <param name="format" value="bigbed"/> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
69 <param name="fileanno" value="annotation"/> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
70 <output name="output"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
71 <assert_contents> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
72 <has_line line="datatype" /> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
73 </assert_contents> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
74 </output> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
75 </test> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
76 </tests> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
77 <help><![CDATA[ |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
78 Usage: Choose files to interactively visualize with epiviz. |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
79 ]]></help> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
80 <citations> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
81 <citation type="bibtex"> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
82 @misc{epiviz, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
83 author = {epiviz}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
84 year = {2019}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
85 title = {epiviz}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
86 publisher = {GitHub}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
87 journal = {GitHub repository}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
88 url = {https://github.com/epiviz/epivizGalaxyTool}, |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
89 }</citation> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
90 </citations> |
78367907d256
planemo upload commit d56ec81d6c02ad971116dca44b22e02fb0a0ab30
jkanche
parents:
diff
changeset
|
91 </tool> |