Running locally¶
The Reservoir Genome Browser can be run locally to view files on your computer without uploading to the hosted instance at resgen.io.
Usage requires a license. If you already have a resgen subscription, you can get a license from resgen.io.
If you don't have a license, you are entitled to run locally and host directories with a maximum of 10 datasets.
Starting locally¶
Starting locally will start resgen as a server on your local computer. You can access the UI at http://localhost:1807 (The port can be changed using the --port
flag in the commands below)
resgen manage start ~/my-directory
If you are on an M* Mac you'll need to add --platform=linux/arm64/v8
for the right Docker image to be used.
resgen manage start ~/my-directory --platform=linux/arm64/v8
Create local user¶
Even when running locally you need to set up a user:
resgen manage create-user ~/my-directory
Synchronize datasets¶
Resgen maintains its own database of datasets, you'll need to synchronize manually when anything is added to the directory outside of resgen.
resgen manage sync-datasets ~/my-directory
Getting logs¶
If an error occurs, you can get the latest logs:
resgen manage logs ~/my-directory [nginx,uwsgi,celery]
The last parameter specifies the service to get logs for. In the majority of cases this will be uwsgi
.
Advanced functionality¶
Creating a superuser¶
A superuser can use the admin interface to modify users, projects and datasets.
resgen manage create-superuser ~/my-directory
Starting with a non-standard image¶
One may wish to start resgen with an older image:
resgen manage start --image <image_name> ~/my-directory
Viewing a dataset¶
Use the resgen manage view
command to view local datasets.
Displaying a sequence logo¶
The following command will generate a sequence logo plot from the 4th (1-based) column in the given csv file.
resgen manage view simulated_sars2_spike_15.csv \
-t colnum:4 \
-tt sequence-logo \
-tp top
The extra options are:
-t
- Add a tag to the created dataset saying to use column number 4. It's also possible to use-t colname:blah
to tell it to use the column name blah-tt
- The track type to use (sequence-logo)-tp
- Position this track up top. As opposed to on the left or right