def check_configuration(cfg): """ checks the validity of configuration elements :param cfg: the configuration object (ConfigParser) :return: True or False """ # general job configuration if not utility.check_config(cfg, "job_config", ["name", "action_on_failure", "mapper_memory"]): return False if not utility.check_upload_config(cfg["job_config"], 'upload_script', 'script', 'script_local_location', 'script_s3_location'): return False # preprocessing script args if not utility.check_config(cfg, "script_arguments", ["manifest", "input_location", "output_location", "report_location", "region"]): return False if not utility.check_s3_region(cfg["script_arguments"]['region']): return False # user files # Note that the "files" item is optional if not utility.check_config(cfg, "user_script_config", []) and \ not utility.check_upload_config(cfg["user_script_config"], 'upload_user_files', 'script','user_files_local_location', 'user_files_s3_location', 'supporting_files', 'min_trim'): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", [ "name", "action_on_failure", "analysis_script", "analysis_script_s3_location", "upload_analysis_script" ]): return False if not utility.check_upload_config( config["job_config"], "upload_analysis_script", "analysis_script", "analysis_script_local_location", "analysis_script_s3_location"): return False if not utility.check_config(config, "spark_config", ["driver_memory", "executor_memory"]): return False if not utility.check_config(config, "script_arguments", [ "input_location", "output_location", "annotation_file", "region", "strand_specificity", "aligner_tool", "counter_tool" ]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False return True
def check_configuration(cfg): """ checks the validity of configuration elements :param cfg: the configuration object (ConfigParser) :return: True or False """ # general job configuration if not utility.check_config(cfg, "job_config", ["name", "action_on_failure", "mapper_memory"]): return False if not utility.check_upload_config(cfg["job_config"], 'upload_script', 'script', 'script_local_location', 'script_s3_location'): return False # preprocessing script args if not utility.check_config(cfg, "script_arguments", ["manifest", "input_location", "output_location", "report_location", "region"]): return False if not utility.check_s3_region(cfg["script_arguments"]['region']): return False # user files # Note that the "files" item is optional if not utility.check_config(cfg, "user_script_config", []) and \ not utility.check_upload_config(cfg["user_script_config"], 'upload_user_files', 'script', 'user_files_local_location', 'user_files_s3_location', 'supporting_files'): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", [ "name", "action_on_failure", "assembly_script", "assembly_script_s3_location", "upload_assembly_script" ]): return False if not utility.check_upload_config( config["job_config"], "upload_assembly_script", "assembly_script", "assembly_script_local_location", "assembly_script_s3_location"): return False if not utility.check_config(config, "spark_config", ["driver_memory", "executor_memory"]): return False if not utility.check_config(config, "script_arguments", [ "input_location", "output_location", "annotation_file", "enable_tiling", "enable_analysis", "region", "aligner_tool", "assembler_tool", "assembler_extra_args", "assembler_merge_extra_args" ]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", ["name", "action_on_failure", "downloader_script", "downloader_script_s3_location", "upload_downloader_script"]): return False if not utility.check_upload_config(config["job_config"], "upload_downloader_script", "downloader_script", "downloader_script_local_location", "downloader_script_s3_location"): return False if not utility.check_config(config, "script_arguments", ["accession_list", "output_location", "report_location", "region"]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", ["name", "action_on_failure", "splitter_script", "splitter_script_s3_location", "upload_splitter_script"]): return False if not utility.check_upload_config(config["job_config"], "upload_splitter_script", "splitter_script", "splitter_script_local_location", "splitter_script_s3_location"): return False if not utility.check_config(config, "script_arguments", ["manifest", "input_location", "output_location", "report_location", "region"]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", ["name", "action_on_failure", "analysis_script", "analysis_script_s3_location", "upload_analysis_script"]): return False if not utility.check_upload_config(config["job_config"], "upload_analysis_script", "analysis_script", "analysis_script_local_location", "analysis_script_s3_location"): return False if not utility.check_config(config, "spark_config", ["driver_memory", "executor_memory"]): return False if not utility.check_config(config, "script_arguments", ["input_location", "output_location", "annotation_file", "region", "strand_specificity", "aligner_tool", "counter_tool"]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False return True
def check_configuration(config): if not utility.check_config(config, "job_config", ["name", "action_on_failure", "classify_script", "classify_script_s3_location", "upload_classify_script"]): return False if not utility.check_upload_config(config["job_config"], "upload_classify_script", "classify_script", "classify_script_local_location", "classify_script_s3_location"): return False if not utility.check_config(config, "spark_config", ["driver_memory", "executor_memory"]): return False if not utility.check_config(config, "script_arguments", ["output_location", "region"]): return False if not utility.check_s3_region(config["script_arguments"]["region"]): return False if all(x not in config["script_arguments"] for x in ["input_location", "organism", "and_keywords", "or_keywords"]): print("At least one of the following script arguments are required: input_location, organism, and_keywords, " "or_keywords") return False return True