示例#1
0
def game_score():
    request_data = request.get_json()
    seq_a = str(request_data['seq_a'])
    seq_b = str(request_data['seq_b'])
    match = int(request_data['match'])
    mismatch = int(request_data['mismatch'])
    gap = int(request_data['gap'])

    # alignment_game = AlignmentGame(seq_a,seq_b,match,mismatch,gap)
    # alignment_game.calculate_score()
    # resp = {'result':{}}

    # resp['result']['game_score'] = alignment_game.get_score()
    # resp['result']['alignment_result'] = alignment_game.get_align_result()

    game_algorithm = AlignmentGame(seq_a, seq_b, match, mismatch, gap)

    game_executer = GameExecuter(game_algorithm)
    result = game_executer.get_results()

    resp = {'result': result}

    return jsonify(resp)
示例#2
0
    def setUp(self):

        self.algo = AlignmentGame('C--TA', 'CACTU', 2, -1, -1)
示例#3
0
 def setUp(self):
     self.algo = AlignmentGame('AACTU', 'AC', 4, -1, -1)
示例#4
0
 def setUp(self):
     self.algo = AlignmentGame('ACCC', 'AB-C', 2, -1, "a")
示例#5
0
 def setUp(self):
     self.algo = AlignmentGame('AB++', 'AB-C', 2, -1, -1)
示例#6
0
 def setUp(self):
     self.algo = AlignmentGame('AA-TU', '', 2, -1, -1)
示例#7
0
 def setUp(self):
     self.algo = AlignmentGame('CUTTAC', '-', 2, -1, -1)
示例#8
0
 def setUp(self):
     self.algo = AlignmentGame('AAAC', 'AAC-', 2, -1, -1)