def check_matchAnnot_out(match_out):
    """
    Check from matchAnnot.txt # of isoforms with scores are 4 or 5
    return total_n and ns, where
    total_n is total number of isoforms
    for i in (0,1,2,4,5) ns[i] is the number of isoforms with matchAnnot score i
    """
    lines = [l for l in open(match_out, 'r') if l.startswith("summary:")]
    total_n = 0
    ns = [0, 0, 0, 0, 0, 0]  # ns[i] number of isoforms scores == i
    for l in lines:
        if "isoforms read" in l:
            total_n = [int(s) for s in l.split() if s.isdigit()][0]

        for score in [5, 4, 3, 2, 1, 0]:
            if "isoforms scored %s" % score in l:
                ns[score] = [int(s.replace(',', '')) for s in l.split()
                             if s.replace(',', '').isdigit()][0]
    # sum(ns): total number of isoforms hit at least one gene
    # total_n: total number of isoforms read
    return total_n, ns