Database backends
Refgenie keeps asset metadata, genome records and settings in a database: SQLite (the default) or PostgreSQL.
SQLite (default)
Section titled “SQLite (default)”SQLite needs no setup. The first time refgenie runs, it writes a config file that points at a SQLite database in ~/.refgenie/refgenie:
type: sqlitepath: ~/.refgenie/refgeniePostgreSQL
Section titled “PostgreSQL”Use PostgreSQL for shared servers and for anything that writes from several processes at once. Write the config file yourself:
type: postgresqlname: refgenieuser: refgenie_userpassword: your_secure_passwordhost: localhostport: 5432Values can use environment variables, such as password: $POSTGRES_PASSWORD. Refgenie connects with the psycopg driver.
Choosing a backend
Section titled “Choosing a backend”| Scenario | Backend |
|---|---|
| One user on a workstation | SQLite |
| CI or a short-lived environment | SQLite |
| A shared lab or team database | PostgreSQL |
A refgenie server (refgenie serve) | PostgreSQL |
| A cloud deployment with several workers | PostgreSQL |
Config file location
Section titled “Config file location”Refgenie reads the config file from REFGENIE_DB_CONFIG_PATH, which defaults to $REFGENIE_HOME_PATH/refgenie_db_config.yaml:
export REFGENIE_DB_CONFIG_PATH=/path/to/refgenie_db_config.yamlrefgenie config get shows the settings refgenie is using, including this path, genome_folder and genome_stage_folder.
Related environment variables
Section titled “Related environment variables”| Variable | Default | Description |
|---|---|---|
REFGENIE_HOME_PATH | ~/.refgenie | Base directory for refgenie files |
REFGENIE_DB_CONFIG_PATH | $REFGENIE_HOME_PATH/refgenie_db_config.yaml | Path to the database config |
REFGENIE_GENOME_FOLDER | $REFGENIE_HOME_PATH/genomes | Directory for genome assets |
REFGENIE_GENOME_STAGE_FOLDER | $REFGENIE_HOME_PATH/archives | Directory for staged assets |
REFGENIE_LOG_LEVEL | WARNING | Log verbosity |