data/nora2012/make_processed_files.py
def write_cmatrix(cmatrix, filename):
    """
    Writes a square contact frequency matrix to a file, which will be the
    input for our structure calculation code.
    """
    with open(filename, 'w') as opf:
        for i in range(len(cmatrix)):
            for j in range(i+1, len(cmatrix)):
                opf.write('{}\t{}\t{}\n'.format(i, j, int(cmatrix[i,j])))

    Writes a square contact frequency matrix to a file, which will be the
    input for our structure calculation code.
    
Writes a square contact frequency matrix to a file, which will be the
input for our structure calculation code.
Writes a square contact frequency matrix to a file which will be the input for our structure calculation code .
def write_cmatrix(cmatrix, filename):
    with open(filename, 'w') as opf:
        for i in range(len(cmatrix)):
            for j in range(i+1, len(cmatrix)):
                opf.write('{}\t{}\t{}\n'.format(i, j, int(cmatrix[i,j])))
def write_cmatrix ( cmatrix , filename ) : with open ( filename , 'w' ) as opf : for i in range ( len ( cmatrix ) ) : for j in range ( i + 1 , len ( cmatrix ) ) : opf . write ( '{}\t{}\t{}\n' . format ( i , j , int ( cmatrix [ i , j ] ) ) )
Writes a square contact frequency matrix to a file, which will be the
input for our structure calculation code.
Writes a square contact frequency matrix to a file which will be the input for our structure calculation code .
"""
    Writes a square contact frequency matrix to a file, which will be the
    input for our structure calculation code.
    """
cmatrix
filename