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

Changeset 67:cefe9dbf1d80 (2024-03-28)
Previous changeset 66:bc10ad1dfb98 (2024-03-28) Next changeset 68:c4eb6a85db70 (2024-03-29)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
modified:
autogenJB2.py
b
diff -r bc10ad1dfb98 -r cefe9dbf1d80 autogenJB2.py
--- a/autogenJB2.py Thu Mar 28 11:53:38 2024 +0000
+++ b/autogenJB2.py Thu Mar 28 12:17:24 2024 +0000
[
@@ -5,10 +5,10 @@
 
 from jbrowse2 import JbrowseConnector as jbC
 
-logging.basicConfig(level=logging.debug)
+
+logging.basicConfig(level=logging.DEBUG)
 log = logging.getLogger("jbrowse")
 
-
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description="", epilog="")
     parser.add_argument("--sessName", help="Session name", default="AutoJBrowse")
@@ -62,7 +62,8 @@
                 outdir=args.outdir,
                 jbrowse2path=args.jbrowse2path,
             )
-            genomes=[
+            genomes = (
+                [
                     {
                         "path": x,
                         "label": genome_names[i],
@@ -74,6 +75,7 @@
                     }
                     for i, x in enumerate(genome_paths)
                 ],
+            )
             logging.warn("#!!! paths=%s, genomes=%s" % (genome_paths, genomes))
             assref_name = jc.process_genomes(genomes[0])
             default_session_data = {
@@ -89,7 +91,11 @@
             tnames = [x[2] for x in listtracks]
             texts = [x[1] for x in listtracks]
             for i, track in enumerate(listtracks):
-                track_conf = {"trackfiles": [], "category": "autogenerated", "assemblyNames": assref_name}
+                track_conf = {
+                    "trackfiles": [],
+                    "category": "autogenerated",
+                    "assemblyNames": assref_name,
+                }
                 tpath, trext, trackname = track[:3]
                 track_conf["dataset_id"] = trackname
                 useuri = "no"
@@ -165,7 +171,8 @@
                     for key in keys:
                         if trext in [
                             "bigwig",
-                            "gff", "gff3",
+                            "gff",
+                            "gff3",
                             "vcf",
                             "maf",
                         ]:
@@ -179,9 +186,9 @@
                             if trext == "vcf":
                                 ttype = "LinearVariantDisplay"
                             style_json = {
-                            "type": ttype,
-                            "trackShowLabels": False,
-                            "trackShowDescriptions": False
+                                "type": ttype,
+                                "trackShowLabels": False,
+                                "trackShowDescriptions": False,
                             }
                             default_session_data["style"][key] = style_json
             # general_data = {
@@ -196,11 +203,12 @@
             trackconf = jc.config_json.get("tracks", [])
             for gnome in jc.genome_names:
                 trackconf += jc.tracksToAdd[gnome]
+            logging.warn(
+                "^^%% adding trackconf=%s for gnome %s" % (trackconf, gnome)
+            )
             jc.config_json["tracks"] = trackconf
             jc.write_config()
-            default_session_data.update(
-                {"session_name": sessName}
-            )
+            default_session_data.update({"session_name": sessName})
             track_conf.update(default_session_data)
             jc.add_default_session(default_session_data)
             # jc.text_index() not sure what broke here.
@@ -208,4 +216,3 @@
         sys.stderr.write(
             "!!!! Collection has no suitable trackfiles for autogenJB2 - nothing to process"
         )
-