def write_bed(rows, fname): """Write region coordinates to `fname` in BED format.""" with ngfrills.safe_write(fname, False) as outfile: i = 0 for i, row in enumerate(rows): outfile.write("\t".join(map(str, row)) + '\n') logging.info("Wrote %s with %d bins", fname, i + 1)
def write_bed(rows, fname): """Write region coordinates to `fname` in BED format.""" with ngfrills.safe_write(fname, False) as outfile: i = 0 for i, row in enumerate(rows): outfile.write("\t".join(map(str, row)) + '\n') ngfrills.echo("Wrote", fname, "with", i + 1, "bins")