comparison json2iframe.py @ 15:8585783deb07 draft

"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 7f742b16e6e4c33b9abdb633405298e05760c84b"
author gga
date Tue, 08 Jun 2021 09:12:48 +0000
parents b0714ffcf142
children
comparison
equal deleted inserted replaced
14:f4e3f9480307 15:8585783deb07
20 # This is base64 encoded to get past the toolshed's filters. 20 # This is base64 encoded to get past the toolshed's filters.
21 HTML_TPL = """ 21 HTML_TPL = """
22 <html> 22 <html>
23 <head> 23 <head>
24 <title>Embedded Apollo Access</title> 24 <title>Embedded Apollo Access</title>
25 <style type="text/css">body {{margin: 0;}} iframe {{border: 0;width: 100%;height: 100%}}</style> 25 <style type="text/css">body {{margin: 0;}} iframe {{border: 0;width: 100%;height: 100vh}}</style>
26 </head> 26 </head>
27 <body> 27 <body>
28 <iframe src="{base_url}/annotator/loadLink?loc={chrom}&organism={orgId}{tracklist}"></iframe> 28 <iframe src="{base_url}/annotator/loadLink?loc={chrom}&organism={orgId}{tracklist}"></iframe>
29 </body> 29 </body>
30 </html> 30 </html>
31 """ 31 """
32 32
33 print(HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data[0]['id'], tracklist='&tracklist=1' if args.tracklist else '')) 33 if isinstance(data, list):
34 print(HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data[0]['id'], tracklist='&tracklist=1' if args.tracklist else ''))
35 else:
36 print(HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data['id'], tracklist='&tracklist=1' if args.tracklist else ''))