Пример #1
0
    def test_g(self):
        motif = 'G'
        motif_obj = IUPAC(motif)

        assert len(find_iupac('A', motif)) == 0
        assert len(motif_obj.find('A')) == 0
        assert motif_obj.calc_score('A') == 0

        assert len(find_iupac('C', motif)) == 1
        assert len(motif_obj.find('C')) == 1
        assert motif_obj.calc_score('C') == 0 # DOES NOT do RC

        assert len(find_iupac('G', motif)) == 1
        assert len(motif_obj.find('G')) == 1
        assert motif_obj.calc_score('G') == 1

        assert len(find_iupac('T', motif)) == 0
        assert len(motif_obj.find('T')) == 0
        assert motif_obj.calc_score('T') == 0

        assert len(find_iupac('N', motif)) == 0
        assert len(motif_obj.find('N')) == 0
        assert motif_obj.calc_score('N') == 0
Пример #2
0
    def test_g(self):
        motif = 'G'
        motif_obj = IUPAC(motif)

        assert len(find_iupac('A', motif)) == 0
        assert len(motif_obj.find('A')) == 0
        assert motif_obj.calc_score('A') == 0

        assert len(find_iupac('C', motif)) == 1
        assert len(motif_obj.find('C')) == 1
        assert motif_obj.calc_score('C') == 0  # DOES NOT do RC

        assert len(find_iupac('G', motif)) == 1
        assert len(motif_obj.find('G')) == 1
        assert motif_obj.calc_score('G') == 1

        assert len(find_iupac('T', motif)) == 0
        assert len(motif_obj.find('T')) == 0
        assert motif_obj.calc_score('T') == 0

        assert len(find_iupac('N', motif)) == 0
        assert len(motif_obj.find('N')) == 0
        assert motif_obj.calc_score('N') == 0
Пример #3
0
    def test_n(self):
        motif = 'N'
        motif_obj = IUPAC(motif)

        assert len(find_iupac('A', motif)) == 1
        assert len(motif_obj.find('A')) == 1
        assert motif_obj.calc_score('A') == 1

        assert len(find_iupac('C', motif)) == 1
        assert len(motif_obj.find('C')) == 1
        assert motif_obj.calc_score('C') == 1

        assert len(find_iupac('G', motif)) == 1
        assert len(motif_obj.find('G')) == 1
        assert motif_obj.calc_score('G') == 1

        assert len(find_iupac('T', motif)) == 1
        assert len(motif_obj.find('T')) == 1
        assert motif_obj.calc_score('T') == 1

        assert len(find_iupac('N', motif)) == 1
        assert len(motif_obj.find('N')) == 1
        assert motif_obj.calc_score('N') == 1
Пример #4
0
    def test_n(self):
        motif = 'N'
        motif_obj = IUPAC(motif)

        assert len(find_iupac('A', motif)) == 1
        assert len(motif_obj.find('A')) == 1
        assert motif_obj.calc_score('A') == 1

        assert len(find_iupac('C', motif)) == 1
        assert len(motif_obj.find('C')) == 1
        assert motif_obj.calc_score('C') == 1

        assert len(find_iupac('G', motif)) == 1
        assert len(motif_obj.find('G')) == 1
        assert motif_obj.calc_score('G') == 1

        assert len(find_iupac('T', motif)) == 1
        assert len(motif_obj.find('T')) == 1
        assert motif_obj.calc_score('T') == 1

        assert len(find_iupac('N', motif)) == 1
        assert len(motif_obj.find('N')) == 1
        assert motif_obj.calc_score('N') == 1