PEATDB/sequence_alignment.py
def calculate_sequence_identity_matrix(seqs):
    """Given a dictionary of aligned sequences, this function will calculate the % sequence identity matrix"""
    matrix={}
    names=sorted(seqs.keys())
    for name1 in names:
        matrix[name1]={}
        for name2 in names:
            print name1,name2
            matrix[name1][name2]=calc_identity(seqs[name1],seqs[name2])
        #
        s1=seqs[name1].replace('-','')
        print name1,len(s1)
    return matrix
Given a dictionary of aligned sequences, this function will calculate the % sequence identity matrix
Given a dictionary of aligned sequences, this function will calculate the % sequence identity matrix
Given a dictionary of aligned sequences this function will calculate the % sequence identity matrix
def calculate_sequence_identity_matrix(seqs):
    matrix={}
    names=sorted(seqs.keys())
    for name1 in names:
        matrix[name1]={}
        for name2 in names:
            print name1,name2
            matrix[name1][name2]=calc_identity(seqs[name1],seqs[name2])
        s1=seqs[name1].replace('-','')
        print name1,len(s1)
    return matrix
def calculate_sequence_identity_matrix ( seqs ) : matrix = { } names = sorted ( seqs . keys ( ) ) for name1 in names : matrix [ name1 ] = { } for name2 in names : print name1 , name2 matrix [ name1 ] [ name2 ] = calc_identity ( seqs [ name1 ] , seqs [ name2 ] ) s1 = seqs [ name1 ] . replace ( '-' , '' ) print name1 , len ( s1 ) return matrix
Given a dictionary of aligned sequences, this function will calculate the % sequence identity matrix
Given a dictionary of aligned sequences this function will calculate the % sequence identity matrix
"""Given a dictionary of aligned sequences, this function will calculate the % sequence identity matrix""" #
seqs