コード例 #1
0
ファイル: test_usage.py プロジェクト: GavinHuttley/pycogent
    def test_goldman_q_rna_pair(self):
        """Should return expected rate matrix"""
        seq1 = "AUGCAUGCAUGC"
        seq2 = "AAAUUUGGGCCC"

        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_rna_pair(seq1, seq2)
        self.assertFloatEqual(observed, expected)
コード例 #2
0
    def test_goldman_q_rna_pair(self):
        """Should return expected rate matrix"""
        seq1 = "AUGCAUGCAUGC"
        seq2 = "AAAUUUGGGCCC"

        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_rna_pair(seq1, seq2)
        self.assertFloatEqual(observed, expected)