Page tree

Versions Compared


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


  • This Python package makes use of the exhaustive RESTful Web service API that has been implemented for the CellBase database.
  • It enables to query and obtain a wealth of biological information from a single database, saving a lot of time.
  • As all information is integrated, queries about different biological topics can be easily and all this information can be linked together.
  • Currently Homo sapiensMus musculus and a total of 32 species are available and many others will be included soon.
  • More info about this package in the Python client tutorial of the CellBase Wiki

Package notes

  • PyCellBase is compatible with both Python 2 and 3.
  • This package makes use of multithreading to improve performance when the number of queries exceed a specific limit.
  • It is distributed:

General usage

PyCellBase code can be accessed at

The CellBaseClient class provides access to the different clients of the data we want to query (e.g. gene, transcript, variation, protein, genomic region, variant).

Each of these clients provide a set of methods to ask for the resources we want to retrieve. Most of these methods will need to be provided with comma-separated IDs or list of IDs. Optional filters and extra options can be added as key-value parameters.

Responses are retrieved as JSON formatted data. Therefore, fields can be queried by key.

If there is an available resource, but there is not an available method in this python package, the CellBaseClient class can be used to create the URL of interest. This class is able to access the RESTful Web Services through the get method it implements. In this case, this method needs to be provided with those parameters which are required by the URL: category (e.g. feature), subcategory (e.g. gene), ID to search for (e.g. BRCA1) and method to query (e.g. search).

Configuration data as host, API version, or species is stored in a ConfigClient object. A custom configuration can be passed to CellBaseClient with a ConfigClient object provided with a JSON or YML config file. If you want to change the configuration on the fly you can directly modify the ConfigClient object.

Please, find more details on how to use the python library at: Python client tutorial



PyCellBase can be cloned in your local machine by executing in your terminal:

$ git clone

Once you have downloaded the project you can install the library:

$ cd cellbase/clients/python
$ python install


(not available yet)

R client

Note: R client library available from version 4 onwards 

R library package is implemented and maintained for the latest R release and distributed through Bioconductor ( For a quick install, please enter the R terminal and type:


The R code is also distributed together with the rest of the CellBase code. R code can be found at: cellbase/clients/R

The R code provides a library for programmatic access to CellBase data. No CLI is implemented in R.

Comprehensive description of the library is provided by the Bioconductor documentation: