def load(self):

        # Load resource kit
        self.resource_kit = ResourceKit(self.__res_kit_config)

        # Load the sample data
        self.sample_data = SampleSet(self.__sample_set_config)

        # Load the graph
        self.graph = Graph(self.__graph_config)

        # Load platform
        plat_module     = importlib.import_module(self.__plat_module)
        plat_class      = plat_module.__dict__[self.__plat_module]
        self.platform   = plat_class(self.pipeline_id, self.__platform_config, self.__final_output_dir)

        # Create datastore and scheduler
        self.datastore = Datastore(self.graph, self.resource_kit, self.sample_data, self.platform)
        self.scheduler = Scheduler(self.graph, self.datastore, self.platform)
Beispiel #2
0
# Test cycle checking algorithm
graph_file = "/home/alex/Desktop/projects/gap/test/test_runs/simple_success/graph.config"
graph = Graph(graph_file)

#print graph
rk_file = "/home/alex/Desktop/projects/gap/test/test_runs/simple_success/rk.config"
rk = ResourceKit(rk_file)

ss_file = "/home/alex/Desktop/projects/gap/test/test_runs/simple_success/ss.json"
ss = SampleSet(ss_file)

plat_file = "/home/alex/Desktop/projects/gap/test/test_runs/simple_success/plat.config"
plat = GooglePlatform("test_plat", plat_file, "gs://derp_test/dis_a_test_3/")

dstore = Datastore(graph, rk, ss, plat)

# Test graph splitting
t1 = graph.tasks["tool1_FASTQC"].module
dstore.set_task_input_args("tool1_FASTQC")

print t1.get_arguments()
print t1.get_argument("java")

input_files = dstore.get_task_input_files("tool1_FASTQC")
print input_files

for input_file in input_files:
    print "Before: %s" % input_file.get_path()
    input_file.update_path(new_dir="/data/tool1_FASTQC/")
    print "After: %s" % input_file.get_path()