Skip to contents

Creates a DuckDB table from GTF files using the DuckHTS extension.

Usage

rduckhts_gtf(
  con,
  table_name,
  path,
  region = NULL,
  index_path = NULL,
  scan_mode = NULL,
  attributes_map = FALSE,
  attributes_list = FALSE,
  attributes_pairs = FALSE,
  overwrite = FALSE,
  attributes = NULL
)

Arguments

con

A DuckDB connection with DuckHTS loaded

table_name

Name for the created table

path

Path to the GTF file

region

Optional genomic region (e.g., "chr1:1000-2000")

index_path

Optional explicit path to index file (.tbi/.csi)

scan_mode

Optional scan mode. Use "auto" (default extension behavior) or "sequential" to force full-file streaming/counting instead of index-backed count paths. Sequential mode is incompatible with region.

attributes_map

Logical. If TRUE, returns raw attributes as a scalar MAP column

attributes_list

Logical. If TRUE, returns attributes as MAP(VARCHAR, VARCHAR[])

attributes_pairs

Logical. If TRUE, returns attributes as a LIST of key/value/index structs

overwrite

Logical. If TRUE, overwrites existing table

attributes

Character vector of attribute keys to expose as VARCHAR columns. Key matching is case-sensitive: "id" does not match ID, and an unmatched key gives a column of NA

Value

Invisible TRUE on success