Starting RhyDB and LAPIS
Starting RhyDB
Section titled “Starting RhyDB”RhyDB can be started in two modes:
preprocessing: Starts the RhyDB preprocessing that prepares the data for the RhyDB API server.api: Starts the RhyDB API server that responds to RhyDB queries.
We provide Docker images for RhyDB with the name: ghcr.io/genspectrum/lapis-silo.
Those images can be used to start RhyDB in both modes.
Starting the RhyDB preprocessing
Section titled “Starting the RhyDB preprocessing”To start the RhyDB preprocessing you need to provide the argument --preprocessing.
RhyDB will then start reading the input data, process it
and terminate after the result is written to the output directory.
Optionally, you can specify:
--preprocessingConfig: The path to the preprocessing config file that RhyDB should use, e.g.~/LAPIS/preprocessing_config.yaml--databaseConfig: The path to the database config file that RhyDB should use, e.g.~/LAPIS/database_config.yaml.
If those parameters are not provided, RhyDB will try to read the files from its current working directory. See the preprocessing reference for how to provide the input files.
Starting the RhyDB preprocessing with Docker
Section titled “Starting the RhyDB preprocessing with Docker”You only have to pass the argument --preprocessing to the Docker container.
The image is constructed with defaults in a way that you only need to mount the data to the correct locations:
- the preprocessing config to
/app/preprocessing_config.yaml, - the database config to
/app/database_config.yaml, - the data to
/preprocessing/input, - the output directory to
/preprocessing/output.
Starting the RhyDB API
Section titled “Starting the RhyDB API”To start the RhyDB API server you need to provide the argument --api.
It will start a web server that listens to port 8081.
The RhyDB API will read data from a directory that can be specified (in descending order of prevalence) via:
- a program argument
--dataDirectory, - YAML file
./runtime_config.yaml(in RhyDB’s working directory) with the keydataDirectory, - the default value
./output/(in RhyDB’s working directory).
The database config does not need to be provided. It is contained in the compiled output of the preprocessing.
Starting the RhyDB API with Docker
Section titled “Starting the RhyDB API with Docker”You only have to pass the argument --api to the Docker container.
The image is constructed with a runtime config file that sets the data directory to /data,
i.e. you only need to mount the result of the preprocessing to /data.
Starting LAPIS
Section titled “Starting LAPIS”To start LAPIS you need to provide the following parameters:
--silo.url: The URL where RhyDB is running, e.g.http://localhost:8081.--lapis.databaseConfig.path: The path to the database config file that LAPIS should use, e.g.~/LAPIS/database_config.yaml.--referenceGenomeFilename: The path to the reference genomes file that LAPIS should use, e.g.~/reference_genomes.json. This can alternatively be passed via the environment variableREFERENCE_GENOME_ENV_VARIABLE_NAME. The parameter takes precedence over the environment variable.
LAPIS listens on port 8080.
LAPIS provides the following optional parameters:
--lapis.docs.url: If set, the landing page (/) will show a “Documentation” link to the provided value. It is meant to point to your self-hosted version of this LAPIS documentation. If not set, the “Documentation” link on the landing page (/) will not be shown.
Starting LAPIS with Docker
Section titled “Starting LAPIS with Docker”We provide Docker images for LAPIS with the name: ghcr.io/genspectrum/lapis.
The provided Docker images already contain reasonable default values for
- the
lapis.databaseConfig.pathparameter:/workspace/database_config.yaml, - the
REFERENCE_GENOME_ENV_VARIABLE_NAMEenvironment variable:/workspace/reference_genomes.json.