Exemplo n.º 1
0
def main():
    """Entry point to the script."""

    # Basic parsing of command line arguments to allow a filename
    # to be passed when running this code in the debugger.
    file_handle = sys.stdin
    if 2 <= len(sys.argv):
        file_handle = open(sys.argv[1], "r")

    expander = GvcfExpander(bin_size=1000,
                            filter_ref_matches=False,
                            emit_ref_blocks=False)

    line = file_handle.readline()
    while line:
        line = line.strip()
        if not line:
            line = file_handle.readline()
            continue

        if BIG_QUERY_SOURCE:
            (key, value) = line.split("\t")
            fields = json.loads(value)
        else:
            fields = json.loads(line)

        pairs = expander.map(fields=fields)
        for pair in pairs:
            emit(pair.k, pair.v)

        line = file_handle.readline()
Exemplo n.º 2
0
def main():
    """Entry point to the script."""

    # Basic parsing of command line arguments to allow a filename
    # to be passed when running this code in the debugger.
    file_handle = sys.stdin
    if 2 <= len(sys.argv):
        file_handle = open(sys.argv[1], "r")

    expander = GvcfExpander(bin_size=1000, filter_ref_matches=False, emit_ref_blocks=False)

    line = file_handle.readline()
    while line:
        line = line.strip()
        if not line:
            line = file_handle.readline()
            continue

        if BIG_QUERY_SOURCE:
            (key, value) = line.split("\t")
            fields = json.loads(value)
        else:
            fields = json.loads(line)

        pairs = expander.map(fields=fields)
        for pair in pairs:
            emit(pair.k, pair.v)

        line = file_handle.readline()
Exemplo n.º 3
0
def main():
    """Entry point to the script."""

    # Basic parsing of command line arguments to allow a filename
    # to be passed when running this code in the debugger.
    file_handle = sys.stdin
    if 2 <= len(sys.argv):
        file_handle = open(sys.argv[1], "r")

    expander = GvcfExpander()

    line = file_handle.readline()
    while line:
        line = line.strip()
        if not line:
            line = file_handle.readline()
            continue

        fields = json.loads(line)

        pairs = expander.map(fields=fields)
        for pair in pairs:
            emit(pair.k, pair.v)

        line = file_handle.readline()
def main():
    """Entry point to the script."""

    # Basic parsing of command line arguments to allow a filename
    # to be passed when running this code in the debugger.
    file_handle = sys.stdin
    if 2 <= len(sys.argv):
        file_handle = open(sys.argv[1], "r")

    expander = GvcfExpander()

    line = file_handle.readline()
    while line:
        line = line.strip()
        if not line:
            line = file_handle.readline()
            continue

        fields = json.loads(line)

        pairs = expander.map(fields=fields)
        for pair in pairs:
            emit(pair.k, pair.v)

        line = file_handle.readline()