How to use the pycellbase.cbconfig.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 / pycellbase / cbclient.py View on Github external
self._tfbs_client = None
        self._regulation_client = None
        self._species_client = None
        self._meta_client = None

        # Setting up config params
        if config_client is not None:
            if isinstance(config_client, ConfigClient):
                self._configuration = config_client
            else:
                msg = ('CellBaseClient configuration not properly set.' +
                       ' "pycellbase.config.ConfigClient" object is needed as' +
                       ' parameter')
                raise ValueError(msg)
        else:
            self._configuration = ConfigClient()
github opencb / cellbase / cellbase-app / app / scripts / pycellbase / gene_query.py View on Github external
#!/usr/bin/python

# Loading CellBase and configuration clients
from pycellbase.cbconfig import ConfigClient
from pycellbase.cbclient import CellBaseClient

# Initializing CellBaseClient
cc = ConfigClient("../conf/client-configuration.yml")
cbc = CellBaseClient(cc)

# Initializing gene client
gc = cbc.get_gene_client()

# Retrieving transcription factor binding sites (TFBS) for a gene list
gene_list = ['BRCA1', 'BRCA2', 'LDLR']
tfbs_responses = gc.get_tfbs(gene_list, include='id')

# Printing the number of TFBS found for each gene
for response in tfbs_responses:
    print('Number of TFBS for "%s": %d' % (response['id'], len(response['result'])))
github opencb / cellbase / clients / python / pycellbase / cbclient.py View on Github external
self._transcript_client = None
        self._protein_client = None
        self._variation_client = None
        self._xref_client = None
        self._region_client = None
        self._variant_client = None
        self._genome_sequence_client = None
        self._clinical_client = None
        self._tfbs_client = None
        self._regulation_client = None
        self._species_client = None
        self._meta_client = None

        # Setting up config params
        if config_client is not None:
            if isinstance(config_client, ConfigClient):
                self._configuration = config_client
            else:
                msg = ('CellBaseClient configuration not properly set.' +
                       ' "pycellbase.config.ConfigClient" object is needed as' +
                       ' parameter')
                raise ValueError(msg)
        else:
            self._configuration = ConfigClient()