setup_antigenic_map: Setup antigenic map for serosolver

View source: R/antigenic_map.R

setup_antigenic_mapR Documentation

Setup antigenic map for serosolver

Description

Cleans up an antigenic_map data frame based on provided inputs. Two checks are carried out. First, it will check if an antigenic map is provided, and if so, it will align its entries with possible_exposure_times. If no antigenic map is provided, it will create a dummy map where all pathogens have the same position on the map. Second, it will enumerate the antigenic map for each unique biomarker group, unless the antigenic map has already been enumerated.

Usage

setup_antigenic_map(
  antigenic_map = NULL,
  possible_exposure_times = NULL,
  n_biomarker_groups = 1,
  unique_biomarker_groups = c(1),
  verbose = TRUE
)

Arguments

antigenic_map

the antigenic map data frame

possible_exposure_times

a vector of possible exposure times, which will be used to align the antigenic map

n_biomarker_groups

the number of biomarker groups in the antigenic map

unique_biomarker_groups

a vector of unique biomarker groups in the antigenic map

verbose

if TRUE, prints messages about the process

Value

list with three entries: 1) the updated antigenic map, 2) the updated possible_exposure_times vector, 3) a set of indices matching possible_exposure_times to entries in the antigenic map

See Also

Other antigenic_maps: generate_antigenic_map_flexible()


adamkucharski/serosolver documentation built on June 12, 2025, 9:08 a.m.