diff jbrowse2.py @ 63:ac00dcfb5d1d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit f450a9a7bec7ae695a85a061bf59956b73196976
author fubar
date Thu, 28 Mar 2024 07:46:04 +0000
parents ab0d6782a95f
children 497fd2d27aa2
line wrap: on
line diff
--- a/jbrowse2.py	Thu Mar 28 04:51:06 2024 +0000
+++ b/jbrowse2.py	Thu Mar 28 07:46:04 2024 +0000
@@ -15,7 +15,7 @@
 import xml.etree.ElementTree as ET
 from collections import defaultdict
 
-logging.basicConfig(level=logging.DEBUG)
+logging.basicConfig(level=logging.INFO)
 log = logging.getLogger("jbrowse")
 
 JB2VER = "v2.10.3"
@@ -493,7 +493,7 @@
                     else:
                         try:
                             fl = urllib.request.urlopen(fapath + ".fai").readline()
-                        except:
+                        except Exception:
                             fl = None
                         if fl:  # is first row of the text fai so the first contig name
                             this_genome["genome_firstcontig"] = (
@@ -622,7 +622,6 @@
         # can be served - if public.
         # dsId = trackData["metadata"]["dataset_id"]
         # url = "%s/api/datasets/%s/display?to_ext=hic " % (self.giURL, dsId)
-        hic_path = trackData.get("hic_path", None)
         useuri = trackData["useuri"].lower() == "yes"
         if useuri:
             uri = data
@@ -682,7 +681,7 @@
         sampu = list(dict.fromkeys(samp))
         samples = [x.split(".")[0] for x in sampu]
         samples.sort()
-        logging.warn(
+        logging.debug(
             "$$$$ cmd=%s, mafss=%s samp=%s samples=%s"
             % (" ".join(cmd), mafss, samp, samples)
         )
@@ -737,7 +736,7 @@
         ]
         subprocess.check_call(cmd, cwd=self.outdir, stdout=gff3_unrebased)
         gff3_unrebased.close()
-        logging.warn("### blastxml to gff3 cmd = %s" % " ".join(cmd))
+        logging.debug("### blastxml to gff3 cmd = %s" % " ".join(cmd))
         return gff3_unrebased.name
 
     def add_blastxml(self, data, trackData, blastOpts, **kwargs):
@@ -749,7 +748,7 @@
                 cmd.append("--protein2dna")
             cmd.extend([os.path.realpath(blastOpts["parent"]), gff3])
             subprocess.check_call(cmd, cwd=self.outdir, stdout=gff3_rebased)
-            logging.warn("### gff3rebase cmd = %s" % " ".join(cmd))
+            logging.debug("### gff3rebase cmd = %s" % " ".join(cmd))
             gff3_rebased.close()
             # Replace original gff3 file
             shutil.copy(gff3_rebased.name, gff3)
@@ -1307,7 +1306,7 @@
                 track_types[tId] = track_conf["type"]
                 style_data = default_data["style"].get(tId, None)
                 if not style_data:
-                    logging.warn(
+                    logging.debug(
                         "### No style data in default data %s for %s"
                         % (default_data, tId)
                     )
@@ -1488,7 +1487,6 @@
             }
             for x in ass.findall("metadata/genomes/genome")
         ]
-        logging.warn("#!!! genomes=%s" % genomes)
         assref_name = jc.process_genomes(genomes)
 
         for track in ass.find("tracks"):