# Locate the example data file included in the package
file_path <- system.file("extdata", "example_titer_data.csv", package = "topolow")
# Check if the file exists before running the example
if (file.exists(file_path)) {
# Process the example titer data
results <- process_antigenic_data(
file_path,
antigen_col = "virusStrain",
serum_col = "serumStrain",
value_col = "titer",
is_titer = TRUE,
metadata_cols = c("cluster", "color")
)
# View the long format data
print(results$long)
# View the distance matrix
print(results$matrix)
}
Run the code above in your browser using DataLab