Package 'Rducksassy'

Title: Approximate String Matching for 'DuckDB'
Description: Builds and loads the 'ducksassy' extension for 'DuckDB', providing approximate DNA, IUPAC and ASCII string matching through the 'Sassy' SIMD kernels. Search scalar values, pattern panels and CRISPR guide targets from SQL. The matching method is described by Beeloo and Groot Koerkamp (2026) <doi:10.1093/bioinformatics/btag244>.
Authors: Sounkou Mahamane Toure [aut, cre], Rick Beeloo [ctb, cph] (Sassy, bundled under the MIT license), Ragnar Groot Koerkamp [ctb, cph] (Sassy, bundled under the MIT license), DuckDB Foundation [cph] (DuckDB headers and metadata tool, bundled under the MIT license)
Maintainer: Sounkou Mahamane Toure <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2026-10-07 08:22:15 UTC
Source: https://github.com/RGenomicsETL/ducksassy

Help Index


Open a DuckDB connection with Ducksassy loaded

Description

Creates an isolated DuckDB database handle, opens a DBI connection, and loads the extension bundled with Rducksassy. The database handle permits unsigned extensions because locally built DuckDB extensions are not signed.

Usage

rducksassy_connect(dbdir = ":memory:", read_only = FALSE, config = list(), ...)

Arguments

dbdir

Database file path or ":memory:".

read_only

Open an existing database without write access.

config

Named DuckDB configuration values.

...

Additional arguments passed to duckdb::duckdb().

Value

A live DuckDB DBI connection. Disconnect it with DBI::dbDisconnect(con, shutdown = TRUE).

Examples

con <- rducksassy_connect()
DBI::dbGetQuery(con, "SELECT sassy_contains('ACGT', 'TTACGT', 0)")
DBI::dbDisconnect(con, shutdown = TRUE)

Load Ducksassy into a DuckDB connection

Description

Loads the extension bundled with Rducksassy into an existing compatible DuckDB DBI connection.

Usage

rducksassy_load(con)

Arguments

con

A DuckDB DBI connection.

Value

con, invisibly.

Examples

driver <- duckdb::duckdb(
  config = list(allow_unsigned_extensions = "true"),
  shared_home = FALSE
)
con <- DBI::dbConnect(driver)
rducksassy_load(con)
DBI::dbDisconnect(con, shutdown = TRUE)