Skip to content

Command Line Interface (CLI)

The command line interface can be used to interact with resgen.

Installation

pip install resgen-python

Usage

To use the resgen cli, you can either enter your credentials when prompted or place your credentials in ~/.resgen/credentials in the following format:

RESGEN_USERNAME=my_username
RESGEN_PASSWORD=my_password

The most common use case is syning a dataset which falls in two categories:

Sync dataset without an index file

Datasets without index files are uploaded as a single file and require no index file for data access within them.

The -t parameter is used to specify tags. Tags let the browser know how to load the data. A list of available filetype and datatype tags can be found in the tutorial.

resgen sync datasets user \
        project \
        my_file.mcool \
        -t filetype:cooler \
        -t datatype:matrix \
        -t assembly:hg38

Sync dataset with an index file

Some types of data (e.g. bam, tabix, indexed fasta) require an index file for random access. The index file is included with the filename as a comma-separated pair:

resgen sync datasets user \
        project \
        my_file.bam,my_file.bam.bai \
        -t filetype:bam \
        -t datatype:alignments \
        -t assembly:hg38