Mercurial > repos > fubar > jbrowse2
comparison jb2_urlconf.py @ 49:7e867ff86e44 draft
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a-dirty
author | fubar |
---|---|
date | Thu, 07 Mar 2024 00:27:48 +0000 |
parents | 460d5b6c5d98 |
children | 94264fe60478 |
comparison
equal
deleted
inserted
replaced
48:460d5b6c5d98 | 49:7e867ff86e44 |
---|---|
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)) |
4 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/" | 5 urlbase = "https://galaxy.genomicsvl-students.cloud.edu.au/jbrowse/hum/" |
5 utag = '"uri":' | 6 utag = '"uri":' |
6 for i, row in enumerate(inconf): | 7 for i, row in enumerate(inconf): |
7 ispath = False | 8 ispath = False |
8 if row.strip().startswith(utag): | 9 if row.strip().startswith(utag): |
9 ispath = True | 10 ispath = True |
10 parth = row.split(utag)[1].strip() | 11 parth = row.split(utag)[1].strip().replace('"','').replace("'",'') |
11 inconf[i] = '%s%s' % (urlbase, parth) | 12 inconf[i] = '%s "%s%s"' % (utag, urlbase, parth) |
12 with open('config.json', 'w') as outconf: | 13 with open('config.json', 'w') as outconf: |
13 outconf.write(''.join(inconf)) | 14 outconf.write(''.join(inconf)) |
14 | 15 |
15 | 16 |
16 | 17 |
18 |