comparison jb2_urlconf.py @ 57:94264fe60478 draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
author fubar
date Thu, 21 Mar 2024 08:01:42 +0000
parents 7e867ff86e44
children
comparison
equal deleted inserted replaced
56:c0097a584a8a 57:94264fe60478
1 1 inconf = open("config.json", "r").readlines()
2 inconf = open('config.json', 'r').readlines() 2 with open("config.json.local", "w") as bak:
3 with open('config.json.local', 'w') as bak: 3 bak.write("".join(inconf))
4 bak.write(''.join(inconf))
5 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/" 4 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/"
6 utag = '"uri":' 5 utag = '"uri":'
7 for i, row in enumerate(inconf): 6 for i, row in enumerate(inconf):
8 ispath = False 7 ispath = False
9 if row.strip().startswith(utag): 8 if row.strip().startswith(utag):
10 ispath = True 9 ispath = True
11 parth = row.split(utag)[1].strip().replace('"','').replace("'",'') 10 parth = row.split(utag)[1].strip().replace('"', "").replace("'", "")
12 inconf[i] = '%s "%s%s"' % (utag, urlbase, parth) 11 inconf[i] = '%s "%s%s"' % (utag, urlbase, parth)
13 with open('config.json', 'w') as outconf: 12 with open("config.json", "w") as outconf:
14 outconf.write(''.join(inconf)) 13 outconf.write("".join(inconf))
15
16
17
18