def main(argv): pam250 = table.scoring(argv[0]) lines = fasta.read_ordered(argv[1]) result = strings.local_alignment(lines[0], lines[1], pam250) print result[0] print '\n'.join(r.translate(None, '-') for r in result[1:])
def main(argv): blosom62 = table.scoring(argv[0]) s, t = fasta.read_ordered(argv[1]) result = strings.affine_gap_alignment(s, t, blosom62) print result[0] print '\n'.join(result[1:])
def main(argv): s, t = fasta.read_ordered(argv[0]) m, n = len(s), len(t) T1 = strings.mismatch_alignment_table(s, t) T2 = strings.mismatch_alignment_table(s[::-1], t[::-1]) total = 0 for i in xrange(1, m + 1): for j in xrange(1, n + 1): total += T1[i - 1][j - 1] + T2[m - i][n - j] + ( 1 if s[i - 1] == t[j - 1] else -1) print T1[m][n] print total
def main(argv): s, t = fasta.read_ordered(argv[0]) result = strings.fitting_alignment(s, t) print result[0] print '\n'.join(result[1:])
def main(argv): s, t = fasta.read_ordered(argv[0]) print ' '.join(str(i) for i in strings.find_indices_of_subsequence(s, t))
def main(argv): dna_strings = fasta.read_ordered(argv[0]) results = strings.quadruple_alignment(*dna_strings) print results[0] print '\n'.join(results[1:])
def main(argv): strings = fasta.read_ordered(argv[0]) matrix = distance.p_matrix(strings) print '\n'.join([' '.join(['%0.5f' % col for col in row]) for row in matrix])
def main(argv): s, t = fasta.read_ordered(argv[0]) result = strings.semi_global_alignment(s, t) print result[0] print '\n'.join(r for r in result[1:])
def main(argv): blosom62 = table.scoring(argv[0]) s, t = fasta.read_ordered(argv[1]) m, n = len(s), len(t) print strings.alignment_table(s, t, blosom62)[m][n]
def main(argv): s, t = fasta.read_ordered(argv[0]) m, n = len(s), len(t) C = strings.longest_common_subsequence_table(s, t) print m + n - (2 * C[m][n])
def main(argv): s, t = fasta.read_ordered(argv[0]) print strings.count_basic_alignments(s, t) % 134217727