def write_gene_list(output_file, genelist):
    """Save a list of genes to a file, one gene per line.

    Arguments:
    output_file -- path to which the output file should be written
    genelist -- iterable of genes that should be included in the output file

    """
    with open(output_file, 'w') as out_f:
        for gene in genelist:
            out_f.write(gene + '\n')
