Ejemplo n.º 1
0
def root(context, config, database, verbose, log_file):
    """Clinical sequencing coverage analysis tool."""
    # setup logging
    loglevel = LEVELS.get(min(verbose, 2), 'WARNING')
    init_log(logging.getLogger(), loglevel=loglevel, filename=log_file)
    logger.info("version {0}".format(__version__))

    # avoid setting global defaults in Click options, do it below when
    # updating the config object
    context.obj = Config(config, markup=markup)
    context.obj['database'] = (database or context.obj.get(
        'database', 'coverage.sqlite3'))

    # update the context with new defaults from the config file
    context.default_map = context.obj
Ejemplo n.º 2
0
def root(context, config, database, verbose, log_file):
    """Clinical sequencing coverage analysis tool."""
    # setup logging
    loglevel = LEVELS.get(min(verbose, 2), 'WARNING')
    init_log(logging.getLogger(), loglevel=loglevel, filename=log_file)
    logger.info("version {0}".format(__version__))

    # avoid setting global defaults in Click options, do it below when
    # updating the config object
    context.obj = Config(config, markup=markup)
    context.obj['database'] = (database or
                               context.obj.get('database', 'coverage.sqlite3'))

    # update the context with new defaults from the config file
    context.default_map = context.obj
Ejemplo n.º 3
0
def root(context, config, database, log_level, log_file):
    """Clinical sequencing coverage analysis tool."""
    init_log(logging.getLogger(), loglevel=log_level, filename=log_file)
    logger.debug("version {0}".format(__version__))

    # avoid setting global defaults in Click options, do it below when
    if os.path.exists(config):
        with open(config) as conf_handle:
            context.obj = yaml.load(conf_handle)
    else:
        context.obj = {}
    context.obj['database'] = (database or context.obj.get('database'))

    # update the context with new defaults from the config file
    context.default_map = context.obj
Ejemplo n.º 4
0
def root(context, config, database, log_level, log_file):
    """Clinical sequencing coverage analysis tool."""
    init_log(logging.getLogger(), loglevel=log_level, filename=log_file)
    logger.debug("version {0}".format(__version__))

    # avoid setting global defaults in Click options, do it below when
    if os.path.exists(config):
        with open(config) as conf_handle:
            context.obj = yaml.load(conf_handle)
    else:
        context.obj = {}
    context.obj['database'] = (database or context.obj.get('database'))

    # update the context with new defaults from the config file
    context.default_map = context.obj