Пример #1
0
    def prepare_specs(self):
        with self.yaml_path.open("r") as file:
            specs = yaml.safe_load(file)

        instruction_name = Util.check_instruction_type(
            specs, GalaxySimulationTool.__name__,
            SimulationInstruction.__name__[:-11])
        Util.check_export_format(specs, GalaxySimulationTool.__name__,
                                 instruction_name)

        Util.update_dataset_key(specs, GalaxySimulationTool.__name__)
        Util.check_paths(specs, "GalaxySimulationTool")
        Util.update_result_paths(specs, self.result_path, self.yaml_path)
Пример #2
0
    def _update_specs(self):
        with self.yaml_path.open('r') as file:
            specs = yaml.safe_load(file)

        ParameterValidator.assert_keys_present(specs.keys(),
                                               ["definitions", "instructions"],
                                               DatasetGenerationTool.__name__,
                                               "YAML specification")
        ParameterValidator.assert_all_in_valid_list(
            specs.keys(), ["definitions", "instructions", "output"],
            DatasetGenerationTool.__name__, "YAML specification")

        self._check_dataset(specs)
        self._check_instruction(specs)

        Util.update_dataset_key(specs, DatasetGenerationTool.__name__)
        Util.check_paths(specs, DatasetGenerationTool.__name__)
        Util.update_result_paths(specs, self.result_path, self.yaml_path)
Пример #3
0
    def prepare_specs(self):
        with self.yaml_path.open("r") as file:
            specs = yaml.safe_load(file)

        self.instruction_name = Util.check_instruction_type(
            specs, DataSimulationTool.__name__, self.expected_instruction)
        self.export_format = Util.check_export_format(
            specs, DataSimulationTool.__name__, self.instruction_name)

        ParameterValidator.assert_keys_present(specs["definitions"],
                                               ["datasets"],
                                               DataSimulationTool.__name__,
                                               "definitions/datasets")
        ParameterValidator.assert_type_and_value(
            specs['definitions']['datasets'], dict,
            DataSimulationTool.__name__, "definitions/datasets")

        self.dataset_name = "dataset"
        Util.update_dataset_key(specs, DataSimulationTool.__name__,
                                self.dataset_name)

        Util.check_paths(specs, DataSimulationTool.__name__)
        Util.update_result_paths(specs, self.result_path, self.yaml_path)