def _read_pyMatch(fn, precursors):
with open(fn) as handle:<EOL><INDENT>reads = defaultdict(realign)<EOL>for line in handle:<EOL><INDENT>query_name, seq, chrom, reference_start, end, mism, add = line.split()<EOL>reference_start = int(reference_start)<EOL>if query_name not in reads:<EOL><INDENT>reads[query_name].sequence = seq<EOL><DEDENT>iso = isomir()<EOL>iso.align = line<EOL>iso.start = reference_start<EOL>iso.subs, iso.add = _realign(reads[query_name].sequence, precursors[chrom], reference_start)<EOL>logger.debug("<STR_LIT>" % (query_name, reference_start, chrom, iso.subs, iso.add))<EOL>if len(iso.subs) > <NUM_LIT:1>:<EOL><INDENT>continue<EOL><DEDENT>reads[query_name].set_precursor(chrom, iso)<EOL><DEDENT>reads = _clean_hits(reads)<EOL><DEDENT>return reads<EOL>
read pyMatch file and perform realignment of hits