def _bed_from_zscore(zscore):
    """
        Convert zscore file to bedfile for intersection processing. 
    """
    bed_lines = [] 
    rsids = [] 
    with open(zscore) as zscore_iter:
        for i, line in enumerate(zscore_iter):
            if i > 0:
                l_s = line.split()
                chrom = l_s[0]
                pos = l_s[1]
                rsid = l_s[2]
                rsids.append(rsid)
                bed_line = "chr" + chrom + "\t" + str(int(pos) - 1) + "\t" + str(pos) + "\t" + rsid + "\n"
                bed_lines.append(bed_line)
    return bed_lines, rsids