comparison jbrowse2.py @ 27:4ff1ed2065cc draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit d733fb18a02929c9e9959ad30bd0f1368118e924-dirty
author fubar
date Wed, 07 Feb 2024 22:37:10 +0000
parents 172acf9c7a53
children 9a5c409f33f4
comparison
equal deleted inserted replaced
26:e578621acb13 27:4ff1ed2065cc
1222 self.add_vcf(dataset_path, outputTrackConfig) 1222 self.add_vcf(dataset_path, outputTrackConfig)
1223 elif dataset_ext == "paf": 1223 elif dataset_ext == "paf":
1224 self.add_paf( 1224 self.add_paf(
1225 dataset_path, 1225 dataset_path,
1226 outputTrackConfig, 1226 outputTrackConfig,
1227 track["conf"]["options"]["synteny"], 1227 track["conf"]["options"]["paf"],
1228 ) 1228 )
1229 else: 1229 else:
1230 log.warn("Do not know how to handle %s", dataset_ext) 1230 log.warn("Do not know how to handle %s", dataset_ext)
1231 # Return non-human label for use in other fields 1231 # Return non-human label for use in other fields
1232 yield outputTrackConfig["label"] 1232 yield outputTrackConfig["label"]
1277 } 1277 }
1278 1278
1279 if data.get("defaultLocation", ""): 1279 if data.get("defaultLocation", ""):
1280 ddl = data["defaultLocation"] 1280 ddl = data["defaultLocation"]
1281 loc_match = re.search(r"^([^:]+):([\d,]*)\.*([\d,]*)$", ddl) 1281 loc_match = re.search(r"^([^:]+):([\d,]*)\.*([\d,]*)$", ddl)
1282 # allow commas like 100,000 but ignore as integer
1282 if loc_match: 1283 if loc_match:
1283 refName = loc_match.group(1) 1284 refName = loc_match.group(1)
1284 drdict["refName"] = refName 1285 drdict["refName"] = refName
1285 if loc_match.group(2) > "": 1286 if loc_match.group(2) > "":
1286 drdict["start"] = int(loc_match.group(2).replace(',','')) 1287 drdict["start"] = int(loc_match.group(2).replace(',',''))
1289 else: 1290 else:
1290 logging.info( 1291 logging.info(
1291 "@@@ regexp could not match contig:start..end in the supplied location %s - please fix" 1292 "@@@ regexp could not match contig:start..end in the supplied location %s - please fix"
1292 % ddl 1293 % ddl
1293 ) 1294 )
1294 elif self.genome_firstcontig is not None:
1295 drdict["refName"] = self.genome_firstcontig
1296 logging.info(
1297 "@@@ no defaultlocation found for default session - using %s as first contig found"
1298 % self.genome_firstcontig
1299 )
1300 1295
1301 if drdict.get("refName", None): 1296 if drdict.get("refName", None):
1302 # TODO displayedRegions is not just zooming to the region, it hides the rest of the chromosome 1297 # TODO displayedRegions is not just zooming to the region, it hides the rest of the chromosome
1303 view_json["displayedRegions"] = [ 1298 view_json["displayedRegions"] = [
1304 drdict, 1299 drdict,