當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。