Skip to contents

`rduckvep_save_model()` writes a loaded model's native arrays to one file with `duckvep_model_save()`. `rduckvep_restore_model()` loads a model from that file with `duckvep_model_restore()`: the file is mapped read-only instead of copied, so restoring is several times faster than loading the relations, and every R session that restores the same file shares one copy of it in memory. A snapshot is validated when it is restored and is tied to the DuckVEP build that wrote it; a build with a different model layout refuses it. It records the path of the model's reference FASTA, not its bytes.

Usage

rduckvep_save_model(con, name, path)

rduckvep_restore_model(con, name, path)

Arguments

con

A DBI connection with DuckVEP loaded.

name

Model name: a loaded model to save, or a new name to restore under.

path

Path of the snapshot file.

Value

`TRUE`, invisibly.