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

Changeset 101:e4ba5f1da6ef (2024-06-22)
Previous changeset 100:666c07b60cd2 (2024-06-21) Next changeset 102:099370690407 (2024-06-22)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit a1537aea75fc902d0e38c0b7c698830a939648b1-dirty
modified:
__pycache__/jbrowse2.cpython-312.pyc
jbrowse2.py
jbrowse2.xml
macros.xml
b
diff -r 666c07b60cd2 -r e4ba5f1da6ef __pycache__/jbrowse2.cpython-312.pyc
b
Binary file __pycache__/jbrowse2.cpython-312.pyc has changed
b
diff -r 666c07b60cd2 -r e4ba5f1da6ef jbrowse2.py
--- a/jbrowse2.py Fri Jun 21 23:49:10 2024 +0000
+++ b/jbrowse2.py Sat Jun 22 03:52:09 2024 +0000
[
@@ -403,6 +403,7 @@
 
 class JbrowseConnector(object):
     def __init__(self, outdir, jbrowse2path):
+        self.bpPerPx = 50
         self.trackCounter = 0  # to avoid name clashes
         self.assemblies = []  # these require more than a few line diff.
         self.assmeta = {}
@@ -1319,7 +1320,7 @@
          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 = 50 # this is tricky since browser window width is unknown - this seems a compromise that sort of works....
+        bpPerPx = self.bpPerPx # Browser window width is unknown and apparently cannot be figured 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)
@@ -1669,6 +1670,7 @@
             track_conf["category"] = track.attrib["cat"]
             track_conf["format"] = track.attrib["format"]
             track_conf["conf"] = etree_to_dict(track.find("options"))
+            logging
             keys = jc.process_annotations(track_conf)
             if keys:
                 for key in keys:
@@ -1702,6 +1704,7 @@
     ).text
     logging.debug("default_session=%s" % (json.dumps(default_session_data, indent=2)))
     jc.zipOut = root.find("metadata/general/zipOut").text == "true"
+    jc.bpPerPx = root.find("metadata/general/bpPerPx").text
     general_data = {
         "analytics": root.find("metadata/general/analytics").text,
         "primary_color": root.find("metadata/general/primary_color").text,
b
diff -r 666c07b60cd2 -r e4ba5f1da6ef jbrowse2.xml
--- a/jbrowse2.xml Fri Jun 21 23:49:10 2024 +0000
+++ b/jbrowse2.xml Sat Jun 22 03:52:09 2024 +0000
b
@@ -75,6 +75,7 @@
         <general>
             <defaultLocation>${jbgen.defaultLocation}</defaultLocation>
             <zipOut>${jbgen.zipOut}</zipOut>
+            <bpPerPx>${jbgen.bpPerPx}</bpPerPx>
             <analytics>${jbgen.enableAnalytics}</analytics>
             <primary_color>${jbgen.primary_color}</primary_color>
             <secondary_color>${jbgen.secondary_color}</secondary_color>
b
diff -r 666c07b60cd2 -r e4ba5f1da6ef macros.xml
--- a/macros.xml Fri Jun 21 23:49:10 2024 +0000
+++ b/macros.xml Sat Jun 22 03:52:09 2024 +0000
[
@@ -94,7 +94,7 @@
         </param>
     </xml>
     <xml name="general_options">
-        <section name="jbgen" title="General JBrowse Options [Advanced]" expanded="false">
+        <section name="jbgen" title="Advanced JBrowse Options: collections, locations, colours, font size and default bp per pixel" expanded="false">
             <conditional name="ucol">
                 <param name="formcoll" type="select" label="Convert a collection of track files rather than filling in the tool form" help="A collection of bam/vcf and other track types will be converted into a JBrowse2 automatically">
                     <option value="form" selected="true">Fill in the tool form to specify tracks for the output JBrowse2</option>
@@ -108,6 +108,7 @@
             <param name="zipOut" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Create a zip archive for downloading rather than viewing" help="Default is to make an interactive browser appear when the 'eye' icon is activated"/>
             <param name="defaultLocation" type="text" value="" label="Subset to display to new users" help="Initial subset to be shown for users who have never visited the browser before. Example: 'ctgA:1234..5678"/>
             <param name="session_name" type="text" value="New JBrowse2 session" label="Session name" help="Displayed at the top of the window"/>
+            <param name="bpPerPx" type="integer" value="50" label="Base pairs per display pixel for default view" help="Make the default window show more or less BP of sequence. For some reason not automatable in JB2, sorry"/>
             <param name="enableAnalytics" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Enable analytics" help="Will send usage data to Google Analytics, see https://github.com/GMOD/jbrowse-components/issues/1166"/>
             <param name="primary_color" type="color" value="#0D233F" label="Primary color">
                 <sanitizer>