def write(sid0_list, sid1_list, pvalue_list, output_file):
    """
    Given three arrays of the same length [as per the output of epistasis(...)], writes a header and the values to the given output file.
    """
    with open(output_file, 'w') as out_fp:
        out_fp.write('{0}\t{1}\t{2}\n'.format('sid0', 'sid1', 'pvalue'))
        for i in range(len(pvalue_list)):
            out_fp.write('{0}\t{1}\t{2}\n'.format(sid0_list[i], sid1_list[i
                ], pvalue_list[i]))
