# HG changeset patch
# User bgruening
# Date 1720082421 0
# Node ID 56f9a6e0fe80bfcc7454c7ce768825e64388478b
# Parent 0a532764dcfad535729a299639c4676ea6935c3a
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 566509061b742b73c8dd1a1db6813fbf6a7a3792
diff -r 0a532764dcfa -r 56f9a6e0fe80 __pycache__/jbrowse2.cpython-312.pyc
Binary file __pycache__/jbrowse2.cpython-312.pyc has changed
diff -r 0a532764dcfa -r 56f9a6e0fe80 jbrowse2.py
--- a/jbrowse2.py Tue Jul 02 05:08:17 2024 +0000
+++ b/jbrowse2.py Thu Jul 04 08:40:21 2024 +0000
@@ -707,7 +707,7 @@
}
categ = trackData["category"]
fname = tId
- dest = "%s/%s" % (self.outdir, fname)
+ dest = os.path.join(self.outdir, fname)
gname = trackData["assemblyNames"]
cmd = [
@@ -1074,7 +1074,7 @@
self.trackIdlist.append(tId)
def add_bed(self, data, ext, trackData):
- bedPlugin = {"name": "BedScorePlugin", "umdLoc": { "uri": "bedscoreplugin.js" } }
+ bedPlugin = {"name": "BedScorePlugin", "umdLoc": {"uri": "bedscoreplugin.js"}}
tId = trackData["label"]
categ = trackData["category"]
useuri = trackData["useuri"].lower() == "yes"
@@ -1084,16 +1084,16 @@
url = tId + ".gz"
dest = os.path.join(self.outdir, url)
self._sort_bed(data, dest)
- if True or trackData.get("usebedscore",None):
+ if True or trackData.get("usebedscore", None):
bedgzlocation = {
- "uri": url,
- "columnNames": ["chr","start","end","name","score"],
- "scoreColumn": "score",
- }
+ "uri": url,
+ "columnNames": ["chr", "start", "end", "name", "score"],
+ "scoreColumn": "score",
+ }
else:
bedgzlocation = {
- "uri": url,
- }
+ "uri": url,
+ }
trackDict = {
"type": "FeatureTrack",
"trackId": tId,
@@ -1118,7 +1118,7 @@
"renderer": {
"type": "SvgFeatureRenderer",
"color1": "jexl:customColor(feature)",
- },
+ },
},
{
"type": "LinearPileupDisplay",
@@ -1171,7 +1171,7 @@
if gname not in self.genome_names:
# ignore if already there - eg for duplicates among pafs.
asstrack, first_contig = self.make_assembly(gpath, gname, useuri)
- self.genome_names.append(copy.copy(gname))
+ self.genome_names.append(gname)
self.tracksToAdd[gname] = []
self.assemblies.append(copy.copy(asstrack))
self.ass_first_contigs.append(copy.copy(first_contig))
@@ -1225,7 +1225,7 @@
category = track["category"].replace("__pd__date__pd__", TODAY)
tt1 = ",/ :;\\"
tt2 = "______"
- labttab = str.maketrans(tt1,tt2)
+ labttab = str.maketrans(tt1, tt2)
for trackIndex, (
dataset_path,
dataset_ext,
@@ -1335,7 +1335,6 @@
else:
logging.warning("Do not know how to handle %s", dataset_ext)
# Return non-human label for use in other fields
- logging.debug("### processanno ext=%s trackstoadd = %s" % (dataset_ext, self.tracksToAdd))
yield outputTrackConfig["label"]
def add_default_session(self, default_data):
@@ -1344,8 +1343,8 @@
.add_default_view() and other configuration code adapted from
https://github.com/abretaud/tools-iuc/blob/jbrowse2/tools/jbrowse2/jbrowse2.py
"""
- # TODO using the default session for now, but check out session specs in the future https://github.com/GMOD/jbrowse-components/issues/2708
- bpPerPx = self.bpPerPx # Browser window width is unknown and default session cannot be used to figure it out in JB2 code so could be 200-2000+ pixels.
+ # TODO using the default session for now, but check out session specs in the future https://github.com/GMOD/jbrowse-components/issues/2708
+ bpPerPx = self.bpPerPx # Browser window width is unknown and default session cannot be used to figure it out in JB2 code so could be 200-2000+ pixels.
track_types = {}
with open(self.config_json_file, "r") as config_file:
config_json = json.load(config_file)
@@ -1374,7 +1373,7 @@
"style data for %s = %s"
% (tId, style_data)
)
- if style_data.get('type',None) == None:
+ if style_data.get('type', None) is None:
style_data["type"] = "LinearBasicDisplay"
if "displays" in track_conf:
disp = track_conf["displays"][0]["type"]
@@ -1396,20 +1395,20 @@
)
first = [x for x in self.ass_first_contigs if x[0] == gnome]
drdict = {
- "reversed": False,
- "assemblyName": gnome,
- }
+ "reversed": False,
+ "assemblyName": gnome,
+ }
if len(first) > 0:
[gnome, refName, end] = first[0]
drdict["refName"] = refName
drdict["start"] = 0
end = int(end)
- drdict["end"] = end
+ drdict["end"] = end
else:
ddl = default_data.get("defaultLocation", None)
if ddl:
loc_match = re.search(r"^([^:]+):([\d,]*)\.*([\d,]*)$", ddl)
- # allow commas like 100,000 but ignore as integer
+ # allow commas like 100,000 but ignore as integer
if loc_match:
refName = loc_match.group(1)
drdict["refName"] = refName
@@ -1425,7 +1424,7 @@
view_json = {
"type": "LinearGenomeView",
"offsetPx": 0,
- "bpPerPx" : bpPerPx,
+ "bpPerPx": bpPerPx,
"minimized": False,
"tracks": tracks_data
}
@@ -1656,9 +1655,9 @@
for x in trackfiles:
isBed = False
if x.attrib['ext'] == "bed":
- isBed = True
+ isBed = True
track_conf["label"] = "%s_%d" % (
- x.attrib["label"].replace(" ", "_").replace(",", "_").replace("/","_"),
+ x.attrib["label"].replace(" ", "_").replace(",", "_").replace("/", "_"),
trackI,
)
trackI += 1
diff -r 0a532764dcfa -r 56f9a6e0fe80 jbrowse2.xml
--- a/jbrowse2.xml Tue Jul 02 05:08:17 2024 +0000
+++ b/jbrowse2.xml Thu Jul 04 08:40:21 2024 +0000
@@ -8,7 +8,6 @@
jbrowse2
-
@@ -350,8 +349,7 @@
-
-
+
@@ -1152,7 +1150,7 @@
Browser tracks need a coordinate system, based on the reference genome, so that must be chosen before adding groups of tracks.
-At present, 10 Galaxy datatypes that can be turned into a track for display - in all cases, the selected reference genome must have been
+Many Galaxy datatypes can be turned into a track for display - in all cases, the selected reference genome must have been
used to generate the data:
bam
@@ -1198,6 +1196,17 @@
Annotation Tracks
-----------------
+
+BED
+~~~
+
+Bed feature annotation usually requires clicking on the feature.
+
+Bed files created by the *Bigwig extremes to bed features* tool have the score in column 5
+set to *1* for regions above the quantile and *-1* for regions below. It is possible to set an advanced option for each bed track, to use the bed score in column 5
+for the feature colour, giving red and blue using a JBrowse2 plugin, so they are easy to distinguish in a combined track.
+
+
MAF
~~~
diff -r 0a532764dcfa -r 56f9a6e0fe80 macros.xml
--- a/macros.xml Tue Jul 02 05:08:17 2024 +0000
+++ b/macros.xml Thu Jul 04 08:40:21 2024 +0000
@@ -108,7 +108,7 @@
-
+
@@ -240,7 +240,8 @@
-
+