Commits

Johannes Köster  committed 718c9a0

Added jobscript to setup.py, changed jobscript name to not start with jobid in order to be compatible to SGE.

  • Participants
  • Parent commits 61067f4

Comments (0)

Files changed (3)

     entry_points = {
         "console_scripts": ["snakemake = snakemake:main"]
     },
-    package_data = {'': ['*.css']},
+    package_data = {'': ['*.css', '*.sh']},
     classifiers = [
         "Development Status :: 5 - Production/Stable",
         "Environment :: Console",

File snakemake/dag.py

                 pass
         return dependencies
 
-    def bfs(self, direction, *jobs, stop=lambda job: False, yield_level=False):
+    def bfs(self, direction, *jobs, stop=lambda job: False):
         queue = list(jobs)
         visited = set(queue)
         while queue:
             raise MissingRuleException(targetfile)
         return jobs
 
+    def rule_dot2(self):
+        dag = dict()
+        job2node = dict()
+        for job, level in self.level_bfs(self.dependencies, *self.targetjobs):
+            node = (job.rule, level)
+            job2node[job] = node
+            for dep in self.dependencies[job]:
+                dag[job2node[job]].extend(
+                    job2node[dep] for dep in self.dependencies[job])
+        labels = dict((node, node[0]) for node in dag)
+        
+
     def dot(self):
         return self._dot(self.jobs)
 

File snakemake/executors.py

         workdir = os.getcwd()
         jobid = len(self.threads)
 
-        jobscript = os.path.join(self.tmpdir, "{}.sh".format(jobid))
+        jobscript = os.path.join(self.tmpdir, "jobscript.{}.sh".format(jobid))
         jobfinished = os.path.join(self.tmpdir, "{}.jobfinished".format(jobid))
         jobfailed = os.path.join(self.tmpdir, "{}.jobfailed".format(jobid))
         with open(jobscript, "w") as f: