示例#1
0
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)
示例#2
0
def save_sample_component_to_db(sample_component):
    return mongo_interface.dump_sample_component_info(sample_component)
示例#3
0
def post_sample_component(sample_component):
    return mongo_interface.dump_sample_component_info(sample_component)