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


Python Criteria.tag_feature_to_all_diseases方法代码示例

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


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

示例1: test_tag_feature_to_all_diseases

# 需要导入模块: from criteria.helper.criteria import Criteria [as 别名]
# 或者: from criteria.helper.criteria.Criteria import tag_feature_to_all_diseases [as 别名]
    def test_tag_feature_to_all_diseases(self):
        config = IniParser().read_ini(MY_INI_FILE)
        section = "is_gene_in_mhc"
        feature_id = 'ENSG00000229281'
        result = Criteria.tag_feature_to_all_diseases(feature_id, section, config, {})
        result_diseases = sorted(list(result['ENSG00000229281'].keys()))
        (core_disease, other_disease) = CriteriaManager.get_available_diseases()
        available_diseases = sorted(core_disease + other_disease)
        self.assertEqual(result_diseases, available_diseases)

        section = "is_marker_in_mhc"
        feature_id = 'rs6679677'
        result = Criteria.tag_feature_to_all_diseases(feature_id, section, config, {})
        result_diseases = sorted(list(result['rs6679677'].keys()))
        (core_disease, other_disease) = CriteriaManager.get_available_diseases()
        available_diseases = sorted(core_disease + other_disease)
        self.assertEqual(result_diseases, available_diseases)
开发者ID:premanand17,项目名称:django-criteria,代码行数:19,代码来源:test_criteria.py


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