Exemple #1
0
    def test11_slice_motif(self):
        pfm = [
            [120, 0, 0, 0],
            [120, 0, 0, 0],
            [0, 60, 60, 0],
            [0, 0, 0, 120],
            [0, 0, 0, 120],
        ]

        m = Motif(pfm)
        m.to_consensus()

        # take slice
        m2 = m[1:-1]

        self.assertEqual("AST", m2.consensus.upper())
        self.assertEqual(pfm[1:-1], m2.pfm)
Exemple #2
0
 def test4_motif_consensus(self):
     """ Motif length """
     m = Motif(self.pfm)
     self.assertEqual("ACGTmskrwy", m.to_consensus())