You are viewing an old version of this page. View the current version.
As described in the documentation, HGVA backend is powered by the OpenCGA project. The CLI is distributed with the rest of the OpenCGA code. The OpenCGA code can be cloned in your machine by executing in your terminal:
Alternatively, you can download tar.gz files with the code for the latest tags/releases of OpenCGA from:
Once you have downloaded the code, follow the instructions at the How to Build section of the OpenCGA repository:
The CLI interface is accessible through the opencga.sh script:
The CLI provides commands, subcommands and parameters to access its functionality. Commands of most interest for HGVA users are projects, studies, cohorts and samples. Please, find below a list of commands which can be of most interest for HGVA user. Further documentation on the OpenCGA CLI can be found at the Command Lines section of the OpenCGA documentation.
As previously said, the CLI makes intensive use of the RESTful API. Thus, the only configuration detail needed for the CLI to work is a URL where the Web Services API is hosted. The configuration file client-configuration.yml is used for this purpose. You shall find a template of this file at the build/conf directory:
Edit this file with any text editor and set the rest → host attribute to "http://bioinfodev.hpc.cam.ac.uk/hgva-1.0":
Getting information about variants
You can query variants by using the variant command and query subcommand. An extensive list of filtering parameters allow great flexibility on the queries. Please, check inline help provided by opencga.sh for further details. For example, get TTN variants from the Genome of the Netherlands study, which is framed within the reference_grch37 project. We will restrict studies data to those corresponding to GONL. Finally, we will also limit the number of returned results to 3:
Getting information about projects
You can use the command projects to query projects data.
For getting all metadata from a particular project you can use the info subcommand. For example, getting all metadata for the cancer_grch37 project:
For getting all metadata from all studies associated to a particular project yo ucan use the studies subcommand. For example, getting all studies and their metadata for the cancer_grch37 project:
Getting information about studies
You can use the command studies to query studies data.
For getting all available studies and their metadata you can use the search subcommand. For example, getting all metadata for all available studies (please note, of special interest will be here the field alias which contains the study identifier to be used as an input whenever a study must be passed as a parameter):
For getting summary data from a particular study you can use the summary subcommand. For example, getting summary data for study 1kG_phase3 which is framed within project reference_grch37:
For getting all available metadata for a particular study you can use the info command. For example, getting all metadata for study GONL which is framed within the project reference_grch37:
For getting all samples metadata for a given study you can use the samples subcommand. For example, getting all samples metadata for study 1kG_phase3 which is framed within project reference_grch37. Please, note that not all studies contain samples data, e.g. GONL, ExAC, among others, only provide variant lists and aggregated frequencies, i.e. no sample genotypes.
Getting information about samples
You can use the command samples to query samples data.
For getting all metadata for a particular sample you can use the info subcommand. For example, get all metadata for sample HG00096 of the 1kG_phase3 study which is framed within the reference_grch37 project:
Getting information about cohorts
You can use the cohorts command to query cohorts data.
For getting all samples metadata in a given cohort you can use the samples subcommand. For example, get all samples metadata for cohort GBR from study 1kG_phase3 which is framed within project reference_grch37:
Table of Contents:
- No labels