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_vcf_events_sql(con, records_table, regions_table, ...)
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.
- records_table
VCF record relation name with `read_bcf` columns (`CHROM`, `POS`, `REF`, `ALT`, and optionally `ID`, `INFO_END`, `INFO_SVTYPE`, `INFO_SVLEN`).
- regions_table
Canonical region relation name; for `rduckvep_vcf_events_sql()`, a relation with `seq_region` and `seq_region_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`.
- events_table
Event relation name. For an insertion, the optional `structural_geometry` column distinguishes a one-base feature (`"POINT"`) from an interbase site (NULL or absent).
- model_name
Loaded model name.
- 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.
- source_name, source_version
Source identity strings.
- source_manifest_sha256, reference_sha256
Source and reference digests.
- transcript_filter
Transcript selection description.