Previous changeset 48:460d5b6c5d98 (2024-03-06) Next changeset 50:f350467f9433 (2024-03-07) |
Commit message:
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a-dirty |
modified:
jb2_urlconf.py jbrowse2.py |
b |
diff -r 460d5b6c5d98 -r 7e867ff86e44 jb2_urlconf.py --- a/jb2_urlconf.py Wed Mar 06 10:37:49 2024 +0000 +++ b/jb2_urlconf.py Thu Mar 07 00:27:48 2024 +0000 |
[ |
@@ -1,3 +1,4 @@ + inconf = open('config.json', 'r').readlines() with open('config.json.local', 'w') as bak: bak.write(''.join(inconf)) @@ -7,10 +8,11 @@ ispath = False if row.strip().startswith(utag): ispath = True - parth = row.split(utag)[1].strip() - inconf[i] = '%s%s' % (urlbase, parth) + parth = row.split(utag)[1].strip().replace('"','').replace("'",'') + inconf[i] = '%s "%s%s"' % (utag, urlbase, parth) with open('config.json', 'w') as outconf: outconf.write(''.join(inconf)) + |
b |
diff -r 460d5b6c5d98 -r 7e867ff86e44 jbrowse2.py --- a/jbrowse2.py Wed Mar 06 10:37:49 2024 +0000 +++ b/jbrowse2.py Thu Mar 07 00:27:48 2024 +0000 |
[ |
b'@@ -602,17 +602,23 @@\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": {\n- "type": "HicAdapter",\n- "hicLocation": uri,\n- },\n+ "adapter": adapt,\n "displays": [\n {\n "type": "LinearHicDisplay",\n@@ -781,13 +787,21 @@\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- bwloc = {"uri": url}\n+ adapt = {\n+ "type": "BigWigAdapter",\n+ "bigWigLocation": {"uri": url},\n+ }\n tId = trackData["label"]\n trackDict = {\n "type": "QuantitativeTrack",\n@@ -796,10 +810,7 @@\n "assemblyNames": [\n self.genome_name,\n ],\n- "adapter": {\n- "type": "BigWigAdapter",\n- "bigWigLocation": bwloc,\n- },\n+ "adapter": adapt,\n "displays": [\n {\n "type": "LinearWiggleDisplay",\n@@ -818,12 +829,31 @@\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@@ -844,15 +874,7 @@\n "trackId": tId,\n "name": trackData["name"],\n "assemblyNames": [self.genome_name],\n- "adapter": {\n- "type": "BamAdapter",\n- "bamLocation": {"uri": url},\n- "index": {\n- "location": {\n- "uri": bindex,\n- }\n- },\n- },\n+ "adapter": adapt,\n "displays": [\n {\n "type": "LinearAlignmentsDisplay",\n@@ -871,13 +893,29 @@\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@@ -952,7 +991,13 @@\n "uri": url + ".tbi",\n }\n },\n- },\n+ }\n+ trackDict = {\n+ "type": "VariantTrack",\n+ "trackId": tId,\n+ "name": trackData["name"],\n+ "assemblyNames": [self.genome_name],\n+ "adapter": adapt,\n "displays": [\n {\n "type": "LinearVariantDisplay",\n@@ -995,17 +1040,24 @@\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- tId = trackData["label"]\n- trackDict = {\n- "type": "FeatureTrack",\n- "trackId": tId,\n- "name": trackData["name"],\n- "assemblyNames": [self.genome_name],\n- "adapter": {\n+ adapter = {\n "type": "Gff3TabixAdapter",\n "gffGzLocation": {\n "uri": url,\n@@ -1015,7 +1067,14 @@\n "uri": url + ".tbi",\n }\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 "displays": [\n {\n "type": "LinearBasicDisplay",\n@@ -1037,16 +1096,24 @@\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- trackDict = {\n- "type": "FeatureTrack",\n- "trackId": tId,\n- "name": trackData["name"],\n- "assemblyNames": [self.genome_name],\n- "adapter": {\n+ adapt = {\n "type": "BedTabixAdapter",\n "bedGzLocation": {\n "uri": url,\n@@ -1056,7 +1123,13 @@\n "uri": url + ".tbi",\n }\n },\n- },\n+ }\n+ trackDict = {\n+ "type": "FeatureTrack",\n+ "trackId": tId,\n+ "name": trackData["name"],\n+ "assemblyNames": [self.genome_name],\n+ "adapter": adapt,\n "displays": [\n {\n "type": "LinearBasicDisplay",\n@@ -1106,11 +1179,7 @@\n "trackId": tId,\n "assemblyNames": passnames,\n "name": tname,\n- "adapter": {\n- "type": "PAFAdapter",\n- "pafLocation": {"uri": url},\n- "assemblyNames": passnames,\n- },\n+ "adapter": adapt,\n # "displays": [\n # {\n # "type": "LinearSyntenyDisplay",\n' |