Python client pyCGA
pyCGA is the Python client library for OpenCGA RESTful Web Services, all the web services are accessible through this client, and it offers a quick way to query OpenCGA projects programmatically from custom scripts. In the same way than in Using RESTful Web Services URL tutorial, we will focus on those end points more interesting for HGVA users. In order to make it easy to follow we will use the same examples used in Using RESTful Web Services URL.
The Python client library is distributed with the rest of the OpenCGA code. The OpenCGA code can be cloned in your machine by executing in your terminal. Checkout the latest code (release-1.1.0 branch). You can easily install pyCGA using pip tool:
Configuring pyCGA for HGVA
Configuration parameters can be passed as a JSON file, YAML file or a Python Dictionary:
Load the configuration will be the first step, to use the python client. We will use the ConfigClient class, passing the name of the path of the configuration file or the dictionary with the configuration. After that the instance created will be passed to the Client.
Once the library is imported and configured, you can proceed to run the examples below.
Getting information about genomic variants
Getting information about projects
Getting information about studies
Getting information about samples
Getting information about cohorts
Table of Contents:
- No labels