Mercurial > repos > eric-rasche > apollo
diff json2iframe.py @ 3:d4ae83dedb14 draft
planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 4ac38d0b6dba1183f3e78eb5c224c7051064b4a5
author | eric-rasche |
---|---|
date | Thu, 12 Jan 2017 11:52:28 -0500 |
parents | f7d57e56f322 |
children | 23ead6905145 |
line wrap: on
line diff
--- a/json2iframe.py Tue May 03 13:48:11 2016 -0400 +++ b/json2iframe.py Thu Jan 12 11:52:28 2017 -0500 @@ -7,15 +7,12 @@ parser = argparse.ArgumentParser(description='Sample script to add an attribute to a feature via web services') parser.add_argument('apollo', help='Complete Apollo URL') parser.add_argument('json', type=file, help='JSON Data') + parser.add_argument('external_apollo_url') args = parser.parse_args() - - # https://cpt.tamu.edu/apollo/annotator/loadLink?loc=NC_005880:0..148317&organism=326&tracks= + # https://fqdn/apollo/annotator/loadLink?loc=NC_005880:0..148317&organism=326&tracks= data = json.load(args.json) - print data - if len(data) > 1: - raise Exception("More than one organism listed. Contact your local admin for help.") # This is base64 encoded to get past the toolshed's filters. HTML_TPL = """ @@ -27,4 +24,4 @@ """ HTML_TPL = base64.b64decode(HTML_TPL.replace('\n', '')) - print HTML_TPL.format(base_url=args.apollo, chrom="", orgId=data[0]['id']) + print HTML_TPL.format(base_url=args.external_apollo_url, chrom="", orgId=data[0]['id'])