def make_output_file(region,region_info,outdir,cell_line_info,genome_info):
    outfile_name = "%s/%s_pop_summary.csv"%(outdir,region_info.name)

    FOUT = open(outfile_name,'w')
    FOUT.write("indiv,cp,pop,cell lines fixed, cell lines in Nitrogen,coverage\n")

    for indiv,cp in region_info.cps_by_genome.iteritems():
        pop = region_info.pop_by_genome[indiv]
        output = indiv in cell_line_info and cell_line_info[indiv] or ""
        output = "%s,%d,%s,%s,%f\n"%(indiv,cp,pop,output,genome_info.genomes[indiv].coverage)
        FOUT.write(output)
        print output