def expand_sv_ends(rec):
    startpos, endpos = rec.start, rec.end
    assert rec.is_sv

    try:
        endpos = int(rec.INFO.get('END')[0])

        if rec.INFO.get('CIPOS'):
            ci = map(int, rec.INFO.get('CIPOS'))
            if ci[0] < 0:
                startpos += ci[0]

        if rec.INFO.get('CIEND'):
            ci = map(int, rec.INFO.get('CIEND')) 
            if ci[0] > 0:
                endpos += ci[0]

    except TypeError as e:
        sys.stderr.write("error expanding sv interval: " + str(e) + " for record: " + str(rec) + "\n")

    if startpos > endpos:
        endpos, startpos = startpos, endpos

    return startpos, endpos
Return a Registry instance corresponding to the key's subkey name
dataset/ETHPy150Open adamewing/bamsurgeon/scripts/evaluator.py/expand_sv_ends--crossover with--dataset/ETHPy150Open tjguk/winsys/winsys/registry.py/Registry.get_key