Exemple #1
0
    def test_shortcuts(self):
        protein('gGGGGG-PPPPP')
        dna('ACGTRYSWKMBDHVN')
        dna('t')
        dna('actgta')
        dna('acgtrysw-kmb-dhvn')

        rna('ACUUUUU')
Exemple #2
0
    def test_shortcuts(self):
        protein("gGGGGG-PPPPP")
        dna("ACGTRYSWKMBDHVN")
        dna("t")
        dna("actgta")
        dna("acgtrysw-kmb-dhvn")

        rna("ACUUUUU")
Exemple #3
0
    def test_reverse_complement(self):
        s = dna('GGGGaaaaaaaatttatatat')
        rc = s.reverse_complement()
        self.assertEqual(rc, dna('atatataaattttttttCCCC'))

        self.assertEqual(
            dna('ACGTRYSWKMBDHVN').reverse_complement(),
            dna('NBDHVKMWSRYACGT'))

        self.assertRaises(ValueError, protein('G').reverse_complement)
Exemple #4
0
    def test_reverse_complement(self):
        s = dna("GGGGaaaaaaaatttatatat")
        rc = s.reverse_complement()
        self.assertEqual(rc, dna("atatataaattttttttCCCC"))

        self.assertEqual(
            dna("ACGTRYSWKMBDHVN").reverse_complement(),
            dna("NBDHVKMWSRYACGT"))

        self.assertRaises(ValueError, protein("G").reverse_complement)