Introduction

This is a Command Line Interface (CLI) to be used for accessing a remote CloudAlign system and interacting with it. This tool is useful for creating scripts or other automated processes that one would need to interface with CloudAlign.

Also included with this tool is a simple Ruby library for talking to CloudAlign directly.

Installation

Dependencies

  • Ruby 1.9.3 or greater
  • RubyGems (http://www.rubygems.org ships with 1.9.x)
  • A Unix like OS (Tested with Ubuntu 12 and Mac OSX)

Setup

Simply install the CloudAlign CLI using GEM


$ gem install cloudalign-cli

Configuration

Create a config file


$ mkdir -p ~/cloudalign
$ vi ~/cloudalign/config.yml

Finally, populate the config file with your credentials


# File ~/cloudalign/config.yml
api_url: http://web1.dev.cloudalign.accetia.com
api_user: jmccaffrey
api_password: shhhitssecret

Usage

Supported Commands

Here are the supported operations with the current version of the CloudAlign Command Line Interface (CLI). Also listed with each operation is a sample of how to use it.

Access Help Documentation


$ cloudalign
Tasks:
  cloudalign artifact <command>  # Manipulate artifacts in the CloudAlign system
  cloudalign help [TASK]         # Describe available tasks or one specific task
  cloudalign project <command>   # Manipulate projects in the CloudAlign system

$ cloudalign artifact
  cloudalign artifact align ARTIFACT              # ...
  cloudalign artifact compare ARTIFACT REFERENCE  # ...
  cloudalign artifact download ARTIFACT FILE      # Downloads file FILE ...
  cloudalign artifact help [COMMAND]              # Describe subcommands...
  cloudalign artifact list_files ARTIFACT         # Lists all files in ...

$ cloudalign project
  cloudalign project help [COMMAND]            # Describe subcommands or...
  cloudalign project list                      # Lists all viewable proj...
  cloudalign project list_artifacts PROJECT    # Lists all viewable arti...
  cloudalign project upload_file PROJECT PATH  # Uploads a file located ...

$ cloudalign project help list
Usage:
  cloudalign list

Lists all viewable projects for your user

List Projects


$ cloudalign project list
  +----+-----------------+
  | id | name            |
  +----+-----------------+
  | 1  | My Test Project |
  +----+-----------------+
  | 2  | asdf            |
  +----+-----------------+

List Artifacts in a Project


$ cloudalign project list_artifacts 2
  +----+-----------+
  | id | name      |
  +----+-----------+
  | 20 | 40mb_file |
  +----+-----------+

List Files within an Artifact


$ cloudalign artifact list_files 20
  +-----+---------------+----------+--------+
  | id  | name          | size     | status |
  +-----+---------------+----------+--------+
  | 137 | 40mb_file.bin | 41943040 | READY  |
  +-----+---------------+----------+--------+

Download a File


$ cloudalign file download 20 137
Downloading file 40mb_file.bin from Artifact 20 to ./
...
Done

Upload a File and Create Artifact


$ cloudalign project upload 2 test.fastq
Uploading file test.fastq to project 'asdf'
...
Done

Run BWA Alignment


$ cloudalign artifact 20 align
Running alignment on artifact 'Test Artifact 123', use artifact list_files to see the status.