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 »

Overview

OpenCGA has a large and rich suite of web services to store and query almost anything imaginable in bioinformatics. As Java developers, we have created an OpenCGA client API to make really easy and straightforward calling those webservices, so new developers don't have to spend time implementing those calls, managing exceptions and converting the results into OpenCGA's data models. All these is managed automatically by the client API.

Library design

Developers only need to create an instance of the OpenCGAClient class passing the client configuration file (client-configuration.yml) as an argument and, optionally, the user and password or a valid token to start doing calls as an authenticated user. The only role of the OpenCGAClient class is to work as a factory of the actual clients.

OpenCGAClient opencgaClient = new OpenCGAClient(clientConfiguration);
OpenCGAClient opencgaClient = new OpenCGAClient("myUserId", "myPassword", clientConfiguration);
OpenCGAClient opencgaClient = new OpenCGAClient("myValidToken", clientConfiguration);

A different client class have been created for every single category present in the web services (user, project, study...). All the available clients can be retrieved as shown below:

UserClient userClient = opencgaClient.getUserClient();
ProjectClient userClient = opencgaClient.getProjectClient();
StudyClient userClient = opencgaClient.getStudyClient();
FileClient userClient = opencgaClient.getFileClient();
JobClient userClient = opencgaClient.getJobClient();
IndividualClient userClient = opencgaClient.getIndividualClient();
SampleClient userClient = opencgaClient.getSampleClient();
VariableSetClient userClient = opencgaClient.getVariableSetClient();
CohortClient userClient = opencgaClient.getCohortClient();
FamilyClient userClient = opencgaClient.getFamilyClient();
ToolClient userClient = opencgaClient.getToolClient();
AlignmentClient userClient = opencgaClient.getAlignmentClient();
VariantClient userClient = opencgaClient.getVariantClient();

These clients will inherit the implementation of the most common actions from an abstract parent class called CatalogClient. Each client will contain specific methods for every single action that can be found in the web services.


Table of Contents:


  • No labels