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

Changeset 50:f350467f9433 (2024-03-07)
Previous changeset 49:7e867ff86e44 (2024-03-07) Next changeset 51:e18f2d6c4dbe (2024-03-07)
Commit message:
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 44df75b3714aa9e02983e0b67ef43fc0eee4a8d4
modified:
jb2_webserver.py
jbrowse2.py
readme.rst
removed:
klBraLanc5.haps_combined.decontam.20230620.fasta.fa.gz
more
b
diff -r 7e867ff86e44 -r f350467f9433 jb2_webserver.py
--- a/jb2_webserver.py Thu Mar 07 00:27:48 2024 +0000
+++ b/jb2_webserver.py Thu Mar 07 04:51:43 2024 +0000
b
@@ -38,12 +38,11 @@
 import os
 import re
 import socketserver
-import ssl
 import webbrowser
 from http.server import SimpleHTTPRequestHandler
 
 
-DEFAULT_PORT = 8443
+DEFAULT_PORT = 8081
 
 
 def copy_byte_range(infile, outfile, start=None, stop=None, bufsize=16 * 1024):
@@ -154,17 +153,6 @@
 class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
     allow_reuse_address = True
 
-    def server_bind(self):
-        ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
-        ctx.load_cert_chain('cert.pem', 'key.pem')
-        socketserver.TCPServer.server_bind(self)
-        self.socket = ctx.wrap_socket(  self.socket, server_hostname = "127.0.0.1", server_side=False,)
-
-
-    def get_request(self):
-        (socket, addr) = socketserver.TCPServer.get_request(self)
-        socket.do_handshake()
-        return (socket, addr)
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(
@@ -184,16 +172,16 @@
     parser.add_argument(
         "--bind",
         default="127.0.0.1",
-        help="IP address to bind to (default: 127.0.0.1)",
+        help="IP address to bind to (default: 127.0.0.1 - use 0.0.0.0 to allow access on your network)",
     )
     args = parser.parse_args()
 
     handler = functools.partial(RangeRequestHandler, directory=args.root)
 
-    webbrowser.open(f"https://{args.bind}:{args.port}")
+    webbrowser.open(f"http://{args.bind}:{args.port}")
 
     with ThreadedTCPServer((args.bind, args.port), handler) as httpd:
         print(
-            f"Serving HTTPS on {args.bind} port {args.port} (https://{args.bind}:{args.port}/)"
+            f"Serving HTTP on {args.bind} port {args.port} (http://{args.bind}:{args.port}/)"
         )
         httpd.serve_forever()
b
diff -r 7e867ff86e44 -r f350467f9433 jbrowse2.py
--- a/jbrowse2.py Thu Mar 07 00:27:48 2024 +0000
+++ b/jbrowse2.py Thu Mar 07 04:51:43 2024 +0000
[
b'@@ -602,23 +602,17 @@\n         useuri = trackData["useuri"].lower() == "yes"\n         if useuri:\n             uri = data\n-            adapt = {\n-                "type": "HicAdapter",\n-                "hicLocation": uri,\n-                "locationType": "UriLocation",\n-            },\n         else:\n             uri = trackData["hic_url"]\n-            adapt = {\n-                "type": "HicAdapter",\n-                "hicLocation": uri,\n-            },\n         trackDict = {\n             "type": "HicTrack",\n             "trackId": tId,\n             "name": uri,\n             "assemblyNames": [self.genome_name],\n-            "adapter":  adapt,\n+            "adapter": {\n+                "type": "HicAdapter",\n+                "hicLocation": uri,\n+            },\n             "displays": [\n                 {\n                     "type": "LinearHicDisplay",\n@@ -787,21 +781,13 @@\n         useuri = trackData["useuri"].lower() == "yes"\n         if useuri:\n             url = data\n-            adapt = {\n-                "type": "BigWigAdapter",\n-                "bigWigLocation": {"uri": url},\n-                "locationType": "UriLocation",\n-            }\n         else:\n             url = "%s.bigwig" % trackData["label"]\n             # slashes in names cause path trouble\n             dest = os.path.join(self.outdir, url)\n             cmd = ["cp", data, dest]\n             self.subprocess_check_call(cmd)\n-            adapt = {\n-                "type": "BigWigAdapter",\n-                "bigWigLocation": {"uri": url},\n-            }\n+        bwloc = {"uri": url}\n         tId = trackData["label"]\n         trackDict = {\n             "type": "QuantitativeTrack",\n@@ -810,7 +796,10 @@\n             "assemblyNames": [\n                 self.genome_name,\n             ],\n-            "adapter":  adapt,\n+            "adapter": {\n+                "type": "BigWigAdapter",\n+                "bigWigLocation": bwloc,\n+            },\n             "displays": [\n                 {\n                     "type": "LinearWiggleDisplay",\n@@ -829,31 +818,12 @@\n         bindex = bam_index\n         if useuri:\n             url = data\n-            adapt =  {\n-                "type": "BamAdapter",\n-                "bamLocation": {"uri": url},\n-                "index": {\n-                    "location": {\n-                        "uri": bindex,\n-                       "locationType": "UriLocation",\n-                       }\n-                }\n-            }\n         else:\n             fname = "%s.bam" % trackData["label"]\n             dest = "%s/%s" % (self.outdir, fname)\n             url = fname\n             bindex = fname + \'.bai\'\n             self.subprocess_check_call(["cp", data, dest])\n-            adapt =  {\n-                "type": "BamAdapter",\n-                "bamLocation": {"uri": url},\n-                "index": {\n-                    "location": {\n-                        "uri": bindex,\n-                       }\n-                    }\n-                }\n             if bam_index is not None and os.path.exists(bam_index):\n                 if not os.path.exists(bindex):\n                     # bai most probably made by galaxy and stored in galaxy dirs, need to copy it to dest\n@@ -874,7 +844,15 @@\n             "trackId": tId,\n             "name": trackData["name"],\n             "assemblyNames": [self.genome_name],\n-            "adapter": adapt,\n+            "adapter": {\n+                "type": "BamAdapter",\n+                "bamLocation": {"uri": url},\n+                "index": {\n+                    "location": {\n+                        "uri": bindex,\n+                    }\n+                },\n+            },\n             "displays": [\n                 {\n                     "type": "LinearAlignmentsDisplay",\n@@ -893,29 +871,13 @@\n         bindex = cram_index\n         if useuri:\n             url = data\n-            adapt =  {\n-                "type": "CramAdapter",\n-                "cramLocation": {"uri": url},\n-                "craiLocation": {\n-                   '..b'                     "uri": url\n@@ -991,13 +952,7 @@\n                         "uri": url + ".tbi",\n                     }\n                 },\n-            }\n-        trackDict = {\n-            "type": "VariantTrack",\n-            "trackId": tId,\n-            "name": trackData["name"],\n-            "assemblyNames": [self.genome_name],\n-            "adapter": adapt,\n+            },\n             "displays": [\n                 {\n                     "type": "LinearVariantDisplay",\n@@ -1040,24 +995,17 @@\n         useuri = trackData["useuri"].lower() == "yes"\n         if useuri:\n             url = trackData["path"]\n-            adapter = {\n-                "type": "Gff3TabixAdapter",\n-                "gffGzLocation": {\n-                    "uri": url,\n-                    "locationType": "UriLocation",\n-                },\n-                "index": {\n-                    "location": {\n-                        "uri": url + ".tbi",\n-                        "locationType": "UriLocation",\n-                    }\n-                },\n-            }\n         else:\n             url = "%s.%s.gz" % (trackData["label"], ext)\n             dest = "%s/%s" % (self.outdir, url)\n             self._sort_gff(data, dest)\n-            adapter = {\n+        tId = trackData["label"]\n+        trackDict = {\n+            "type": "FeatureTrack",\n+            "trackId": tId,\n+            "name": trackData["name"],\n+            "assemblyNames": [self.genome_name],\n+            "adapter": {\n                 "type": "Gff3TabixAdapter",\n                 "gffGzLocation": {\n                     "uri": url,\n@@ -1067,14 +1015,7 @@\n                         "uri": url + ".tbi",\n                     }\n                 },\n-            }\n-        tId = trackData["label"]\n-        trackDict = {\n-            "type": "FeatureTrack",\n-            "trackId": tId,\n-            "name": trackData["name"],\n-            "assemblyNames": [self.genome_name],\n-            "adapter": adapt,\n+            },\n             "displays": [\n                 {\n                     "type": "LinearBasicDisplay",\n@@ -1096,24 +1037,16 @@\n         useuri = trackData["useuri"].lower() == "yes"\n         if useuri:\n             url = data\n-            adapt = {\n-                "type": "BedTabixAdapter",\n-                "bedGzLocation": {\n-                    "uri": url,\n-                    "locationType": "UriLocation",\n-                },\n-                "index": {\n-                    "location": {\n-                        "uri": url + ".tbi",\n-                        "locationType": "UriLocation",\n-                    }\n-                },\n-            }\n         else:\n             url = "%s.%s.gz" % (trackData["label"], ext)\n             dest = "%s/%s" % (self.outdir, url)\n             self._sort_bed(data, dest)\n-            adapt = {\n+        trackDict = {\n+            "type": "FeatureTrack",\n+            "trackId": tId,\n+            "name": trackData["name"],\n+            "assemblyNames": [self.genome_name],\n+            "adapter": {\n                 "type": "BedTabixAdapter",\n                 "bedGzLocation": {\n                     "uri": url,\n@@ -1123,13 +1056,7 @@\n                         "uri": url + ".tbi",\n                     }\n                 },\n-            }\n-        trackDict = {\n-            "type": "FeatureTrack",\n-            "trackId": tId,\n-            "name": trackData["name"],\n-            "assemblyNames": [self.genome_name],\n-            "adapter": adapt,\n+            },\n             "displays": [\n                 {\n                     "type": "LinearBasicDisplay",\n@@ -1179,7 +1106,11 @@\n             "trackId": tId,\n             "assemblyNames": passnames,\n             "name": tname,\n-            "adapter": adapt,\n+            "adapter": {\n+                "type": "PAFAdapter",\n+                "pafLocation": {"uri": url},\n+                "assemblyNames": passnames,\n+            },\n             # "displays": [\n             # {\n             # "type": "LinearSyntenyDisplay",\n'
b
diff -r 7e867ff86e44 -r f350467f9433 klBraLanc5.haps_combined.decontam.20230620.fasta.fa.gz
b
Binary file klBraLanc5.haps_combined.decontam.20230620.fasta.fa.gz has changed
b
diff -r 7e867ff86e44 -r f350467f9433 more
--- a/more Thu Mar 07 00:27:48 2024 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,58 +0,0 @@
-jbrowse2.py:2:80: E501 line too long (94 > 79 characters)
-jbrowse2.py:84:80: E501 line too long (124 > 79 characters)
-jbrowse2.py:85:80: E501 line too long (83 > 79 characters)
-jbrowse2.py:88:80: E501 line too long (83 > 79 characters)
-jbrowse2.py:102:80: E501 line too long (86 > 79 characters)
-jbrowse2.py:234:80: E501 line too long (87 > 79 characters)
-jbrowse2.py:261:80: E501 line too long (84 > 79 characters)
-jbrowse2.py:266:80: E501 line too long (84 > 79 characters)
-jbrowse2.py:267:80: E501 line too long (85 > 79 characters)
-jbrowse2.py:275:80: E501 line too long (85 > 79 characters)
-jbrowse2.py:283:80: E501 line too long (85 > 79 characters)
-jbrowse2.py:295:80: E501 line too long (84 > 79 characters)
-jbrowse2.py:348:80: E501 line too long (87 > 79 characters)
-jbrowse2.py:351:80: E501 line too long (83 > 79 characters)
-jbrowse2.py:357:80: E501 line too long (107 > 79 characters)
-jbrowse2.py:367:80: E501 line too long (118 > 79 characters)
-jbrowse2.py:392:80: E501 line too long (82 > 79 characters)
-jbrowse2.py:461:80: E501 line too long (80 > 79 characters)
-jbrowse2.py:554:80: E501 line too long (101 > 79 characters)
-jbrowse2.py:558:80: E501 line too long (90 > 79 characters)
-jbrowse2.py:560:80: E501 line too long (94 > 79 characters)
-jbrowse2.py:562:80: E501 line too long (94 > 79 characters)
-jbrowse2.py:563:80: E501 line too long (123 > 79 characters)
-jbrowse2.py:597:80: E501 line too long (133 > 79 characters)
-jbrowse2.py:605:80: E501 line too long (124 > 79 characters)
-jbrowse2.py:624:80: E501 line too long (87 > 79 characters)
-jbrowse2.py:783:80: E501 line too long (81 > 79 characters)
-jbrowse2.py:784:80: E501 line too long (97 > 79 characters)
-jbrowse2.py:790:80: E501 line too long (102 > 79 characters)
-jbrowse2.py:791:80: E501 line too long (101 > 79 characters)
-jbrowse2.py:792:80: E501 line too long (99 > 79 characters)
-jbrowse2.py:794:80: E501 line too long (84 > 79 characters)
-jbrowse2.py:830:80: E501 line too long (83 > 79 characters)
-jbrowse2.py:831:80: E501 line too long (93 > 79 characters)
-jbrowse2.py:837:80: E501 line too long (102 > 79 characters)
-jbrowse2.py:838:80: E501 line too long (101 > 79 characters)
-jbrowse2.py:839:80: E501 line too long (99 > 79 characters)
-jbrowse2.py:841:80: E501 line too long (86 > 79 characters)
-jbrowse2.py:843:80: E501 line too long (81 > 79 characters)
-jbrowse2.py:925:80: E501 line too long (82 > 79 characters)
-jbrowse2.py:1126:80: E501 line too long (84 > 79 characters)
-jbrowse2.py:1193:80: E501 line too long (81 > 79 characters)
-jbrowse2.py:1206:80: E501 line too long (80 > 79 characters)
-jbrowse2.py:1243:80: E501 line too long (146 > 79 characters)
-jbrowse2.py:1245:80: E501 line too long (83 > 79 characters)
-jbrowse2.py:1260:80: E501 line too long (123 > 79 characters)
-jbrowse2.py:1295:80: E501 line too long (107 > 79 characters)
-jbrowse2.py:1301:80: E501 line too long (106 > 79 characters)
-jbrowse2.py:1309:80: E501 line too long (80 > 79 characters)
-jbrowse2.py:1314:80: E501 line too long (87 > 79 characters)
-jbrowse2.py:1347:80: E501 line too long (82 > 79 characters)
-jbrowse2.py:1354:80: E501 line too long (80 > 79 characters)
-jbrowse2.py:1408:80: E501 line too long (86 > 79 characters)
-jbrowse2.py:1432:80: E501 line too long (117 > 79 characters)
-jbrowse2.py:1494:80: E501 line too long (94 > 79 characters)
-jbrowse2.py:1504:80: E501 line too long (88 > 79 characters)
-jbrowse2.py:1517:80: E501 line too long (86 > 79 characters)
-jbrowse2.py:1549:80: E501 line too long (80 > 79 characters)
b
diff -r 7e867ff86e44 -r f350467f9433 readme.rst
--- a/readme.rst Thu Mar 07 00:27:48 2024 +0000
+++ b/readme.rst Thu Mar 07 04:51:43 2024 +0000
b
@@ -2,9 +2,9 @@
 ==================
 
 Added Mar 3:
-- optional tracks at last for JB2
-    - dotted noodles from optional inputs now ignored without harm
-- autogenJB2.
+ - optional tracks at last for JB2
+ - dotted noodles from optional inputs now ignored without harm
+ - autogenJB2.
     - Takes a collection of bam/vcf etc and turns them into tracks in a normal JB2 history item.
     - Uses the JbrowseConnector, but the XML tool drives it from the contents of the collection.
     - Collection can be built from any source or with optional noodles in a WF