def write_changes(changes_file, changes):
    """Write SVs and SNPs to a file"""
    with open(changes_file, 'w') as outfile:
        header = '\t'.join(['type', 'ref_idx', 'alt_idx', 'size', 'ref',
            'alt', '\n'])
        outfile.write(header)
        for change in changes:
            change = '\t'.join(map(str, change)) + '\n'
            outfile.write(change)
