diff jbrowse2.py @ 34:2893ef33fba9 draft

planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd
author fubar
date Sun, 25 Feb 2024 04:18:53 +0000
parents fe48ed5810bd
children 15da358c3108
line wrap: on
line diff
--- a/jbrowse2.py	Sat Feb 24 10:44:01 2024 +0000
+++ b/jbrowse2.py	Sun Feb 25 04:18:53 2024 +0000
@@ -17,7 +17,7 @@
 logging.basicConfig(level=logging.INFO)
 log = logging.getLogger("jbrowse")
 
-JB2VER = "v2.10.1"
+JB2VER = "v2.10.2"
 # version pinned for cloning
 
 TODAY = datetime.datetime.now().strftime("%Y-%m-%d")
@@ -450,7 +450,7 @@
             if len(genome_name.split()) > 1:
                 genome_name = genome_name.split()[0]
                 # spaces and cruft break scripts when substituted
-            if genome_name not  in self.genome_names:
+            if genome_name not in self.genome_names:
                 # ignore dupes - can have multiple pafs with same references?
                 fapath = genome_node["path"]
                 assem = self.make_assembly(fapath, genome_name)
@@ -1015,16 +1015,16 @@
     def add_paf(self, data, trackData, pafOpts, **kwargs):
         tname = trackData["name"]
         tId = trackData["label"]
-        pgnames = [x.strip() for x in pafOpts["genome_label"].split(',')]
-        pgpaths =  [x.strip() for x in pafOpts["genome"].split(',')]
-        passnames = [self.genome_name] # always first
+        pgnames = [x.strip() for x in pafOpts["genome_label"].split(",")]
+        pgpaths = [x.strip() for x in pafOpts["genome"].split(",")]
+        passnames = [self.genome_name]  # always first
         for i, gname in enumerate(pgnames):
             if len(gname.split()) > 1:
                 gname = gname.split()[0]
                 # trouble from spacey names in command lines avoidance
                 if gname not in self.genome_names:
                     passnames.append(gname)
-                   # ignore if already there - eg for duplicates among pafs.
+                    # ignore if already there - eg for duplicates among pafs.
                     asstrack = self.make_assembly(pgpaths[i], gname)
                     self.genome_names.append(gname)
                     if self.config_json.get("assemblies", None):
@@ -1126,7 +1126,7 @@
             # Unsanitize labels (element_identifiers are always sanitized by Galaxy)
             for key, value in mapped_chars.items():
                 track_human_label = track_human_label.replace(value, key)
-            track_human_label = track_human_label.replace(" ","_")
+            track_human_label = track_human_label.replace(" ", "_")
             outputTrackConfig = {
                 "category": category,
                 "style": {},
@@ -1149,7 +1149,7 @@
                     dataset_ext,
                     outputTrackConfig,
                 )
-            elif dataset_ext in ("hic","juicebox_hic"):
+            elif dataset_ext in ("hic", "juicebox_hic"):
                 self.add_hic(
                     dataset_path,
                     outputTrackConfig,
@@ -1540,9 +1540,7 @@
     default_session_data["session_name"] = root.find(
         "metadata/general/session_name"
     ).text
-    jc.zipOut =  root.find(
-        "metadata/general/zipOut"
-    ).text == "true"
+    jc.zipOut = root.find("metadata/general/zipOut").text == "true"
     general_data = {
         "analytics": root.find("metadata/general/analytics").text,
         "primary_color": root.find("metadata/general/primary_color").text,