Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »


OpencgaClient is the Javascript 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 through web interface. 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.

Configuring and initializing the client

There are two javascript files that need to be imported - opencga-client-config.js and opencga-client.js.

OpenCGA Client expects an OpenCGA Client Configuration to initialise and create the client. The configuration object is of the following structure

OpenCGA Client Configuration
opencgaClientConfig = new OpenCGAClientConfig("bioinfodev.hpc.cam.ac.uk/hgva-1.0", "v1", true, "hgva");


this.opencgaClient = new OpenCGAClient(this.opencgaClientConfig);

Getting information about genomic variants

opencgaClient.studies().getVariants(id, params, options)

Getting information about projects

opencgaClient.projects().info(id, params, options)

opencgaClient.projects().getStudies(id, params, options)

Getting information about studies

opencgaClient.studies().search(params, options)

opencgaClient.studies().summary(id, params, options)

opencgaClient.studies().info(id, params, options)

opencgaClient.studies().getSamples(id, params, options)

Table of Contents:


  • No labels