Example #1
0
 def test_scores_article(self):
     """ Test the scores function. """
     obio = OboIO()
     terms = obio.get_graph(GOFILE)
     gsgo = GsesameGO(terms)
     output = 0.7727272727272726
     self.assertEqual(output, gsgo.scores('0043229','0043231'))
Example #2
0
 def test_scores(self):
     """ Test the scores function. """
     obio = OboIO()
     terms = obio.get_graph(GOFILE2)
     gsgo = GsesameGO(terms)
     output = 0.8259052924791086
     self.assertEqual(output, gsgo.scores('0043229','0043231'))
Example #3
0
 def test_semantic_value_article(self):
     """ Test the semantic_value function. """
     obio = OboIO()
     terms = obio.get_graph(GOFILE)
     gsgo = GsesameGO(terms)
     output = 3.4000000000000004
     self.assertEqual(output, gsgo.semantic_value('0043229'))
     output = 4.520000000000001
     self.assertEqual(output, gsgo.semantic_value('0043231'))
Example #4
0
 def test_semantic_value(self):
     """ Test the semantic_value function. """
     obio = OboIO()
     terms = obio.get_graph(GOFILE2)
     gsgo = GsesameGO(terms)
     output = 4.7440000000000015
     self.assertEqual(output, gsgo.semantic_value('0043229'))
     output = 5.5952
     self.assertEqual(output, gsgo.semantic_value('0043231'))