def setUp(self): aligner = PairwiseAligner() aligner.internal_open_gap_score = -1 aligner.internal_extend_gap_score = -0.0 aligner.match_score = +1 aligner.mismatch_score = -1 aligner.mode = "local" self.aligner = aligner
def perform_randomized_tests(n=1000): """Perform randomized tests and compare to pslMap. Run this function to perform 8 x n mappings for alignments of randomly generated sequences, get the alignment in PSL format, and compare the result to that of pslMap. """ aligner = PairwiseAligner() aligner.internal_open_gap_score = -1 aligner.internal_extend_gap_score = -0.0 aligner.match_score = +1 aligner.mismatch_score = -1 aligner.mode = "local" for i in range(n): nBlocks1 = random.randint(1, 10) nBlocks2 = random.randint(1, 10) test_random(aligner, nBlocks1, nBlocks2, "+", "+") test_random(aligner, nBlocks1, nBlocks2, "+", "-") test_random(aligner, nBlocks1, nBlocks2, "-", "+") test_random(aligner, nBlocks1, nBlocks2, "-", "-") test_random_sequences("+", "+") test_random_sequences("+", "-") test_random_sequences("-", "+") test_random_sequences("-", "-")