Esempio n. 1
0
    def test_root_term(self):
        a = parse_obo_section(self.a1)
        self.assertEqual(a['id'], 'HP:0000001')
        self.assertEqual(a['name'], 'All')
        self.assertEqual(
            a['comment'],
            'Root of all terms in the Human Phenotype Ontology.'
        )
        self.assertEqual(a['definition'], '')
        self.assertEqual(a['is_obsolete'], False)
        self.assertEqual(a['replaced_by'], '')
        self.assertEqual(a['xref'], ['UMLS:C0444868'])

        term = HPOTerm(**a)
        self.assertEqual(
            term.index,
            1
        )
        self.assertEqual(
            term.id,
            'HP:0000001'
        )
        self.assertEqual(
            term.name,
            'All'
        )
Esempio n. 2
0
    def setUp(self):
        self.term = HPOTerm(**parse_obo_section(TEST_HPO))

        self.t1 = HPOTerm(id='HP:001', name='HP1')
        self.t1.Config.allow_mutation = True
        self.t1.information_content = {'omim': 1, 'gene': 11}
        self.t2 = HPOTerm(id='HP:002', name='HP2')
        self.t2.Config.allow_mutation = True
        self.t2.information_content = {'omim': 3, 'gene': 33}
        self.t3 = HPOTerm(id='HP:003', name='HP3')
        self.t3.Config.allow_mutation = True
        self.t3.information_content = {'omim': 2, 'gene': 22}
Esempio n. 3
0
 def setUp(self):
     self.term = HPOTerm(**parse_obo_section(TEST_HPO))