Commits

Johannes Köster committed 88ad7d8

Added function to parse job properties.

Comments (0)

Files changed (1)

snakemake/utils.py

 
     def __str__(self):
         raise ValueError(self.errormsg)
+
+
+def read_job_properties(jobscript, prefix="# properties ="):
+    with open(jobscript) as jobscript:
+        for l in jobscript:
+            if l.startswith(prefix):
+                return json.loads([len(prefix):])