def bedtxt2dict(pybed, strand_col=5):
    """
    convert bed object to a dict with keys in bed file

    From
    chr123  123  123 +
    To
    ('chr123', 123, '+') -> 1

    :param pybed: bed object
    :return:
    """
    ret_dict = {}
    for t in pybed:
        ret = str(t).strip().split('\t')
        key = (ret[0], int(ret[1]), ret[strand_col])
        ret_dict[key] = 1
    return ret_dict