Skip to contents

These functions invoke the extension's native SQL builders. The returned SQL can be passed to `DBI::dbGetQuery()` or used in a `CREATE TABLE AS` statement. Required relation names are passed as strings; the native builders quote them. Optional named arguments are forwarded as a DuckDB STRUCT. Load the extension on `con` with [rduckvep_load()] before calling a builder.

Usage

rduckvep_annotate_sql(con, events_table, model_name, ...)

rduckvep_transcript_projection_sql(
  con,
  events_table,
  annotations_table,
  transcripts_table,
  ...
)

rduckvep_lof_sql(
  con,
  annotations_table,
  transcripts_table,
  reference_table,
  ...
)

rduckvep_ensembl_regions_sql(
  con,
  core_schema,
  reference_chunks_table,
  assembly,
  ...
)

rduckvep_ensembl_transcripts_sql(
  con,
  core_schema,
  reference_chunks_table,
  assembly,
  ...
)

rduckvep_ensembl_regulation_features_sql(
  con,
  funcgen_schema,
  regions_table,
  ...
)

rduckvep_model_receipt_sql(
  con,
  regions_table,
  transcripts_table,
  source_name,
  source_version,
  assembly,
  source_manifest_sha256,
  reference_sha256,
  transcript_filter,
  ...
)

Arguments

con

A DBI connection with DuckVEP loaded.

events_table

Event relation name.

model_name

Loaded model name.

...

Named builder options (for annotation: `hgvs`, `rich`, `upstream_distance`, `downstream_distance`; for Ensembl regions and transcripts: `species_id`; for receipts: `regulation_features_table`; for the loss-of-function relation: `gerp`, `ancestor`, `phylocsf`, `min_intron_size`, `gerp_end_trunc_cutoff`, `check_complete_cds`). Other builders accept no options. Each value must be a length-one string, logical, integer, double or `NA`.

annotations_table

Annotation relation name.

transcripts_table

Transcript relation name.

reference_table

Reference sequence chunk relation (`chrom`, `start`, `end`, `seq`).

core_schema

Ensembl core schema name.

reference_chunks_table

Reference chunk relation name.

assembly

Assembly name.

funcgen_schema

Ensembl funcgen schema name.

regions_table

Canonical region relation name.

source_name, source_version

Source identity strings.

source_manifest_sha256, reference_sha256

Source and reference digests.

transcript_filter

Transcript selection description.

Value

A length-one SQL string.