Beispiel #1
0
    def test_goldman_q_dna_pair(self):
        """Should return expected rate matrix"""
        seq1 = "ATGCATGCATGC"
        seq2 = "AAATTTGGGCCC"

        expected = array([[-(2/3.0), (1/3.0), (1/3.0), 0],
                          [(1/3.0), -(2/3.0), 0, (1/3.0)],
                          [(1/3.0), 0, -(2/3.0), (1/3.0)],
                          [0, (1/3.0), (1/3.0), -(2/3.0)]])
        observed = goldman_q_dna_pair(seq1, seq2)
        self.assertFloatEqual(observed, expected)
Beispiel #2
0
    def test_goldman_q_dna_pair(self):
        """Should return expected rate matrix"""
        seq1 = "ATGCATGCATGC"
        seq2 = "AAATTTGGGCCC"

        expected = array([[-(2 / 3.0), (1 / 3.0), (1 / 3.0), 0],
                          [(1 / 3.0), -(2 / 3.0), 0, (1 / 3.0)],
                          [(1 / 3.0), 0, -(2 / 3.0), (1 / 3.0)],
                          [0, (1 / 3.0), (1 / 3.0), -(2 / 3.0)]])
        observed = goldman_q_dna_pair(seq1, seq2)
        self.assertFloatEqual(observed, expected)