def liftover_to_genome(pass_pos, gtf):
fixed_pos = []<EOL>for pos in pass_pos:<EOL><INDENT>if pos["<STR_LIT>"] not in gtf:<EOL><INDENT>continue<EOL><DEDENT>db_pos = gtf[pos["<STR_LIT>"]][<NUM_LIT:0>]<EOL>mut = _parse_mut(pos["<STR_LIT>"])<EOL>print([db_pos, pos])<EOL>if db_pos[<NUM_LIT:3>] == "<STR_LIT:+>":<EOL><INDENT>pos['<STR_LIT>'] = db_pos[<NUM_LIT:1>] + pos["<STR_LIT>"] + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>pos['<STR_LIT>'] = db_pos[<NUM_LIT:2>] - (pos["<STR_LIT>"] - <NUM_LIT:1>)<EOL><DEDENT>pos['<STR_LIT>'] = db_pos[<NUM_LIT:0>]<EOL>pos['<STR_LIT>'] = list(mut[<NUM_LIT:0>])<EOL>fixed_pos.append(pos)<EOL><DEDENT>_print_header(fixed_pos)<EOL>for pos in fixed_pos:<EOL><INDENT>print_vcf(pos)<EOL><DEDENT>
Liftover from precursor to genome