Mercurial > repos > fubar > jbrowse2
diff jbrowse2.py @ 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 | c4eb6a85db70 |
line wrap: on
line diff
--- 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"] = [