def save_sample_component(sample_component_dict, file_yaml): config = load_config() if (len(file_yaml.split("/")) >= 2 and os.path.isdir("/".join(file_yaml.split("/")[:-1])) is False): os.mkdir("/".join(file_yaml.split("/")[:-1])) if config["use_mongodb"]: sample_component_dict = mongo_interface.dump_sample_component_info( sample_component_dict) with open(file_yaml, "w") as file_handle: yaml.dump(sample_component_dict, file_handle)
def save_sample_component_to_db(sample_component): return mongo_interface.dump_sample_component_info(sample_component)
def post_sample_component(sample_component): return mongo_interface.dump_sample_component_info(sample_component)