OpenCGA
OverviewInstallationUsing OpenCGA
v2.2
v2.2
  • Home
  • Overview
    • Features
    • Architecture Diagram
    • Security
    • Metadata and Clinical Data
    • Data Models
      • Sample
      • Individual
    • Alignment and Coverage
    • Variant Query and Analysis
    • Clinical Data Analysis
    • Running Analysis
    • Scalability and Performance
    • Sizing OpenCGA
  • OpenCGA Architecture
    • Catalog
    • Alignment and Coverage
    • Variant Storage Engine
      • Variant Data Model
    • Clinical Analysis
    • Analysis Framework
  • Data Models
    • User
    • Project
    • Study
    • File
    • Sample
    • Individual
    • Family
    • Cohort
    • Job
    • Clinical Analysis
  • Case Studies
    • Genomics England Research
    • Microsoft Azure
  • User Manual
    • Installation
      • Kubernetes Cluster
        • Azure
        • Configuration
      • On-Premise HPC Cluster
        • Server Configuration
        • Getting OpenCGA
        • Choosing Variant Storage Engine
        • Configuration
      • Running Docker
    • Login
    • Using OpenCGA
      • REST Web Service API
      • IVA Web App
      • Client Libraries
        • pyopencga - Python Library
        • opencgaR - R library
        • Java
        • JavaScript
      • Command Line
        • Configuration
        • Files
      • Public Demo
    • Managing Data
      • Working with Projects and Studies
      • Loading of VCF files
      • Create Projects and Studies
      • Load VCF Files to a Study
      • Working with Files
      • Sharing and Permissions
        • Users and Groups
        • Study ACLs
      • Population of metadata
        • Data Versioning
        • Adding Custom Metadata
    • Alignment Engine
      • BAM Index
      • Alignment Read Query
      • Working with Coverage
      • Alignment Analysis
    • Variant Storage Engine
      • Variant Query
      • Variant Aggregation Stats
      • Variant Analysis
    • Clinical Genomics
      • Clinical Interpretation
      • Clinical Analysis
    • Using JupyterLab
    • Administrator
      • User Management
      • Templates / Manifest
  • About
    • Roadmap
    • Release Notes
    • Community
Powered by GitBook
On this page
  • Overview
  • Installation
  • Correlation Between REST and CLI
  • CLI Session Management

Was this helpful?

  1. User Manual
  2. Using OpenCGA

Command Line

PreviousJavaScriptNextConfiguration

Last updated 3 years ago

Was this helpful?

Overview

opencga.sh is the officially recommended command line tool for users. It implements most of the functionality with many different commands and subcommands. These commands are a one-to-one mapping of Resources from REST web services and subcommands are mapping to end-points. All the operations that can be performed using the command line internally create one or several REST calls, so access to REST machine/cluster is required.

Installation

OpenCGA command line can be downloaded from the main GitHub repository:

For a detailed description of all the steps required to download and configure the CLI, refer to the xxx section of the USER MANUAL.

Correlation Between REST and CLI

In the following URL, "samples" is the resource and "search" is the endpoint:

the corresponding command in the command line is :

./opencga.sh samples

and the corresponding subcommand is :

./opencga.sh samples search

CLI Session Management

Generally, unless we are pointing to a public OpenCGA installation, users will first need to log in using the "users login" command line. Once the user has successfully logged in, a session file will be generated in their home folder:

~/.opencga/session.json

This session file contains the following information:

This makes it easier for users to login only once and execute any number of commands till the session token is expired. Session expiration is set by OpenCGA server independently from the client. Once the token is expired, the user has to login again and can perform desired operations as normal.

https://github.com/opencb/opencga/releases/
https://ws.opencb.org/opencga-demo/webservices/rest/v1/samples/search