def rc_stats(stats):
rc_nucs = {'<STR_LIT:A>':'<STR_LIT:T>', '<STR_LIT:T>':'<STR_LIT:A>', '<STR_LIT>':'<STR_LIT:C>', '<STR_LIT:C>':'<STR_LIT>', '<STR_LIT:N>':'<STR_LIT:N>'}<EOL>rcs = []<EOL>for pos in reversed(stats):<EOL><INDENT>rc = {}<EOL>rc['<STR_LIT>'] = pos['<STR_LIT>']<EOL>rc['<STR_LIT>'] = pos['<STR_LIT>']<EOL>rc['<STR_LIT>'] = pos['<STR_LIT>']<EOL>rc['<STR_LIT>'] = pos['<STR_LIT>']<EOL>rc['<STR_LIT>'] = rc_nucs[pos['<STR_LIT>']]<EOL>rc['<STR_LIT>'] = (rc_nucs[pos['<STR_LIT>'][<NUM_LIT:0>]], pos['<STR_LIT>'][<NUM_LIT:1>])<EOL>for base, stat in list(pos.items()):<EOL><INDENT>if base in rc_nucs:<EOL><INDENT>rc[rc_nucs[base]] = stat<EOL><DEDENT><DEDENT>rcs.append(rc)<EOL><DEDENT>return rcs<EOL>
reverse completement stats