Skip to contents

The v1 host runs the three (plus optional) relation queries on a private connection with `duckvep_model_load()`. The v2 host cannot: its model sink is a COPY format, so the same load is a sequence of `COPY` statements into staging followed by `duckvep_model_publish()`, and those statements come from `duckvep_model_load_sql()`. This function picks the host by what the loaded extension provides and hides the difference; the result is the same resident model. One visible difference remains: on v2 the queries run on `con` in its own transaction, so temporary tables and uncommitted rows are visible to them; on v1 the queries run on a separate connection and see only committed, permanent relations.

Usage

rduckvep_load_model(
  con,
  name,
  regions_query,
  transcripts_query,
  exons_query,
  mature_mirna_query = NULL,
  peptide_edit_query = NULL,
  interval_feature_query = NULL,
  reference_fasta = NULL,
  transcript_coverage_complete = NULL
)

Arguments

con

A DBI connection with DuckVEP loaded.

name

Model name (non-empty, not yet loaded).

regions_query, transcripts_query, exons_query

SELECT statements that return the typed, ordered relations (see the function reference).

mature_mirna_query, peptide_edit_query, interval_feature_query

Optional SELECT statements for the optional relations.

reference_fasta

Optional path of an indexed reference FASTA.

transcript_coverage_complete

Optional logical (`NA` is an error).

Value

`TRUE`, invisibly, when the model is loaded.