Skip to contents

Calculates the p-epitope antigenic distance between two aligned amino acid sequences of influenza HA using epitope residue sites defined for the specified subtype. Several summary modes are supported, including the dominant (maximum), mean, median, and Anderson's average definition.

Usage

pepitope(
  seq_1,
  seq_2,
  subtype,
  mode = "dominant",
  harmonize_b_lineages = TRUE,
  ambiguous_residues = "xX?"
)

Arguments

seq_1, seq_2

Character strings. Aligned amino acid sequences.

subtype

Character. HA subtype or lineage (e.g., `"H1N1"`, `"H3N2"`, `"B/Victoria"`).

mode

Character. Summary mode to apply across epitope sites. Options: `"dominant"` (default), `"mean"`, `"median"`, `"anderson"`, or `epitope` to return per-epitope distances.

harmonize_b_lineages

Logical. Whether to treat B lineages as unified. Defaults to `TRUE`.

ambiguous_residues

Optional argument (currently unused).

Value

A single numeric value (summary distance) or a numeric vector of normalized distances per epitope site if `mode` is `NULL`.

References

- Gupta et al. (2006), PMID: 16460844 - Pan et al. (2010), PMID: 21123189 - Anderson et al. (2018), PMID: 29433425