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


Python ProjectSummaryConnection.map_srm_to_name方法代码示例

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


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

示例1: test_2_make_note

# 需要导入模块: from scilifelab.db.statusdb import ProjectSummaryConnection [as 别名]
# 或者: from scilifelab.db.statusdb.ProjectSummaryConnection import map_srm_to_name [as 别名]
    def test_2_make_note(self):
        """Make a note subset by example flowcell and project"""
        s_con = SampleRunMetricsConnection(username=self.user, password=self.pw, url=self.url)
        fc_con = FlowcellRunMetricsConnection(username=self.user, password=self.pw, url=self.url)
        p_con = ProjectSummaryConnection(username=self.user, password=self.pw, url=self.url)
        paragraphs = sample_note_paragraphs()
        headers = sample_note_headers()
        samples = s_con.get_samples(self.examples["flowcell"], self.examples["project"])
        project = p_con.get_entry(self.examples["project"])
        samples = p_con.map_srm_to_name(self.examples["project"], fc_id=self.examples["flowcell"], use_bc_map=True)
        for k,v  in samples.items():
            s_param = parameters
            s = s_con.get_entry(k)
            s_param.update({key:s[srm_to_parameter[key]] for key in srm_to_parameter.keys()})
            fc = "{}_{}".format(s["date"], s["flowcell"])
            s_param["phix_error_rate"] = fc_con.get_phix_error_rate(str(fc), s["lane"])
            s_param['avg_quality_score'] = s_con.calc_avg_qv(s["name"])
            s_param['rounded_read_count'] = round(float(s_param['rounded_read_count'])/1e6,1) if s_param['rounded_read_count'] else None
            s_param['customer_name'] = project['samples'][v["sample"]].get('customer_name', None)

            if project:
                s_param['ordered_amount'] = p_con.get_ordered_amount(self.examples["project"])
                s_param['customer_reference'] = s_param.get('customer_reference', project['customer_reference'])
                s_param['uppnex_project_id'] = s_param.get('uppnex_project_id', project['uppnex_id'])
            s_param['success'] = sequencing_success(s_param, cutoffs)
            s_param.update({k:"N/A" for k in s_param.keys() if s_param[k] is None})
            make_note("{}.pdf".format(s["barcode_name"]), headers, paragraphs, **s_param)
开发者ID:hussius,项目名称:scilifelab,代码行数:29,代码来源:test_sample_delivery_note.py

示例2: test_4_srm_map

# 需要导入模块: from scilifelab.db.statusdb import ProjectSummaryConnection [as 别名]
# 或者: from scilifelab.db.statusdb.ProjectSummaryConnection import map_srm_to_name [as 别名]
 def test_4_srm_map(self):
     """Test getting a sample mapping from srm to project samples"""
     p_con = ProjectSummaryConnection(username=self.user, password=self.pw, url=self.url)
     samples = p_con.map_srm_to_name(self.examples["project"], fc_id=self.examples["flowcell"], use_ps_map=False, check_consistency=True)
     print samples
开发者ID:hussius,项目名称:scilifelab,代码行数:7,代码来源:test_project_status_note.py


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