def lists_from_txt(name):
    """
    This function extracts the columns in the results file
    and writes them as lists.

    :param str name: name of the results file

    :returns: lists of the actual labels of the dataset,
              the labels given by the ice-ring classifier,
              label if there are strong ice-rings
    """
    filein = open(name, "r")

    #prepare lists
    ir_present = []
    ir_detected = []
    strong_rings = []

    #read lists from the results file
    for line in filein.readlines():
        ir_p, ir_d, count_ir, strong = map(int, line.split(","))
        ir_present.append(ir_p)
        ir_detected.append(ir_d)
        strong_rings.append(strong)

    return ir_present, ir_detected, strong_rings