Skip to content

Create options for comparing receptor sequences

Source code

Description

Create sequence comparison options for the seq_options argument of filter_immundata() or mutate_immundata(). Use these options to compare a sequence column with one or more reference sequences or patterns.

Usage

make_seq_options(
  query_col,
  patterns,
  method = c("exact", "lev", "hamm", "regex"),
  max_dist = NA,
  name_type = c("index", "pattern")
)

Arguments

query_col Name of the sequence column to compare, such as “cdr3_aa”.
patterns One or more reference sequences or regular-expression patterns.
method Comparison method: “exact”, “regex”, “lev” (Levenshtein distance), or “hamm” (Hamming distance). The default is “exact”.
max_dist Maximum distance accepted by filter_immundata() when method = “lev” or method = “hamm”. A value is required when filtering with either distance method. This argument has no effect on mutate_immundata(), which reports every calculated distance.
name_type How result columns created by mutate_immundata() are named. “index”, the default, creates short numbered names. “pattern” includes the reference pattern in each name. This argument does not change which receptors are kept by filter_immundata().

Value

A named list for the seq_options argument of filter_immundata() or mutate_immundata().

See Also

filter_immundata(), mutate_immundata(), annotate_receptors()