Code for the manuscript by Rössler, Netzl, et al. 2026.
R >= 4.1.0 is recommended.
install.packages(c(
"tidyverse",
"ggplot2",
"patchwork",
"readxl",
"lubridate",
"stringr",
"cowplot",
"ggrepel",
"htmlwidgets",
"webshot2",
"png",
"grid",
"gridExtra",
"Rmisc",
"plyr",
"rstatix"
))The following packages are from the Antigenic Cartography group and must be installed via remotes:
install.packages("remotes")
remotes::install_github("acorg/Racmacs")
remotes::install_github("acorg/ablandscapes")
remotes::install_github("acorg/r3js")
remotes::install_github("acorg/meantiter")The data/ directory is not included in this repository. The scripts expect the following structure under data/:
data/
maps/ # Antigenic maps (.ace files)
titer_data/ # Neutralization and binding titer data
metadata/ # Serum group color tables and other metadata
All scripts are run from the code/ directory, we recommend creating an Rproject to easily set the home directory to ../code. They should be run in numerical order, as later scripts depend on outputs (RDS files, CSV files) generated by earlier ones.
| Script | Description |
|---|---|
01_make_nhp_map_BA3_in_BA1.R |
Builds the NHP antigenic map including BA.3.2.2 titrations. Saves the map and diagnostic plots. |
02_fit_nhp_vacc_landscapes.R |
Fits antibody landscapes to NHP vaccine serum groups. Saves landscape fit objects as RDS. |
03-fit_biorep_landscapes.R |
Fits antibody landscapes to human biorep neutralization data. Saves landscape fit objects and titer tables as RDS/CSV. |
04-plota_biorep_landscapes_plot.R |
Visualizes biorep and NHP landscapes. Saves interactive landscape HTML widgets and static comparison plots. |
05-fit_biorep_T_cell_data.R |
Fits CD4 and CD8 T cell antibody landscapes. Saves landscape fit objects and plots for T cell data. |
06-fit_biorep_binding_landscapes.R |
Fits antibody landscapes to human biorep binding (Luminex) data. Saves landscape fit objects and titer tables as RDS/CSV. |
07-plot_biorep_binding_landscapes_plot.R |
Visualizes biorep binding landscapes. Saves interactive HTML widgets and static comparison plots. |
08-plot_biorep_over_time.R |
Plots biorep neutralization GMTs and fold-changes over time. |
These scripts are also run from the code/som2026 directory. Figures are saved as output in the respective directory.
| Script | Description |
|---|---|
optimum_exploration/02_nhp_map_diagnostics.R |
Diagnostic analysis of multiple map optimization runs: stress distribution and procrustes RMSD across optima. |
nhp_multiexposure_model/2608_NHP_biorep_modelled_amt_landscapes.R |
Models multi-exposure antibody landscapes by summing NHP single-vaccine GMT landscapes and comparing to human biorep data. |
The functions/ directory contains helper functions sourced by the analysis scripts:
excel_to_titertable_functions.R— reading titer data from Excel filesmap_functions.R— Racmacs map utilities and ggplot wrapperslong_map_info.R— converting map objects to long-format data framestiter_lineplot_functions.R— titer line plot helperssr_group_color_functions.R— serum group color assignmentsams_landscape_functions.R— antibody landscape plotting utilities
All figures from code are saved in the figures/ directory, supplementary figures are saved directly in the som subdirectory:
- Static plots: PNG files at 300 dpi
- Interactive 3D landscapes: HTML widgets (viewable in any browser)
This code was prepared for publication with assistance from Claude Sonnet 4.6 (Anthropic). The AI assisted with converting internal lab notebook scripts to standalone R scripts suitable for public sharing, including removing lab-specific rendering syntax, replacing inline plot display calls with ggsave()/htmlwidgets::saveWidget() file output, and writing this README.