def _read_miraligner(fn):
reads = defaultdict(realign)<EOL>with open(fn) as in_handle:<EOL><INDENT>in_handle.next()<EOL>for line in in_handle:<EOL><INDENT>cols = line.strip().split("<STR_LIT:\t>")<EOL>iso = isomir()<EOL>query_name, seq = cols[<NUM_LIT:1>], cols[<NUM_LIT:0>]<EOL>chrom, reference_start = cols[-<NUM_LIT:2>], cols[<NUM_LIT:3>]<EOL>iso.mirna = cols[<NUM_LIT:3>]<EOL>subs, add, iso.t5, iso.t3 = cols[<NUM_LIT:6>:<NUM_LIT:10>]<EOL>if query_name not in reads:<EOL><INDENT>reads[query_name].sequence = seq<EOL><DEDENT>iso.align = line<EOL>iso.start = reference_start<EOL>iso.subs, iso.add = _parse_mut(subs), add<EOL>logger.debug("<STR_LIT>" % (query_name, reference_start, chrom, iso.subs, iso.add))<EOL>reads[query_name].set_precursor(chrom, iso)<EOL><DEDENT><DEDENT>return reads<EOL>
Read ouput of miraligner and create compatible output.