Skip to main content

Deploy to Dockerhub on release Deploy to Amazon ECS - software-staging

Code style: black

refgenieserver

This folder contains code for an API to provide reference genomes. refgenieserver can do 2 things: archive an existing refgenie folder, and then serve it.

How to serve

Building container

In the same directory as the Dockerfile:

docker build -t refgenieserverim .

Running container for development:

You can run it directly after installing with pip install, like this:

refgenieserver serve -c refgenie.yaml -p 5000

Better, though, is to use the container. Mount a directory of files to serve at /genomes:

docker run --rm -p 80:80 --name refgenieservercon \
  -v $(pwd)/files:/genomes \
  refgenieserverim refgenieserver serve -c refgenie.yaml

Running container for production:

Run the container from the image you just built:

docker run --rm -d -p 80:80 \
  -v /path/to/genomes_archive:/genomes \
  --name refgenieservercon \
  refgenieserverim refgenieserver serve -c /genomes/genome_config.yaml

Make sure the genome_config.yaml filename matches what you've named your configuration file! We use -d to detach so it's in background. You shouldn't need to mount the app (-v /path/to/refgenieserver:/app) because in this case we're running it directly. Terminate container when finished:

docker stop refgenieservercon

Interacting with the API web server

Navigate to http://localhost/ to see the server in action.

You can see the automatic docs and interactive swagger openAPI interface at http://localhost/docs. That will also tell you all the endpoints, etc.

Monitoring for errors

Attach to container to see debug output:

docker attach refgenieservercon

Grab errors:

docker events | grep -oP "(?<=die )[^ ]+"

View those error codes:

docker logs <error_code>

Enter an interactive shell to explore the container contents:

docker exec -it refgenieservercon sh

How to archive

Refgenieserver can also archive your assets, creating the directory for asset archives needed to serve.

First, make sure the config has a genome_archive_folder key that points to the directory where you want to store the servable archives (genome_archive_folder is not added automatically by refgenie init). Your first time you will need to manually add this to tell refgenieserver where to store the archives.

Secondly, if you wish to store the refgenieserver configuration file separately from the genome_archive_folder, specify a genome_archive_config key. The path that this key points to will be considered relative to the refgenie configuration file, unless it's absolute.

Then run:

refgenieserver archive -c CONFIG

It just requires a -c argument or $REFGENIE environment variable.

This command will:

  • create the genome_archive directory and structure that can be used to serve the assets
  • create a server config file in that directory, which includes a couple of extra asset attributes, like archive_digest and archive_size.

In case you already have some of the assets archived and just want to add a new one, use:

refgenieserver archive -c CONFIG GENOME/ASSET:TAG

In case you want to remove an unwanted archive, add an -r flag:

refgenieserver archive -c CONFIG -r GENOME/ASSET:TAG

How to test the refgenie suite of software

The refgenie universe includes refgenie, refgenconf, and refgenieserver.

The test_refgenie.sh script will test the integration of all three tools to ensure everything is functioning, particularly following any changes or updates to one, two, or all three tools.

Use it simply as follows:

/path/to/test_refgenie.sh

The script also requires Python's virtual environment module, Docker, and Bulker to successfully test all components.

Metadata

Release files for refgenieserver 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refgenieserver 0.8.0
File Size Uploaded
refgenieserver-0.8.0.tar.gz 43.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for refgenieserver 0.8.0
File Interpreter ABI Platform
refgenieserver-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.6 kB

Release files / refgenieserver-0.8.0.tar.gz

Download URL refgenieserver-0.8.0.tar.gz
Size 43.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50bbee7594832529f0713833c926a4c9d63367da6b732dcb398e5b54a730b092
BLAKE2b-256 checksum
How to use checksums
da20516d69bb42a28b2eed5df43a2eae52658e1c57797674f2fe0d9c3a81866f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Release files / refgenieserver-0.8.0-py3-none-any.whl

Download URL refgenieserver-0.8.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96498f98ec7e059484088db73bf3bcd41b562d4c5b493a84a3fdda4f745311d5
BLAKE2b-256 checksum
How to use checksums
8fe868781fb2cdceb27144f387139240fda778b0807b8585cbc102efb908f9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page