def test_common_ancestors(self): ontology = make_ontology() ca = ontology[31].common_ancestors(ontology[41]) assert ontology[12] in ca assert ontology[21] in ca assert ontology[11] in ca assert ontology[1] in ca assert ontology[31] in ca assert len(ca) == 5
def setUp(self): self.ontology = make_ontology() genes = make_genes(4) genes[0].hpo.add(self.ontology[1].index) genes[0].hpo.add(self.ontology[11].index) genes[1].hpo.add(self.ontology[1].index) genes[2].hpo.add(self.ontology[11].index) genes[3].hpo.add(self.ontology[31].index) omim = make_omim(5) omim[0].hpo.add(self.ontology[1].index) omim[0].hpo.add(self.ontology[11].index) omim[1].hpo.add(self.ontology[1].index) omim[2].hpo.add(self.ontology[11].index) omim[3].hpo.add(self.ontology[31].index) omim[4].hpo.add(self.ontology[41].index) self.ontology._genes = set(genes) self.ontology._omim_diseases = set(omim)
def setUp(self): Orpha.clear() self.ontology = make_ontology() self.orpha_diseases = make_orpha(5)
def setUp(self): Decipher.clear() self.ontology = make_ontology() self.decipher_diseases = make_decipher(5)
def setUp(self): self.ontology = make_ontology() self.genes = make_genes(5)
def setUp(self): Omim.clear() self.ontology = make_ontology() self.omim_diseases = make_omim(5)
def setUp(self): self.ontology = mo.make_ontology() self.ci = HPOSet([term for term in self.ontology])
def test_add_parent_term(self): ontology = mo.make_ontology() ci = BasicHPOSet([ontology[11], ontology[21], ontology[1]]) assert ci == set([ontology[21]])
def test_remove_duplicate_terms(self): ontology = mo.make_ontology() ci = BasicHPOSet([term for term in ontology] + [ontology[41]]) self.assertEqual(ci, set([ontology[41], ontology[13]]))
def test_init(self): ontology = mo.make_ontology() ci = BasicHPOSet([term for term in ontology]) self.assertEqual(ci, set([ontology[41], ontology[13]]))