本文整理汇总了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)