def parse_log(self, bowtie_log):
print("<STR_LIT>")<EOL>regexes = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>"<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>",<EOL>'<STR_LIT>': r"<STR_LIT>"<EOL>}<EOL>}<EOL>with open(bowtie_log, "<STR_LIT:r>") as f:<EOL><INDENT>for l in f:<EOL><INDENT>print(l)<EOL>total = re.search(r"<STR_LIT>", l)<EOL>print(total)<EOL>if total:<EOL><INDENT>print(total)<EOL>self.set_n_reads(total.group(<NUM_LIT:1>))<EOL><DEDENT>paired = re.search(r"<STR_LIT>", l)<EOL>if paired:<EOL><INDENT>paired_total = int(paired.group(<NUM_LIT:1>))<EOL>paired_numbers = {}<EOL>l = f.readline()<EOL>while l.startswith('<STR_LIT:U+0020>'):<EOL><INDENT>for k, r in regexes['<STR_LIT>'].items():<EOL><INDENT>match = re.search(r, l)<EOL>if match:<EOL><INDENT>paired_numbers[k] = int(match.group(<NUM_LIT:1>))<EOL><DEDENT><DEDENT>l = f.readline()<EOL><DEDENT>align_zero_times = paired_numbers['<STR_LIT>'] + paired_numbers['<STR_LIT>']<EOL>if align_zero_times:<EOL><INDENT>self.set_align_0x(align_zero_times)<EOL><DEDENT>align_one_time = paired_numbers['<STR_LIT>'] + paired_numbers['<STR_LIT>']<EOL>if align_one_time:<EOL><INDENT>self.set_align_1x(align_one_time)<EOL><DEDENT>align_more_than_one_time = paired_numbers['<STR_LIT>'] + paired_numbers['<STR_LIT>']<EOL>if align_more_than_one_time:<EOL><INDENT>self.set_align_mt1x(align_more_than_one_time)<EOL><DEDENT><DEDENT>overall = re.search(r"<STR_LIT>", l)<EOL>if overall:<EOL><INDENT>self.overall_rate = float(overall.group(<NUM_LIT:1>))<EOL><DEDENT><DEDENT><DEDENT>
Parse a bowtie log file.

        This is a bowtie log parsing method that populates the
        :py:attr:`self.n_reads, self.align_0x, self.align_1x, self.align_mt1x and self.overall_rate` attributes with
        data from the log file.

        Disclamer: THIS METHOD IS HORRIBLE BECAUSE THE BOWTIE LOG IS HORRIBLE.

        The insertion of data on the attribytes is done by the
        :py:meth:`set_attribute method.

        Parameters
        ----------
        bowtie_log : str
            Path to the boetie log file.