changeset 109:27e9ddaaf325 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 9de1453a009c254ab11b16ae8a56cb5c22b131bf-dirty
author fubar
date Sat, 29 Jun 2024 07:22:18 +0000
parents 5d1259b88c27
children c017111e976a
files __pycache__/jbrowse2.cpython-312.pyc jbrowse2.py
diffstat 2 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
Binary file __pycache__/jbrowse2.cpython-312.pyc has changed
--- a/jbrowse2.py	Sat Jun 29 06:10:22 2024 +0000
+++ b/jbrowse2.py	Sat Jun 29 07:22:18 2024 +0000
@@ -674,13 +674,20 @@
             "trackId": tId,
             "name": trackData["name"],
             "assemblyNames": [trackData["assemblyNames"]],
+            "displays": [
+                {
+                    "type": "LinearHicDisplay",
+                    "displayId": "%s-LinearHicDisplay" % tId,
+                }
+            ],
             "category": [
                 categ,
             ],
             "adapter": {"type": "HicAdapter", "hicLocation": {"uri": uri}},
+
         }
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_maf(self, data, trackData):
         """
@@ -754,7 +761,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[gname].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
         if self.config_json.get("plugins", None):
             self.config_json["plugins"].append(mafPlugin["plugins"][0])
         else:
@@ -828,7 +835,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_bam(self, data, trackData, bam_indexes=None, **kwargs):
         tId = trackData["label"]
@@ -885,7 +892,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_cram(self, data, trackData, cram_indexes=None, **kwargs):
         tId = trackData["label"]
@@ -951,7 +958,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_vcf(self, data, trackData):
         tId = trackData["label"]
@@ -1001,7 +1008,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def _sort_gff(self, data, dest):
         # Only index if not already done
@@ -1064,7 +1071,7 @@
         style_json = self._prepare_track_style(trackDict)
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_bed(self, data, ext, trackData):
         bedPlugin = {"name": "BedScorePlugin", "umdLoc": { "uri": "bedscoreplugin.js" } }
@@ -1130,7 +1137,7 @@
         else:
             self.config_json["plugins"] = [bedPlugin,]
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def add_paf(self, data, trackData, pafOpts, **kwargs):
         tname = trackData["name"]
@@ -1212,7 +1219,7 @@
             }
         trackDict["style"] = style_json
         self.tracksToAdd[trackData["assemblyNames"]].append(copy.copy(trackDict))
-        self.trackIdlist.append(copy.copy(tId))
+        self.trackIdlist.append(tId)
 
     def process_annotations(self, track):
         category = track["category"].replace("__pd__date__pd__", TODAY)
@@ -1357,9 +1364,11 @@
                 if tId in default_data[gnome]["visibility"]["default_on"]:
                     track_types[tId] = track_conf["type"]
                     display = {"type": "linearBasicDisplay"}
-                    if "displays" in track_conf:
+                    if track_conf.get("displays", None):
                         display["type"] = track_conf["displays"][0]["type"]
-                    display["configuration"] = track_conf["displays"][0]["displayId"]
+                        display["configuration"] = track_conf["displays"][0]["displayId"]
+                    else:
+                        logging.debug("no display in track_conf for %s" % tId)
                     if track_conf.get("style_labels", None):
                         # TODO fix this: it should probably go in a renderer block (SvgFeatureRenderer) but still does not work
                         # TODO move this to per track displays?