This utility function converts the output of a fitted Racmacs map into a pairwise Euclidean distance matrix between all antigenic strains.
Value
A symmetric matrix of pairwise Euclidean distances between strains, with row and column names corresponding to strain names.
Details
This function extracts the 2D coordinates of antigens from the Racmacs map and computes Euclidean distances between all pairs. Only the lower triangle is explicitly computed, and the upper triangle is filled by symmetry.
Examples
if (FALSE) { # \dontrun{
map <- Racmacs::read.acmap("my_map_file.ace")
distance_matrix <- racmaps_map_to_distances(map)
print(distance_matrix)
} # }