This is the officially recommended command line tool for normal users and are encouraged to use this. It implements all the functionality in more than 100 command and subcommands. As per OpenCGA design, these commands are one-to-one mapping of Resources fromREST web services and subcommands are mapping to end-points. These commands underneath makes REST calls to carry out operations, thus any user who has access to REST machine/cluster can execute these commands.
Correlation Between REST And CLI
In the following URL, "samples" is the resource and "search" is the endpoint:
Executing ./opencga.sh will return the list of all available commands with description of each as shown below:
users User commands
projects Project commands
studies Study commands
files Files commands
jobs Jobs commands
individuals Individuals commands
samples Samples commands
variables Variable set commands
cohorts Cohorts commands
tools Tools commands
panels Panels commands
alignments Implement several tools for the genomic alignment analysis
variant Variant commands
List of subCommand can be retrieved by simply executing a command without any argument as show below:
Executing 'opencga.sh samples'
Usage: opencga.sh samples <subcommand> [options]
create Create a sample
load Load samples from a pedigree file
info Get samples information
search Search samples
update Update sample
delete Delete the selected sample
group-by Group samples
individuals Get the individuals of a list of samples.
acl Return the acl of the resource
acl-update Update the permissions set for a member
CLI Session Management
As a first step to execute any command with opencga.sh, user must login. After successfull login, the corresponding JWT sesssion token will be stored on machine under
This makes easier for users to login only once and execute any number of commands till the session token is expired. Please note down, session expiration is set by OpenCGA server independently from client. Once token is expired, user have to login again and can perform desired operations as normal.