Repository 'jbrowse2'
hg clone https://toolshed.g2.bx.psu.edu/repos/fubar/jbrowse2

Changeset 25:172acf9c7a53 (2024-02-03)
Previous changeset 24:fb6cc7bc24df (2024-02-03) Next changeset 26:e578621acb13 (2024-02-03)
Commit message:
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 50ecae3ea703a1b04501cc44f0d1fa6d714a6cc9
modified:
jbrowse2.py
b
diff -r fb6cc7bc24df -r 172acf9c7a53 jbrowse2.py
--- a/jbrowse2.py Sat Feb 03 11:49:56 2024 +0000
+++ b/jbrowse2.py Sat Feb 03 22:07:55 2024 +0000
[
@@ -459,9 +459,13 @@
                     genome_name  # first one for all tracks - other than paf
                 )
                 self.genome_firstcontig = None
-                fl = open(fapath, "r").readline().strip().split(">", 1)
+                fl = open(fapath, "r").readline().strip().split(">")
                 if len(fl) > 1:
-                    self.genome_firstcontig = fl[1].split().strip()
+                    fl = fl[1]
+                    if len(fl.split()) > 1:
+                        self.genome_firstcontig = fl.split()[0].strip()
+                    else:
+                        self.genome_firstcontig = fl
         if self.config_json.get("assemblies", None):
             self.config_json["assemblies"] += assemblies
         else: