def fromLines(self, lines):
        '''parse from cuffcompare output.'''
        self.is_empty = True

        for line in lines:
            if line.startswith("#"):
                d = line[1:-1].strip()
                if d.startswith("Query"):
                    self.query, self.query_loci, self.query_multi_exon = map(int, re.match(
                        "Query mRNAs :\s+(\d+)\s+in\s+(\d+)\s+loci\s+\((\d+)", d).groups())
                elif d.startswith("Reference"):
                    self.reference, self.reference_loci, self.reference_multi_exon = map(int, re.match(
                        "Reference mRNAs :\s+(\d+)\s+in\s+(\d+)\s+loci\s+\((\d+)", d).groups())
                elif d.startswith("("):
                    self.loci_multi_exon, self.loci_transcripts = re.match(
                        "\((\d+) multi-transcript loci, ~(\S+)", d).groups()
                    self.loci_multi_exon = int(self.loci_multi_exon)
                    self.loci_transcripts = float(self.loci_transcripts)
                continue

            line = line[:-1].strip()
            if not line:
                continue

            try:
                tag, data = line.split(":")
            except ValueError:
                raise ValueError("parsing error in line %s" % line)

            tag = re.sub("\s", "", tag).lower()

            if tag.startswith("novel") or tag.startswith("missed"):

                counts, total = map(
                    int, re.match("\s+(\d+)/(\d+)", data).groups())
                setattr(self, "%s_counts" % tag, counts)
                setattr(self, "%s_total" % tag, total)

            # NICK FIX: This output changed from the previous version of cufflinks. not sure if it means the same
            # but nevertheless the new output will be put into sphinxreport
            elif tag.startswith("matching"):
                counts = int(data)
                setattr(self, "%s_count" % tag, counts)

            elif tag.startswith("total"):
                # stop at total union across all super-loci
                break
            else:
                values = data.strip().split()
                setattr(self, tag, CuffCompareValues(values))
                self.is_empty = False
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Tophat.py/CuffCompareResult.fromLines/original