Skip to main content

FASTGenomics CLI

Project description

FASTGenomics CLI

This package is a collection of scripts to manage your data on FASTGenomics.

It can be installed via

pip install fastgenomics-cli

and contains the following tools

FASTGenomics Upload

This script is used to upload files via the command line.

Usage

fg-upload [-h] [-v] [-d DATASET] [-u USER] [-p PASSWORD] [-t TITLE] [-m] [--dataset_type DATASET_TYPE] [--url URL] file [file ...]

positional arguments:
  file                  the file(s) to be uploaded

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         more verbose output (default: False)
  -d DATASET, --dataset DATASET
                        add file to existing dataset with this id (default: None)
  -u USER, --user USER  your username (or email address) (default: None)
  -p PASSWORD, --password PASSWORD
                        your password (default: None)
  -t TITLE, --title TITLE
                        the title of the new dataset (default: None)
  -m, --metadata        upload files as metadata instead of expression data (default: False)
  --dataset_type DATASET_TYPE
                        the dataset type (default: None)
  --url URL             The platform url (default: https://beta.fastgenomics.org/)

FASTGenomics CLI

This script is a generic command line interface for FASTGenomics.

Usage

fg-cli -h

output

usage: fg-cli [-h] {login,logout,configure-aws,version,lfs,dataset} ...

 ______       _____ _______ _____                            _
|  ____/\    / ____|__   __/ ____|                          (_)
| |__ /  \  | (___    | | | |  __  ___ _ __   ___  _ __ ___  _  ___ ___
|  __/ /\ \  \___ \   | | | | |_ |/ _ \ '_ \ / _ \| '_ ` _ \| |/ __/ __|
| | / ____ \ ____) |  | | | |__| |  __/ | | | (_) | | | | | | | (__\__ \
|_|/_/    \_\_____/   |_|  \_____|\___|_| |_|\___/|_| |_| |_|_|\___|___/

Welcome to FASTGenomics CLI!
Version 0.12.0-c1

Here are the base commands:

optional arguments:
  -h, --help            show this help message and exit

FASTGenomics CLI:
  {login,logout,configure-aws,version,lfs,dataset}
                        Actions for FASTGenomics
    login               Log in to the platform.
    logout              Log out to remove access to the platform.
    configure-aws       Configure AWS for the platform
    version             Show the version of FASTGenomics CLI.
    lfs                 Manage Large File Storage (lfs)
    dataset             Manage datasets

common

login

fg-cli login -h

output

usage: fg-cli login [-h] [-v] [-u USER] [-p PASSPHRASE] [-m {pat,password,bearer}] [--url URL]

Log in to the platform.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Activate verbose output
  -u USER, --user USER  the platform user
  -p PASSPHRASE, --passphrase PASSPHRASE
                        the passphrase of platform user
  -m {pat,password,bearer}, --login_method {pat,password,bearer}
                        the login method 'pat' (personal access token), 'password' or 'bearer'. Default: pat
  --url URL             the url of the plattform. For Example: https://beta.fastgenomics.org

logout

fg-cli logout -h

output

usage: fg-cli logout [-h] [-v]

Log out to remove access to the platform.

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

version

fg-cli version -h

output

usage: fg-cli version [-h] [-v]

Show the version of the cli client

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

dataset

fg-cli dataset -h

output

usage: fg-cli dataset [-h] {get-types,get-type-details,create,upload-file,set-metadata,delete} ...

Group: fg dataset - Manage datasets.

positional arguments:
  {get-types,get-type-details,create,upload-file,set-metadata,delete}
    get-types           get available dataset types together with their name and description
    get-type-details    shows all editable fields for a dataset type
    create              create a dataset
    upload-file         upload files to dataset
    set-metadata        set the metadata for a dataset
    delete              delete a dataset

optional arguments:
  -h, --help            show this help message and exit

get dataset types

fg-cli dataset get-types -h

output

usage: fg-cli dataset get-types [-h] [-v]

get available dataset types together with their name and description

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

get dataset type details

fg-cli dataset get-type-details -h

output

usage: fg-cli dataset get-type-details [-h] [-v] [-m {brief,full}] [id]

shows all editable fields for a dataset type

positional arguments:
  id                    the id of the dataset type

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Activate verbose output
  -m {brief,full}, --mode {brief,full}
                        description mode. Either "full" or "brief". Default "brief".

create a dataset

fg-cli dataset create -h

output

usage: fg-cli dataset create [-h] [-v] [-T TITLE] [--dataset_type DATASET_TYPE]

create a dataset

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Activate verbose output
  -T TITLE, --title TITLE
                        the title of the dataset
  --dataset_type DATASET_TYPE
                        the dataset type. For example "cs-singlecell". To get an overview of available types use `fg-cli dataset get-types`

upload file to dataset

fg-cli dataset upload-file -h

output

usage: fg-cli dataset upload-file [-h] [-v] [-id ID] [-t [{primarydata,metadata}]] files [files ...]

upload files to dataset

positional arguments:
  files                 file names of the files to be uploaded

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Activate verbose output
  -id ID                the id of the dataset
  -t [{primarydata,metadata}], --type [{primarydata,metadata}]
                        the type of the file 'primaryData' or 'metaData': Default: primaryData

set metadata of a dataset

fg-cli dataset set-metadata -h

output

usage: fg-cli dataset set-metadata [-h] [-v] [-id ID] metadata

set the metadata for a dataset

positional arguments:
  metadata       the metadate to set. Use @<filename> to provide the data by file or '{ json }'. Depending on your system you might have to escape quotes accordingly.

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output
  -id ID         the id of the dataset

set metadata by json string

fg-cli dataset set-metadata -id dataset-7463ed6a051b8557c7a03b33214e504e  -d '{ "title": "new title" }'

set metadata by file 'meta.json' containing the json

fg-cli dataset set-metadata -id dataset-7463ed6a051b8557c7a03b33214e504e  -d "@meta.json"

delete dataset

fg-cli dataset delete -h

output

usage: fg-cli dataset delete [-h] [-v] id

delete a dataset

positional arguments:
  id             the id of the dataset

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

large file storage (lfs)

fg-cli lfs -h

output

usage: fg-cli lfs [-h] [-v] {create,get-url} ...

Group: fg lfs - Manage platform Large File Storage (lfs)

positional arguments:
  {create,get-url}
    create          Create and upload a large file storage
    get-url         Get a download url

optional arguments:
  -h, --help        show this help message and exit
  -v, --verbose     Activate verbose output

create lfs

fg-cli lfs create -h

output

Create and upload a large file storage

positional arguments:
  files_or_directory    file names or directory to be compressed

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Activate verbose output
  -z [ZIP_FILENAME], --zip-filename [ZIP_FILENAME]
                        name of the zip file
  -P [ZIP_PASSWORD], --zip-password [ZIP_PASSWORD]
                        password for the zip file. if omitted a password will be generated.
  -r RECIPIENT_EMAIL, --recipient-email RECIPIENT_EMAIL
                        the email address used in the platform of the recipient
  -T [TITLE], --title [TITLE]
                        the title of the dataset containing the uploaded data
  --provider [{azure,aws}]
                        the provider to be used 'azure' or 'aws'. Default: azure)
  --skip-compression    Skip the compression

get url of lfs

fg-cli lfs get-url -h

output

usage: fg-cli lfs get-url [-h] [-v] id access_token

Get a download url

positional arguments:
  id             the id of the storage
  access_token   the access token

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

configure AWS

fg-cli configure-aws -h

output

usage: fg-cli configure-aws [-h] [-v]

Configure AWS for the platform

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Activate verbose output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastgenomics-cli-0.13.0.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

fastgenomics_cli-0.13.0-py2.py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page