Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


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

# Initializing CellBaseClient
cc = ConfigClient("/path/to/config.json")
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'])))

Use case

A use case where PyCellBase is used to obtain multiple kinds of data from different sources can be found in this Jupyter Notebook