当前位置: 首页>>代码示例>>Python>>正文


Python CharonSession.project_delete方法代码示例

本文整理汇总了Python中ngi_pipeline.database.classes.CharonSession.project_delete方法的典型用法代码示例。如果您正苦于以下问题:Python CharonSession.project_delete方法的具体用法?Python CharonSession.project_delete怎么用?Python CharonSession.project_delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngi_pipeline.database.classes.CharonSession的用法示例。


在下文中一共展示了CharonSession.project_delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_workflows

# 需要导入模块: from ngi_pipeline.database.classes import CharonSession [as 别名]
# 或者: from ngi_pipeline.database.classes.CharonSession import project_delete [as 别名]
    def test_workflows(self):
        config_file_path = locate_ngi_config()
        config = load_yaml_config(config_file_path)

        for workflow_name, workflow_dict in config.get("test_data", {}).get("workflows", {}).iteritems():
            # Load and rewrite config file as needed
            customize_config_dict = workflow_dict.get("customize_config")
            if customize_config_dict:
                config = update_dict(config, customize_config_dict)

            #self._install_test_files(workflow_dict)
            LOG.info('Starting test analysis pipeline for workflow "{}"'.format(workflow_name))
            try:
                local_files = workflow_dict["local_files"]
            except KeyError:
                raise ValueError("Required paths to input files for testing do not"
                                 "exist in config file (test_data.workflows."
                                 "{}.local_files); cannot proceed.".format(workflow_name))
            try:
                flowcell_path = local_files["flowcell"]
            except KeyError:
                raise ValueError("Path to flowcell is required and not specified "
                                 "in configuration file (test_data.workflows."
                                 "{}.local_files.flowcell); cannot proceed.".format(workflow_name))
            try:
                test_project = workflow_dict["test_project"]
                test_proj_id = test_project["project_id"]
                test_proj_name = test_project["project_name"]
                test_proj_bpa = test_project["bpa"]
            except KeyError as e:
                raise ValueError("Test project information is missing from config "
                                 "file (under test_data.workflows.{}.test_project "
                                 "({}); cannot proceed.".format(workflow_name, e.msg))
            charon_session = CharonSession(config=config)
            try:
                charon_session.project_delete(projectid=test_proj_id)
            except CharonError:
                pass
            charon_session.project_create(projectid=test_proj_id, name=test_proj_name,
                                          status="OPEN", best_practice_analysis=test_proj_bpa)

            process_demultiplexed_flowcells([flowcell_path], fallback_libprep="A",
                                            config=config)
开发者ID:Galithil,项目名称:ngi_pipeline,代码行数:45,代码来源:test_workflows.py

示例2: test_create_charon_entries_from_project

# 需要导入模块: from ngi_pipeline.database.classes import CharonSession [as 别名]
# 或者: from ngi_pipeline.database.classes.CharonSession import project_delete [as 别名]
    def test_create_charon_entries_from_project(self):
        # Create the NGIObjects
        project_obj = NGIProject(name=self.p_name,
                                 dirname=self.p_name,
                                 project_id=self.p_id,
                                 base_path=self.p_bp)
        sample_obj = project_obj.add_sample(name=self.s_id,
                                            dirname=self.s_id)
        libprep_obj = sample_obj.add_libprep(name=self.l_id,
                                             dirname=self.l_id)
        seqrun_obj = libprep_obj.add_seqrun(name=self.sr_id,
                                            dirname=self.sr_id)

        try:
        # Create them in the db
            create_charon_entries_from_project(project_obj)
        finally:
            charon_session = CharonSession()
            charon_session.project_delete(project_obj.project_id)
开发者ID:Galithil,项目名称:ngi_pipeline,代码行数:21,代码来源:test_filesystem.py


注:本文中的ngi_pipeline.database.classes.CharonSession.project_delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。