Commit 8ecfab11 authored by aknecht2's avatar aknecht2
Browse files

Adjusted workflow to correctly create and use generators.

parent e7e6c67e
......@@ -71,12 +71,10 @@ class Workflow(object):
self._load_workflow_jobs()
self._load_modules()
self._load_run_data()
self._load_generators()
# All required information is loaded, start queuing jobs
self._create_setup()
self._add_download()
self._add_align()
self._add_remove_duplicates()
self._add_peak_calling()
self._generate_jobs()
# Create pegasus important stuff
self._add_notify()
self._create_replica()
......@@ -184,6 +182,10 @@ class Workflow(object):
for genome in self.run_parser.get_genomes():
for gen_file_obj in genome.get_all_files():
self._add_genome_file(gen_file_obj)
for i, run in enumerate(self.run_parser.get_runs()):
if self.debug:
print "[LOADING SAMPLES] Run #%s" % (i,)
run.load_samples(self.mdb)
self.runs = self.run_parser.get_runs()
else:
self.err += self.run_parser.get_error_string()
......@@ -210,11 +212,13 @@ class Workflow(object):
self.jobs[output_file] = download_job
return
def _remove_unused_jobs(self, remove_jobs, required_jobs):
for job_name in remove_jobs:
if job_name not in required_jobs:
if self.dax.hasJob(self.jobs[job_name]):
self._remove_job(job_name)
def _load_generators(self):
self.align_gen = AlignGenerator(self.dax, self.jobs, self.files, self.mdb, self.modules["align"], self.workflow_jobs, self.basepath, debug=self.debug)
return
def _generate_jobs(self):
for run in self.runs:
self.align_gen.generate(run)
return
# When generating actual modules, IF results already exist for that job:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment