Example #1
0
def run_vcfc_sparse_query(config: Config, filename: str, ref: str, start: int,
                          end: int) -> float:
    if not os.path.exists(filename):
        raise RuntimeError('%s does not exist' % filename)
    cmd_args = [
        config.get_vcfc_release_cmd(), 'sparse-query', filename,
        '%s:%d-%d' % (ref, start, end)
    ]
    return time_cmd(cmd_args)
Example #2
0
def create_vcfc_sparse_external_index(config: Config, filename: str) -> float:
    if not os.path.exists(filename):
        raise RuntimeError('%s does not exist' % filename)
    cmd_args = [
        config.get_vcfc_release_cmd(),
        'create-sparse-index',
        filename,
        # '%s:%d-%d' % (ref, start, end)
    ]
    return time_cmd(cmd_args)
Example #3
0
def run_vcfc_binned_index_query(config: Config, filename: str, ref: str,
                                start: int, end: int) -> float:
    if not os.path.exists(filename):
        raise RuntimeError('%s does not exist' % filename)
    if not os.path.exists(filename + '.vcfci'):
        raise RuntimeError('%s does not exist' % (filename + '.vcfci'))

    cmd_args = [
        config.get_vcfc_release_cmd(), 'query-binned-index', filename,
        '%s:%d-%d' % (ref, start, end)
    ]
    return time_cmd(cmd_args)
Example #4
0
def create_binned_index(config: Config, filename: str, bin_size: int) -> float:
    cmd_args = [
        config.get_vcfc_release_cmd(), 'create-binned-index',
        str(bin_size), filename
    ]
    return time_cmd(cmd_args)