import re


def parsePlasClass(filename):
    """ Parse the file into lists of edge names, lengths, and PlasClass scores

    """

    with open(filename) as f:
        names = []
        lengths = []
        scores = []
        name = ''
        for line in f:
            splt = line.strip().split('\t')
            edge_name = splt[0]
            # convert name from fastg header format to single edge name
            name = re.split(':|;',edge_name)[0]
            names.append(name)
            length = int(name.split('_')[3])
            lengths.append(length)
            score = float(splt[1])
            scores.append(score)
    return names, lengths, scores