Custom code supporting the study by Kok et al., "A vaccine central in A(H5) influenza antigenic space confers broad immunity", in which the first global characterization of the antigenic evolution of A(H5) influenza viruses was performed using antigenic cartography and a unique dataset of over 100 A(H5) antigens and 30 ferret sera. This novel knowledge was then leveraged to design of a broadly protective A(H5) vaccine antigen covering antigenic space widely.
Most of the analyses performed in the study, including the map making and map testing, are available through the Racmacs library. Additional analyses using code not directly available in the Racmacs libray were performed. Code written for these analyses is available in this repository. Input data, (example) code with instructions and expected output are included within each folder. For installation instructions and dependencies please refer to the respective software packages/libraries listed.
R code to make antibody profiles, showing the raw hemagglutination inhibition (HI) reactivity of a serum to antigens in the A(H5) antigenic map. Lines connect the position of the serum with the antigens against which a titer above the assay’s detection limit is observed (i.e. ≥ 10). Antigens and connecting lines are colored by the HI titer as indicated in the bottom-left legend. The R code uses Racmacs (version 1.2.3) and r3js (version 0.0.2) libraries.
Code to calculate the volumes of Bayesian bootstrap blobs, computed through the ‘bootstrapBlobs’ function in Racmacs. Python code using PyRacmacs and fitting a triangular mesh to each bootstrap point using the package trimesh (version 3.2.0). R code used in Kok et al. 2025 to color-code antigens in the A(H5) antigenic map according to bootstrap volume radii (Supplementary Data 3f) is also provided.
R code to generate a movie where antigens and sera appear chronologically in the A(H5) antigenic map, allowing to retrace the evolution of A(H5) antigenic space over time. Used in Kok et al. 2025 for Supplementary Movie. The R code uses, amongst others, Racmacs (version 1.2.3) and r3js (version 0.0.2) libraries.
Given two maps and n the number of pieces, piecewise Procrustes aims to find the optimal partition of the coordinates into n pieces such that the sum of Procrustes errors is minimized. In essence, the different pieces of the map are allowed to move freely relative to each other when transitioning between dimensions. If one can obtain a lower Procrustes error between a lower and higher dimensional map when using few pieces, the lower dimensional map can be embedded in the higher dimensions by a relatively simple transformation such that it would look like the higher dimensional map, i.e. the two maps are geometrically similar. Here, we have used this method to compare the antigenic map in three and four dimensions. Python code using PyRacmacs to calculate the piecewise Procrustes between the four dimensional and three dimensional antigenic maps is provided. R code used in Kok et al. 2025 to color-code antigens in the antigenic map according to the Procrustes length and number of pieces (Supplementary Data 3a,b) is also provided.