예제 #1
0
    def test_get_relative_gene_2(self):
        """Verify get_relative_gene() returns None when expected."""

        rel_geneid = annotation.get_relative_gene(self.alchemist,
                                                  "Trixie_CDS_1", -1)

        self.assertEqual(rel_geneid, None)
예제 #2
0
    def test_get_relative_gene_1(self):
        """Verify get_relative_gene() returns GeneID string as expected."""

        rel_geneid = annotation.get_relative_gene(self.alchemist,
                                                  "Trixie_CDS_2", -1)

        self.assertEqual(rel_geneid, "Trixie_CDS_1")
예제 #3
0
 def test_get_relative_gene_2(self, mock_select):
     """Verify get_relative_gene() raises ValueError at bad GeneID input."""
     with self.assertRaises(ValueError):
         annotation.get_relative_gene(self.mock_alchemist, "BAD_GENE", -1)
예제 #4
0
    def test_get_relative_gene_1(self, mock_select):
        """Verify select() function calls of get_relative_gene()."""
        annotation.get_relative_gene(self.mock_alchemist, "Trixie_CDS_2", -1)

        mock_select.assert_any_call([self.geneid_column])
예제 #5
0
 def test_get_relative_gene_3(self):
     """Verify get_relative_gene() raises ValueError from bad GeneID."""
     with self.assertRaises(ValueError):
         annotation.get_relative_gene(self.alchemist, "NOT A GENE", 8675309)