def svevent_reader(in_file):
    """Lazy generator of SV events, returned as dictionary of parts.
    """
    with open(in_file) as in_handle:
        while 1:
            line = next(in_handle)
            if line.startswith(">"):
                break
        header = line[1:].rstrip().split("\t")
        reader = csv.reader(in_handle, dialect="excel-tab")
        for parts in reader:
            out = {}
            for h, p in zip(header, parts):
                out[h] = p
            yield out
def svevent_reader ( in_file ) : with open ( in_file ) as in_handle : while 1 : line = next ( in_handle ) if line . startswith ( ">" ) : break header = line [ 1 : ] . rstrip ( ) . split ( "\t" ) reader = csv . reader ( in_handle , dialect = "excel-tab" ) for parts in reader : out = { } for h , p in zip ( header , parts ) : out [ h ] = p yield out
Lazy generator of SV events, returned as dictionary of parts.