changeset 12:247e17ce504b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 4baeb144cafbb61ae0587cce731066129097c168-dirty
author fubar
date Sat, 20 Jan 2024 10:04:08 +0000
parents f5ce31c2f47d
children 1d86925dbb4c
files jbrowse2.py
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jbrowse2.py	Sat Jan 20 09:33:22 2024 +0000
+++ b/jbrowse2.py	Sat Jan 20 10:04:08 2024 +0000
@@ -1174,15 +1174,24 @@
 
         refName = None
         if data.get("defaultLocation", ""):
-            loc_match = re.search(r"^(\w.+):(\d+)\.+(\d+)$", data["defaultLocation"])
+            ddl = data["defaultLocation"]
+            loc_match = re.search(r"^(\w.+):(\d+)\.+(\d+)$", ddl)
             if loc_match:
                 refName = loc_match.group(1)
                 start = int(loc_match.group(2))
                 end = int(loc_match.group(3))
+            else:
+                logging.info(
+                    "@@@ regexp could not match contig:start..end in the supplied location %s - please fix"
+                    % ddl
+                )
         elif self.genome_name is not None:
             refName = self.genome_name
             start = 0
             end = 10000  # Booh, hard coded! waiting for https://github.com/GMOD/jbrowse-components/issues/2708
+            logging.info(
+                "@@@ no defaultlocation found for default session - suggest adding one!"
+            )
 
         if refName is not None:
             # TODO displayedRegions is not just zooming to the region, it hides the rest of the chromosome
@@ -1196,6 +1205,14 @@
                 }
             ]
 
+            logging.info(
+                "@@@ defaultlocation %s for default session"
+                % view_json["displayedRegions"]
+            )
+        else:
+            logging.info(
+                "@@@ no assembly name found default session - suggest adding one!"
+            )
         session_name = data.get("session_name", "New session")
         for key, value in mapped_chars.items():
             session_name = session_name.replace(value, key)