How to use the pycellbase.cbclient.ConfigClient function in pycellbase

To help you get started, we’ve selected a few pycellbase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opencb / cellbase / clients / python / tools / id_conversor.py View on Github external
# Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    # Overriding config
    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else:
        assembly = _DEFAULT_ASSEMBLY

    # Setting up pycellbase clients
    cbc = CellBaseClient(cc)
    xc = cbc.get_xref_client()

    # Printing available species and databases lists
github opencb / cellbase / clients / python / tools / cbtools.py View on Github external
def main():
    """The main function"""

    # Getting args
    args = _parse_arguments()

    # Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    # Overriding config
    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else:
github opencb / cellbase / clients / python / tools / hgvs_calculator.py View on Github external
def main():

    # Getting args
    args = _parse_arguments()

    # Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else:
        assembly = _DEFAULT_ASSEMBLY
github opencb / cellbase / clients / python / tools / cbtools.py View on Github external
# Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    # Overriding config
    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else:
        assembly = _DEFAULT_ASSEMBLY
    cbc = CellBaseClient(cc)

    if args.which == 'xref':
        # Getting available databases
        databases = _get_databases_list(cbc, assembly)
github opencb / cellbase / clients / python / tools / hgvs_calculator.py View on Github external
args = _parse_arguments()

    # Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else:
        assembly = _DEFAULT_ASSEMBLY
    cbc = CellBaseClient(cc)

    calculate_hgvs(args.input, args.output_fpath, cbc, args.ref_seq_type,
                   assembly)
github opencb / cellbase / clients / python / tools / id_conversor.py View on Github external
def main():
    """The main function"""

    # Getting args
    args = _parse_arguments()

    # Check arguments
    args = _check_arguments(args)

    # Setting up logging system
    _set_logger(args.verbosity)

    # Setting up PyCellBase clients
    cc = ConfigClient(
        {"species": _DEFAULT_SPECIES, "version": _DEFAULT_API_VERSION,
         "rest": {"hosts": [_DEFAULT_HOST]}}
    )

    # Overriding config
    if args.config is not None:
        cc = ConfigClient(args.config)
    if args.species is not None:
        cc.species = args.species
    if args.api_version is not None:
        cc.version = args.api_version
    if args.host is not None:
        cc.host = args.host
    if args.assembly is not None:
        assembly = args.assembly
    else: