def write_result_yaml(self): self.parameters["processed"] = "true" with open(os.path.join(self.LOCAL_RES_DIR, 'data.yml'), 'w') as outfile: outfile.write(yaml.dump(self.parameters, default_flow_style=True)) path_to_zip = os.path.dirname(self.OUT_ZIP) if not os.path.exists(path_to_zip): os.makedirs(path_to_zip) BiblioSpecLib.zip_dir(self.LOCAL_RES_DIR, self.OUT_ZIP)
def set_up(self, assay_library_yaml): with open(assay_library_yaml, 'r') as stream: self.parameters = yaml.load(stream) self.JOB_ID = int(self.parameters["bfabric_external_job_id"]) self.LOCAL_WORK_DIR = "{}.{}".format(self.LOCAL_WORK_DIR, self.JOB_ID) if not os.path.exists(self.LOCAL_WORK_DIR): os.makedirs(self.LOCAL_WORK_DIR) self.LOCAL_RES_DIR = "{}.{}".format(self.LOCAL_RES_DIR, self.JOB_ID) if not os.path.exists(self.LOCAL_RES_DIR): os.makedirs(self.LOCAL_RES_DIR) self.logger = BiblioSpecLib.setUpLogging(os.path.join(self.LOCAL_RES_DIR, "fgcz_test_yaml.log")) self.OUT_ZIP = replaceUriHeader(self.parameters["output_zip"]) self.LIST_OF_DAT_FILES = self.parameters["input_mascot_dat_file"] self.MASCOT_DATABASE_LOCATION = self.parameters['mascot_database_location'] self.MIN_N = self.parameters['minN'] self.MAX_N = self.parameters['maxN'] self.check_dat_files()