コード例 #1
0
ファイル: rosalind_gcon.py プロジェクト: orenlivne/euler
def gaff(f, score=ra.BLOSUM62, gap_init= -11, gap_ext= -1, debug=False):
    '''Main driver to solve the GAFF problem.'''
    x, y = ro.fafsa_values(f)
    d, (xx, yy) = ra.optimal_alignment(x, y, score, gap_init, gap_ext, debug=debug)
    print d
    print xx
    print yy
コード例 #2
0
ファイル: rosalind_sims.py プロジェクト: pombredanne/euler
def sims(f, debug=False, align="fit"):
    """Main driver to solve the SIMS problem."""
    (s, t), score, gap_score = ro.fafsa_values(f), ra.FixedCost(1, -1), -1
    d, (ss, tt) = ra.optimal_alignment(s, t, score, gap_score, gap_score, align=align, debug=debug)
    print d
    print ss
    print tt
コード例 #3
0
ファイル: rosalind_gcon.py プロジェクト: orenlivne/euler
def gcon(f, debug=False):
    '''Main driver to solve the GCON problem.'''
    x, y = ro.fafsa_values(f)
    d, (xx, yy) = ra.optimal_alignment(x, y, ra.BLOSUM62, -5, 0, debug=debug)
    print d
    print xx
    print yy
    return d
コード例 #4
0
ファイル: rosalind_loca.py プロジェクト: orenlivne/euler
def loca(f, debug=False):
    '''Main driver to solve the LOCA problem.'''
    x, y = ro.fafsa_values(f)
    d, (xx, yy) = ra.optimal_alignment(x, y, ra.PAM250, -5, -5, align='local', debug=debug, gap_symbol='')
    return ro.join_list((d, xx, yy), delimiter='\n')