Mercurial > repos > fubar > jbrowse2
changeset 65:c81902830900 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e
author | fubar |
---|---|
date | Thu, 28 Mar 2024 10:31:07 +0000 |
parents | 497fd2d27aa2 |
children | bc10ad1dfb98 |
files | autogenJB2.py jbrowse2.py |
diffstat | 2 files changed, 9 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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(
--- 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"] = [