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 3 Next »

Overview

OpenCGA has a large and rich suite of web services to store and query almost anything imaginable in bioinformatics. Because, calling those web services directly from Java could be a pain, we have designed and implemented a Java API client really easy to use even for non experts.

Library design

Developers only need to call to 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...). The list of all the available clients can be found 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