comparison jb2_urlconf.py @ 48:460d5b6c5d98 draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a-dirty
author fubar
date Wed, 06 Mar 2024 10:37:49 +0000
parents 3e53204c2419
children 7e867ff86e44
comparison
equal deleted inserted replaced
47:3e53204c2419 48:460d5b6c5d98
1 inconf = open('config.json', 'r').readlines() 1 inconf = open('config.json', 'r').readlines()
2 with open('config.json.local', 'w') as bak: 2 with open('config.json.local', 'w') as bak:
3 bak.write('\n'.join(inconf)) 3 bak.write(''.join(inconf))
4 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/" 4 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/"
5 utag = '"uri":' 5 utag = '"uri":'
6 for i, row in enumerate(inconf): 6 for i, row in enumerate(inconf):
7 ispath = False 7 ispath = False
8 if row.strip().startswith(utag): 8 if row.strip().startswith(utag):
9 ispath = True 9 ispath = True
10 parth = row.split(utag)[1].strip() 10 parth = row.split(utag)[1].strip()
11 inconf[i] = '%s%s' % (urlbase, parth) 11 inconf[i] = '%s%s' % (urlbase, parth)
12 with open('config.json', 'w') as outconf: 12 with open('config.json', 'w') as outconf:
13 outconf.write('\n'.join(inconf)) 13 outconf.write(''.join(inconf))
14 14
15 15
16 16