# HG changeset patch # User fubar # Date 1711621867 0 # Node ID c8190283090099a932fd61bfd005899308452fc6 # Parent 497fd2d27aa2ff0c8a80916feab03b579248034a planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e diff -r 497fd2d27aa2 -r c81902830900 autogenJB2.py --- a/autogenJB2.py Thu Mar 28 09:15:57 2024 +0000 +++ b/autogenJB2.py Thu Mar 28 10:31:07 2024 +0000 @@ -200,11 +200,10 @@ # "font_size": root.find("metadata/general/font_size").text, # } # jc.add_general_configuration(general_data) - trackconf = jc.config_json.get("tracks", None) - if trackconf: - jc.config_json["tracks"].update(jc.tracksToAdd) - else: - jc.config_json["tracks"] = jc.tracksToAdd + trackconf = jc.config_json.get("tracks", []) + for gnome in jc.genome_names: + trackconf += jc.tracksToAdd[gnome] + jc.config_json["tracks"] = trackconf jc.write_config() defLoc = makeDefaultLocation() default_session_data.update( diff -r 497fd2d27aa2 -r c81902830900 jbrowse2.py --- a/jbrowse2.py Thu Mar 28 09:15:57 2024 +0000 +++ b/jbrowse2.py Thu Mar 28 10:31:07 2024 +0000 @@ -15,7 +15,7 @@ import xml.etree.ElementTree as ET from collections import defaultdict -logging.basicConfig(level=logging.INFO) +logging.basicConfig(level=logging.DEBUG) log = logging.getLogger("jbrowse") JB2VER = "v2.10.3" @@ -1343,17 +1343,16 @@ ) # The view for the assembly we're adding view_json = {"type": "LinearGenomeView", "tracks": tracks_data} - refName = None + refName = self.assmeta[gnome][0].get("genome_firstcontig", None) drdict = { "reversed": False, "assemblyName": gnome, "start": 1, "end": 100000, - "refName": "x", + "refName": refName } - - if default_data.get("defaultLocation", ""): - ddl = default_data["defaultLocation"] + ddl = default_data.get("defaultLocation", None) + if ddl: loc_match = re.search(r"^([^:]+):([\d,]*)\.*([\d,]*)$", ddl) # allow commas like 100,000 but ignore as integer if loc_match: @@ -1368,8 +1367,6 @@ "@@@ regexp could not match contig:start..end in the supplied location %s - please fix" % ddl ) - else: - drdict["refName"] = gnome if drdict.get("refName", None): # TODO displayedRegions is not just zooming to the region, it hides the rest of the chromosome view_json["displayedRegions"] = [