Adds one logical “does this sequence match this regex?” column per pattern,
using DuckDB’s regexp_matches()
via the dd
escape hatch.
annotate_tbl_regex(
tbl_data,
query_col,
patterns,
filter_out = FALSE,
name_type = c("index", "pattern")
)
A duckplyr table (e.g. idata$receptors
).
Character(1). Name of the sequence column to search.
Character vector of regular expressions.
Logical(1). If TRUE, filter out sequences which don't match the pattern.
One of "pattern"
or "index"
:
- "pattern"
: column names match_regex_<sanitized_pattern>
- "index"
: column names `match_regex_
The input table with new logical match columns added.