comparison autogenJB2.py @ 52:ae12977c0e5e draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 44df75b3714aa9e02983e0b67ef43fc0eee4a8d4-dirty
author fubar
date Thu, 07 Mar 2024 06:41:01 +0000
parents 460d5b6c5d98
children bdfa6a7c4543
comparison
equal deleted inserted replaced
51:e18f2d6c4dbe 52:ae12977c0e5e
88 "default_off": [], 88 "default_off": [],
89 }, 89 },
90 "style": {}, 90 "style": {},
91 "style_labels": {}, 91 "style_labels": {},
92 } 92 }
93 track_conf = {}
94 listtracks = trackList 93 listtracks = trackList
95 # foo.paf must have a foo_paf.fasta or fasta.gz to match 94 # foo.paf must have a foo_paf.fasta or fasta.gz to match
96 tnames = [x[2] for x in listtracks] 95 tnames = [x[2] for x in listtracks]
97 texts = [x[1] for x in listtracks] 96 texts = [x[1] for x in listtracks]
98 for i, track in enumerate(listtracks): 97 for i, track in enumerate(listtracks):
98 track_conf = {"trackfiles": [], "category": "autogenerated"}
99 tpath, trext, trackname = track[:3] 99 tpath, trext, trackname = track[:3]
100 track_conf["dataset_id"] = trackname 100 track_conf["dataset_id"] = trackname
101 useuri = "no"
102 if tpath.startswith('http://') or tpath.startswith('https://'):
103 useuri = "yes"
101 if trext == "paf": 104 if trext == "paf":
102 refname = trackname + "_paf.fasta" 105 refname = trackname + "_paf.fasta"
103 refdat = [x[2] for x in listtracks if x[2] == refname] 106 refdat = [x[2] for x in listtracks if x[2] == refname]
104 if not refdat: 107 if not refdat:
105 jc.logging.warn( 108 jc.logging.warn(
134 track_conf.update({"conf": {"options": {"cram": {"cram_index": ipath}}}}) 137 track_conf.update({"conf": {"options": {"cram": {"cram_index": ipath}}}})
135 track_conf["path"] = tpath 138 track_conf["path"] = tpath
136 track_conf["format"] = trext 139 track_conf["format"] = trext
137 track_conf["name"] = trackname 140 track_conf["name"] = trackname
138 track_conf["label"] = trackname 141 track_conf["label"] = trackname
139 useu = tpath.startswith('http://') or tpath.startswith('https://') 142 track_conf["trackfiles"].append((tpath, trext, useuri, trackname, {}))
140 useuri = 'no'
141 if useu:
142 useuri = 'yes'
143 track_conf["trackfiles"] = [
144 (tpath, trext, useuri, trackname, {}),
145 ]
146 track_conf["category"] = "Autogenerated"
147 keys = jc.process_annotations(track_conf) 143 keys = jc.process_annotations(track_conf)
148 144
149 if keys: 145 if keys:
150 for key in keys: 146 for key in keys:
151 if trext in [ 147 if trext in [