def read(self):
    exceptions = 0
    for chrom_file in self.mFiles:
        chrom = detectFileChrom(chrom_file, self.mChromLoc)
        logging.info(('Evaluation of %s in %s' % (chrom, chrom_file)))
        with gzip.open(chrom_file, 'rt') as text_inp:
            time_rep = TimeReport(('chr' + chrom))
            collector = DataCollector()
            for (line_no, line) in enumerate(text_inp):
                if (line_no == 0):
                    setupFields(line)
                    continue
                try:
                    info = collector.ingestLine(line)
                    if (info is not None):
                        (yield info)
                    if ((line_no % 10000) == 0):
                        (total_var, _, _) = collector.getCounts()
                        time_rep.portion(total_var)
                except IndexError:
                    exceptions += 1
            info = collector.finishUp()
            if info:
                (yield info)
            (total_var, total_facets, total_tr) = collector.getCounts()
            time_rep.done(total_var)
            logging.info(('transcripts: %d, facets: %d, exceptions: %d' % (total_tr, total_facets, exceptions)))
def read(self):
    exceptions = 0
    for chrom_file in self.mFiles:
        chrom = detectFileChrom(chrom_file, self.mChromLoc)
        logging.info(('Evaluation of %s in %s' % (chrom, chrom_file)))
        with gzip.open(chrom_file, 'rt') as text_inp:
            time_rep = TimeReport(('chr' + chrom))
            collector = DataCollector()
            for (line_no, line) in enumerate(text_inp):
                if (line_no == 0):
                    setupFields(line)
                    continue
                try:
                    info = collector.ingestLine(line)
                    if (info is not None):
                        (yield info)
                    if ((line_no % 10000) == 0):
                        (total_var, _, _) = collector.getCounts()
                        time_rep.portion(total_var)
                except IndexError:
                    exceptions += 1
            info = collector.finishUp()
            if info:
                (yield info)
            (total_var, total_facets, total_tr) = collector.getCounts()
            time_rep.done(total_var)
            logging.info(('transcripts: %d, facets: %d, exceptions: %d' % (total_tr, total_facets, exceptions)))