def read_BED(path, last_col=False):
    """
    This function reads bed files.
    last_col=True: If an extra column for a score (e.g. replication timing or gene expression) is given
    This function returns a list of lists with the BED file information and the list of scores.
    """
    if not last_col:
        Data = []
        with open(path) as f:
            for line in f:
                Data.append(line.strip().split()[:6])
        return Data

    elif last_col:
        Data = []
        Score = []
        with open(path) as f:
            for line in f:
                Data.append(line.strip().split()[:6])
                Score.append(float(line.strip().split()[-1]))
        return Data, Score
    else:
        print("ERROR")