Example #1
0
    def load(self):
        # read the pipeline's config file:
        self.read_conf()

        # set self.conf by evoque-ing the steps template:
        steps_basename = os.path.basename(self.steps_syml)
        self.globals.update(self.sample.attrs_dict())
        self.globals["working_dir"] = self.sample.working_dir()
        self.globals["label"] = self.sample.label()
        self.globals["org"] = self.sample.org
        sy = superyaml({"config_file": steps_basename, "globals": self.globals, "domain": self.globals["domain"]})
        sy.load()
        self.conf = sy.config

        # create and add steps (steps are specified by conf sections that have a 'name' key) (fixme)
        for k, v in self.conf.items():
            try:
                if v.has_key("name"):
                    v["rnaseq"] = self
                    step = RnaseqStep(v)
                    # step.rnaseq=self
                    self.add_step(step)
            except AttributeError:
                pass
            except Exception:
                raise
import re
from yaml import load, dump
from superyaml import superyaml


h = {
    "config_file": "/users/vcassen/software/starflow/Temp/rnaseq/rnaseq.yml.template",
    "globals_file": "/users/vcassen/software/starflow/Temp/rnaseq/globals.yml",
}
sy = superyaml(h)
sy.load()
print "sy is\n%s" % dump(sy.config)