| Title: | Serology-Based Data Analysis and Visualization |
|---|---|
| Description: | Data wrangling and cleaning, quality control checks and implementation of machine learning classification algorithm. |
| Authors: | Dionne Argyropoulos, PhD [aut, cre] (ORCID: <https://orcid.org/0000-0002-8068-0215>), Eamon Conway, PhD [aut], Caitlin Bourke, PhD [aut], Connie Li-Wai-Suen, PhD [aut], Shazia Ruybal-Pesántez, PhD [aut], Ivo Mueller, PhD [ctb], Rhea Longley, DPhil [ctb], Lauren Smith, PhD [aut] |
| Maintainer: | "Dionne Argyropoulos, PhD" <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 1.1.1 |
| Built: | 2026-06-05 07:10:06 UTC |
| Source: | https://github.com/dionnecargy/serotrackr |
This function checks the platform the user has input and whether it aligns with the correct format as expected. Will report error if NOT aligned.
.check_platform(raw_data, platform, file_name).check_platform(raw_data, platform, file_name)
raw_data |
String with the raw data path. |
platform |
"magpix", "bioplex" or "intelliflex". |
file_name |
String with the raw data filename (for error messaging). |
TRUE: if platform == file format, ERROR message when platform does not equal file format.
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") .check_platform(raw_data = your_raw_data, platform = "magpix", file_name = basename(your_raw_data))your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") .check_platform(raw_data = your_raw_data, platform = "magpix", file_name = basename(your_raw_data))
Helper function to process bioplex data
.clean_bioplex(df).clean_bioplex(df)
df |
Output from '.read_luminex.file()' |
Cleaned data fame
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_BioPlex_plate1.xlsx", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) results <- .clean_bioplex(df)your_raw_data <- system.file("extdata", "example_BioPlex_plate1.xlsx", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) results <- .clean_bioplex(df)
Helper function to process luminex (Magpix/Intelliflex) data
.clean_luminex(df, row1, row2).clean_luminex(df, row1, row2)
df |
Raw luminex file |
row1 |
Leading row to subset |
row2 |
Final row to subset |
Cleaned data fame
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) cfg <- .magpix_version_config("4.2") row1 <- which(df$xPONENT == "Median") row2 <- which(df$xPONENT == "Net MFI") results <- .clean_luminex(df, row1, row2)your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) cfg <- .magpix_version_config("4.2") row1 <- which(df$xPONENT == "Median") row2 <- which(df$xPONENT == "Net MFI") results <- .clean_luminex(df, row1, row2)
Convert dilution to predicted mfi using known standard curve fit.
.convert_dilution_to_mfi(dilution, params).convert_dilution_to_mfi(dilution, params)
dilution |
Known dilution of samples |
params |
Known parameters for five parameter logistic fit. |
Returns the predicted mfi of a sample with known dilution.
Eamon Conway
# This function is typically called internally by higher-level workflows. # Below is a minimal runnable example using dummy parameters. # Five-parameter logistic model typically expects parameters in the order: # a, b, c, d, e (e often log-transformed) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01)) # Example dilution value dilution_example <- 0.1 # Predict MFI from the dummy standard curve .convert_dilution_to_mfi(dilution_example, dummy_params)# This function is typically called internally by higher-level workflows. # Below is a minimal runnable example using dummy parameters. # Five-parameter logistic model typically expects parameters in the order: # a, b, c, d, e (e often log-transformed) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01)) # Example dilution value dilution_example <- 0.1 # Predict MFI from the dummy standard curve .convert_dilution_to_mfi(dilution_example, dummy_params)
Convert mfi to dilution using known standard curve fit.
.convert_mfi_to_dilution(mfi, params, min_relative_dilution).convert_mfi_to_dilution(mfi, params, min_relative_dilution)
mfi |
Known mfi of samples |
params |
Known parameters for five parameter logistic fit. |
min_relative_dilution |
Known minimum value of dilution in the standard curve. Relative means setting S1 to a dilution/RAU/concentration of 1. |
Returns the dilution of each sample in mfi.
Eamon Conway
# This function is typically used within larger analysis pipelines. # Below is a minimal runnable example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e on the log scale) # Additional placeholders (f, g) included so params[6] and params[7] exist. dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01), f = -5, g = 5) # Example MFI value mfi_example <- 1500 # Minimum relative dilution allowed min_rel_dil <- 1 # Convert MFI to dilution .convert_mfi_to_dilution(mfi_example, dummy_params, min_rel_dil)# This function is typically used within larger analysis pipelines. # Below is a minimal runnable example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e on the log scale) # Additional placeholders (f, g) included so params[6] and params[7] exist. dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01), f = -5, g = 5) # Example MFI value mfi_example <- 1500 # Minimum relative dilution allowed min_rel_dil <- 1 # Convert MFI to dilution .convert_mfi_to_dilution(mfi_example, dummy_params, min_rel_dil)
Convert mfi to dilution using known standard curve fit and no bounds unless you are below the asymptote of the standard curve. In this situation we set your value to min_relative_dilution. I dunno argue?
.convert_mfi_to_dilution_no_bounds(mfi, params, min_relative_dilution).convert_mfi_to_dilution_no_bounds(mfi, params, min_relative_dilution)
mfi |
Known mfi of samples |
params |
Known parameters for five parameter logistic fit. |
min_relative_dilution |
Known minimum value of dilution in the standard curve. Relative means setting S1 to a dilution/RAU/concentration of 1. |
Returns the dilution of each sample in mfi.
Eamon Conway
# This function is generally called inside higher-level analysis workflows. # Below is a minimal self-contained example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e typically supplied on the log scale) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01)) # Example MFI value mfi_example <- 1500 # Minimum relative dilution from the standard curve min_rel_dil <- 1 # Convert MFI to dilution without bounds .convert_mfi_to_dilution_no_bounds(mfi_example, dummy_params, min_rel_dil)# This function is generally called inside higher-level analysis workflows. # Below is a minimal self-contained example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e typically supplied on the log scale) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01)) # Example MFI value mfi_example <- 1500 # Minimum relative dilution from the standard curve min_rel_dil <- 1 # Convert MFI to dilution without bounds .convert_mfi_to_dilution_no_bounds(mfi_example, dummy_params, min_rel_dil)
Convert mfi to dilution using known standard curve fit and no lower bound unless you are below the asymptote of the standard curve. In this situation we set your value to min_relative_dilution. I dunno argue?
.convert_mfi_to_dilution_no_lower_bound(mfi, params, min_relative_dilution).convert_mfi_to_dilution_no_lower_bound(mfi, params, min_relative_dilution)
mfi |
Known mfi of samples |
params |
Known parameters for five parameter logistic fit. |
min_relative_dilution |
Known minimum value of dilution in the standard curve. Relative means setting S1 to a dilution/RAU/concentration of 1. |
Returns the dilution of each sample in mfi.
Eamon Conway
# This function is usually called inside higher-level analysis steps. # Below is a minimal runnable example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e typically on the log scale) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01), f = 0, g = 5) # Example MFI value mfi_example <- 1500 # Minimum relative dilution from the standard curve min_rel_dil <- 1 # Convert MFI to dilution without applying a lower bound .convert_mfi_to_dilution_no_lower_bound(mfi_example, dummy_params, min_rel_dil)# This function is usually called inside higher-level analysis steps. # Below is a minimal runnable example using dummy values. # Dummy five-parameter logistic fit parameters: # a, b, c, d, e (with e typically on the log scale) dummy_params <- c(a = 10000, b = 1.2, c = 0.05, d = 50, e = log(0.01), f = 0, g = 5) # Example MFI value mfi_example <- 1500 # Minimum relative dilution from the standard curve min_rel_dil <- 1 # Convert MFI to dilution without applying a lower bound .convert_mfi_to_dilution_no_lower_bound(mfi_example, dummy_params, min_rel_dil)
Helper function to process luminex sections
.extract_luminex_sections(df, cfg, plt).extract_luminex_sections(df, cfg, plt)
df |
String with the raw data path. |
cfg |
Magpix version output of .magpix_version_config(). |
plt |
Platform (magpix, intelliflex) |
List of data_raw, results, counts, blanks, stds, run
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) cfg <- .magpix_version_config("4.2") section <- .extract_luminex_sections(df, cfg, "magpix")your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) cfg <- .magpix_version_config("4.2") section <- .extract_luminex_sections(df, cfg, "magpix")
We wish to convert the standard curve samples to a five parameter logistic curve. This function takes those values and calls optim to determine the fit.
.fit_standard_curve(mfi, dilution, control = NULL).fit_standard_curve(mfi, dilution, control = NULL)
mfi |
Known mfi of samples |
dilution |
Known dilution of samples |
control |
Optional list of control parameters for the underlying call to optim. |
standard curve log logistic
Eamon Conway
# This function is typically called within data-processing workflows. # Workflow-style example (not run on CRAN) # This block demonstrates how .fit_standard_curve() is typically used # inside the MFItoRAU_Adj-conversion pipeline. # Step 1 — Prepare master file (normally from readSeroData) master_file <- data.frame( Location = c("A1","A2","A3"), Sample = c("S1","S2","S3"), Plate = c("Plate1","Plate1","Plate1"), Ag1 = c(12000, 8000, 4000), Ag2 = c(9000, 5000, 2500) ) # Convert antigen columns to numeric L <- master_file |> dplyr::mutate(dplyr::across(-c(Location, Sample, Plate), as.numeric)) # Fake plate layout (normally from readPlateLayout) layout <- list(Plate1 = data.frame(Location = c("A1","A2","A3"), WellType = "STD")) # Step 2 — Load reference standard curve MFI values (dummy data) refs <- data.frame( std_plate = rep("StdPlate1", 5), antigen = rep("Ag1", 5), dilution = c(1, 1/2, 1/4, 1/8, 1/16), eth_mfi = c(14000, 7000, 3500, 1800, 900), png_mfi = c(15000, 7600, 3800, 1900, 950) ) # Step 3 — Define optimisation settings control <- list( maxit = 10000, abstol = 1e-8, reltol = 1e-6 ) # Step 4 — Fit ETH and PNG curves per standard-plate × antigen ref_fit <- refs |> dplyr::group_by(.data$std_plate, .data$antigen) |> tidyr::nest() |> dplyr::mutate( eth_fit = purrr::map(data, ~ .fit_standard_curve(.x$eth_mfi, .x$dilution, control)), png_fit = purrr::map(data, ~ .fit_standard_curve(.x$png_mfi, .x$dilution, control)) ) ref_fit# This function is typically called within data-processing workflows. # Workflow-style example (not run on CRAN) # This block demonstrates how .fit_standard_curve() is typically used # inside the MFItoRAU_Adj-conversion pipeline. # Step 1 — Prepare master file (normally from readSeroData) master_file <- data.frame( Location = c("A1","A2","A3"), Sample = c("S1","S2","S3"), Plate = c("Plate1","Plate1","Plate1"), Ag1 = c(12000, 8000, 4000), Ag2 = c(9000, 5000, 2500) ) # Convert antigen columns to numeric L <- master_file |> dplyr::mutate(dplyr::across(-c(Location, Sample, Plate), as.numeric)) # Fake plate layout (normally from readPlateLayout) layout <- list(Plate1 = data.frame(Location = c("A1","A2","A3"), WellType = "STD")) # Step 2 — Load reference standard curve MFI values (dummy data) refs <- data.frame( std_plate = rep("StdPlate1", 5), antigen = rep("Ag1", 5), dilution = c(1, 1/2, 1/4, 1/8, 1/16), eth_mfi = c(14000, 7000, 3500, 1800, 900), png_mfi = c(15000, 7600, 3800, 1900, 950) ) # Step 3 — Define optimisation settings control <- list( maxit = 10000, abstol = 1e-8, reltol = 1e-6 ) # Step 4 — Fit ETH and PNG curves per standard-plate × antigen ref_fit <- refs |> dplyr::group_by(.data$std_plate, .data$antigen) |> tidyr::nest() |> dplyr::mutate( eth_fit = purrr::map(data, ~ .fit_standard_curve(.x$eth_mfi, .x$dilution, control)), png_fit = purrr::map(data, ~ .fit_standard_curve(.x$png_mfi, .x$dilution, control)) ) ref_fit
Helper function to identify Magpix version
.magpix_version_config(version).magpix_version_config(version)
version |
String with the raw data path. |
specific column names for filtering for xPONENT software v4.2 and v4.3
Dionne Argyropoulos
version = "4.2" .magpix_version_config(version)version = "4.2" .magpix_version_config(version)
Helper function to add Sample IDs to output.
.merge_mfitorau(df, layout, plate_level).merge_mfitorau(df, layout, plate_level)
df |
Data frame following 5-parameter logistic function applied. |
layout |
Output from 'readPlateLayout()'. |
plate_level |
Specific plate of interest. |
Processed data frame with correct Sample IDs.
Dionne Argyropoulos
Helper function to process bioplex sections
.post_process_bioplex(df).post_process_bioplex(df)
df |
Output from '.read_luminex_file()' |
List of data_raw, results, counts, blanks, stds, run
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_BioPlex_plate1.xlsx", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data) sections <- .post_process_bioplex(df)
Helper function to process luminex into master_list
.post_process_luminex(sections, file_name, master_list).post_process_luminex(sections, file_name, master_list)
sections |
Output from '.post_process_bioplex()'. |
file_name |
User input file name. |
master_list |
Intermediary df from 'readSeroData()'. |
List of data_raw, results, counts, blanks, stds, run
Dionne Argyropoulos
Helper function to fit a 5-parameter logistic standard curve to dilutions
.process_antigen_loglog( subset_data, antigen, dilution, s1_concentration, s_final_concentration, unknown_letters = c("U", "X") ).process_antigen_loglog( subset_data, antigen, dilution, s1_concentration, s_final_concentration, unknown_letters = c("U", "X") )
subset_data |
Data for one plate. |
antigen |
Data for one antigen. |
dilution |
Set of five or ten. |
s1_concentration |
Concentration of highest dilution. |
s_final_concentration |
Concentration lowest dilution. |
unknown_letters |
Bioplex, Magpix or Intelliflex known unknown letters (Default = U and X). |
A list of the model results data frame and model.
Connie Li Wai Suen, Dionne Argyropoulos
Helper function to read raw luminex files
.read_luminex_file(file).read_luminex_file(file)
file |
String with the raw data path. |
raw data frame
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data)your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") df <- .read_luminex_file(your_raw_data)
This is a helper function to be used inside 'readSeroData()' to relabel columns for each plate.
.relabel_columns(df).relabel_columns(df)
df |
Data frame from 'readSeroData()' processing. |
A data fame with columns renamed
Dionne Argyropoulos
your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") if ( requireNamespace("dplyr", quietly = TRUE) && requireNamespace("janitor", quietly = TRUE) ) { # Read in raw luminex file df <- .read_luminex_file(your_raw_data) # Get the start and end rows of the data section: start = "Median", end = "Net MFI" row1 <- which(df$xPONENT == "Median") row2 <- which(df$xPONENT == "Net MFI") # Apply data processing pipeline, including .relabel_columns() df |> dplyr::slice((row1 + 1):(row2 - 1)) |> janitor::row_to_names(row_number = 1) |> janitor::clean_names() |> dplyr::select(dplyr::where(~ !all(is.na(.x)))) |> dplyr::filter(dplyr::if_any(dplyr::everything(), ~ !is.na(.x))) |> dplyr::mutate(dplyr::across(everything(), ~ gsub("NaN", 0, .))) |> .relabel_columns() }your_raw_data <- system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR") if ( requireNamespace("dplyr", quietly = TRUE) && requireNamespace("janitor", quietly = TRUE) ) { # Read in raw luminex file df <- .read_luminex_file(your_raw_data) # Get the start and end rows of the data section: start = "Median", end = "Net MFI" row1 <- which(df$xPONENT == "Median") row2 <- which(df$xPONENT == "Net MFI") # Apply data processing pipeline, including .relabel_columns() df |> dplyr::slice((row1 + 1):(row2 - 1)) |> janitor::row_to_names(row_number = 1) |> janitor::clean_names() |> dplyr::select(dplyr::where(~ !all(is.na(.x)))) |> dplyr::filter(dplyr::if_any(dplyr::everything(), ~ !is.na(.x))) |> dplyr::mutate(dplyr::across(everything(), ~ gsub("NaN", 0, .))) |> .relabel_columns() }
Helper function to set up MFI to RAU function
.setup_mfitorau_inputs(df, plate_list, std_point).setup_mfitorau_inputs(df, plate_list, std_point)
df |
Output from 'readSeroData()'. |
plate_list |
Output from 'readPlateLayout()'. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
A list of processed sero_data, processed plate layout, antigen names, and parameters for standard curve.
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Setup MFI to RAU setup <- .setup_mfitorau_inputs( df = sero_data$results, plate_list = plate_list, std_point = 10 )# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Setup MFI to RAU setup <- .setup_mfitorau_inputs( df = sero_data$results, plate_list = plate_list, std_point = 10 )
This function classifies unknown samples as recently exposed or not (Note: MFItoRAU() or MFItoRAU_Adj() needs to be run first to convert to RAU).
classifyResults( mfi_to_rau_output, algorithm_type = "antibody_model", sens_spec = "balanced", qc_results, project = NULL )classifyResults( mfi_to_rau_output, algorithm_type = "antibody_model", sens_spec = "balanced", qc_results, project = NULL )
mfi_to_rau_output |
Output from 'MFItoRAU()' or 'MFItoRAU_Adj()'. |
algorithm_type |
Algorithm: "antibody_model" (PvSEM algorithm; default) |
sens_spec |
User-selected Sensitivity/Specificity threshold: "balanced" (default) or "90% specificity". |
qc_results |
Output from 'runQC()'. |
project |
Default = NULL. Only write "pkpfpv" if using Pk/Pf/Pv pipeline. |
- Data frame with exposure status for every sample. - Summary table with positive/negative results for each threshold.
Lauren Smith, Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Perform Pv classification pv_classified <- classifyResults( mfi_to_rau_output = mfi_to_rau, algorithm_type = "antibody_model", sens_spec = "balanced", qc_results = qc_results )# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Perform Pv classification pv_classified <- classifyResults( mfi_to_rau_output = mfi_to_rau, algorithm_type = "antibody_model", sens_spec = "balanced", qc_results = qc_results )
A dataset containing raw MFI values and metadata from a sample plate run (Bioplex).
A data frame with 103 rows and 15 columns.
This file is stored in inst/extdata
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (Bioplex).
A data frame with 103 rows and 15 columns.
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (Bioplex).
A data frame with 104 rows and 8 columns.
This file is stored in inst/extdata
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (Bioplex).
A data frame with 103 rows and 15 columns.
This file is stored in inst/extdata
Randomised data
This file is stored in inst/extdata
A data frame with 614 rows and 17 columns.
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (MAGPIX).
A data frame with 614 rows and 17 columns.
This file is stored in inst/extdata
Randomised data
This file is stored in inst/extdata
A data frame with 614 rows and 17 columns.
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (MAGPIX).
A data frame with 614 rows and 17 columns.
This file is stored in inst/extdata
Randomised data
This file is stored in inst/extdata
A data frame with 614 rows and 17 columns.
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (MAGPIX).
A data frame with 614 rows and 17 columns.
This file is stored in inst/extdata
Randomised data
A dataset containing raw MFI values and metadata from a sample plate run (MAGPIX).
A data frame with 614 rows and 17 columns.
This file is stored in inst/extdata
Randomised data
96 well plate map in a wide format used in the lab. Contains information of actual Sample ID names in each well.
A data frame with 9 rows and 13 variables.
Contains rows labelled "A" to "H"
Contains columns labelled "1" to "12"
This file is stored in inst/extdata
96 well plate map in a wide format used in the lab, used for when 10-point standard curves are required for pk/pf/pv analysis. Contains information of actual Sample ID names in each well.
A data frame with 9 rows and 13 variables.
Contains rows labelled "A" to "H"
Contains columns labelled "1" to "12"
This file is stored in inst/extdata
96 well plate map in a wide format used in the lab, used for when 5-point standard curves are required for pk/pf/pv analysis. Contains information of actual Sample ID names in each well.
A data frame with 9 rows and 13 variables.
Contains rows labelled "A" to "H"
Contains columns labelled "1" to "12"
This file is stored in inst/extdata
This function obtains the count data from the raw Median Fluorescent Intensity (MFI). This function relies on the 'readAntigens' and 'readSeroData' data processing functions.
getAntigenCounts(processed_counts, plate_list)getAntigenCounts(processed_counts, plate_list)
processed_counts |
Output from 'processCounts()'. |
plate_list |
Output from 'readPlateLayout()'. |
(i) Data frame providing bead counts per antigen per well per plate.
(ii) Designates whether wells should be repeated if there are 15 beads
(repeat) or if they are sufficient with > 15 beads (sufficient beads).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list) # Get Antigen Counts: antigen_cts <- getAntigenCounts(counts, plate_list)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list) # Get Antigen Counts: antigen_cts <- getAntigenCounts(counts, plate_list)
This function obtains the count data from the raw Median Fluorescent Intensity (MFI). This is an interim function used for the plotCounts function. This function relies on the 'readAntigens' and 'readSeroData' data processing functions.
getCounts(processed_counts)getCounts(processed_counts)
processed_counts |
Output from 'processCounts()'. |
(i) Data frame providing bead counts per well per plate. (ii)
Designates whether wells should be repeated if there are 15 beads (repeat)
or if they are sufficient with > 15 beads (sufficient beads).
Shazia Ruybal-Pesántez, Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts)
This function obtains the count data from the raw Median Fluorescent Intensity (MFI). This function relies on the output of the Antigen-specific counts ('getAntigenCounts') and the Well or Sample-specific counts ('getCounts').
getCountsQC(antigen_counts_output, counts_output)getCountsQC(antigen_counts_output, counts_output)
antigen_counts_output |
Output from 'getAntigenCounts'. |
counts_output |
Output from 'getCounts'. |
Joined data frame for all count data.
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list) antigen_cts <- getAntigenCounts(counts, plate_list) counts_qc <- getCountsQC(antigen_cts, counts_raw)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list) antigen_cts <- getAntigenCounts(counts, plate_list) counts_qc <- getCountsQC(antigen_cts, counts_raw)
A short function to obtain the github version from the repository. This is a generalisable function that can be used for any version tags on a repo.
getGithubRelease(repo_owner, repo_name)getGithubRelease(repo_owner, repo_name)
repo_owner |
GitHub Username |
repo_name |
GitHub Repository Name |
Version tag string
Dionne Argyropoulos
getGithubRelease( repo_owner = "dionnecargy", repo_name = "SeroTrackR" )getGithubRelease( repo_owner = "dionnecargy", repo_name = "SeroTrackR" )
Join multiple a plate layout files into one master file with multiple tabs
getPlateLayout(folder_path = getwd(), output_file = NULL)getPlateLayout(folder_path = getwd(), output_file = NULL)
folder_path |
A string containing your main folder for your project or the plate layout files. Default = current working directory. |
output_file |
A string for the path for your output master file. |
An .xlsx file saved to your current working directory with multiple tabs, one tab for each plate layout.
Dionne Argyropoulos
# Example 1: Create two example 96-well plates in-memory create_plate <- function(plate_name) { rows <- LETTERS[1:8] cols <- 1:12 df <- data.frame(plate = rows) for (col in cols) { df[[as.character(col)]] <- paste0(rows, col) } df$plate_id <- plate_name df } plate1 <- create_plate("Plate1") plate2 <- create_plate("Plate2") # Combine plates into a list to simulate getPlateLayout() output master_layout <- list( path = tempfile(fileext = ".xlsx"), # placeholder path data = list(Plate1 = plate1, Plate2 = plate2) ) # The returned list contains: # 1. path: the file path to the (simulated) master Excel file # 2. data: a list of data.frames, one per plate names(master_layout$data) # View sheet names # Example 2: Access individual plates directly layout_files <- list(plate1, plate2) # simulate individual Excel sheets master_layout2 <- list( path = tempfile(fileext = ".xlsx"), # placeholder path data = setNames(layout_files, c("Plate1", "Plate2")) ) # View the resulting plate names names(master_layout2$data)# Example 1: Create two example 96-well plates in-memory create_plate <- function(plate_name) { rows <- LETTERS[1:8] cols <- 1:12 df <- data.frame(plate = rows) for (col in cols) { df[[as.character(col)]] <- paste0(rows, col) } df$plate_id <- plate_name df } plate1 <- create_plate("Plate1") plate2 <- create_plate("Plate2") # Combine plates into a list to simulate getPlateLayout() output master_layout <- list( path = tempfile(fileext = ".xlsx"), # placeholder path data = list(Plate1 = plate1, Plate2 = plate2) ) # The returned list contains: # 1. path: the file path to the (simulated) master Excel file # 2. data: a list of data.frames, one per plate names(master_layout$data) # View sheet names # Example 2: Access individual plates directly layout_files <- list(plate1, plate2) # simulate individual Excel sheets master_layout2 <- list( path = tempfile(fileext = ".xlsx"), # placeholder path data = setNames(layout_files, c("Plate1", "Plate2")) ) # View the resulting plate names names(master_layout2$data)
This function gets the count data and outputs a table of the isolates to repeat or a statement to confirm that none need to be repeated.
getRepeats(qc_results, plate_list)getRepeats(qc_results, plate_list)
qc_results |
Output from 'runQC()'. |
plate_list |
Output from 'readPlateLayout()'. |
A data frame with wells to "fail", OR if no "fail" found will return text "No repeats necessary".
Dionne Argyropoulos
# Step 0: Load example raw data and plate layout raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) plate_layout <- system.file("extdata", "example_platelayout_1.xlsx", package = "SeroTrackR") # Step 1: Read data and plate layout sero_data <- readSeroData(raw_data, platform = "magpix") plate_list <- readPlateLayout(plate_layout, sero_data) # Step 2: Process counts qc_results <- runQC(sero_data, plate_list) # Step 3: Identify samples to repeat repeats_table <- getRepeats( qc_results = qc_results, plate_list = plate_list ) # View results repeats_table# Step 0: Load example raw data and plate layout raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) plate_layout <- system.file("extdata", "example_platelayout_1.xlsx", package = "SeroTrackR") # Step 1: Read data and plate layout sero_data <- readSeroData(raw_data, platform = "magpix") plate_list <- readPlateLayout(plate_layout, sero_data) # Step 2: Process counts qc_results <- runQC(sero_data, plate_list) # Step 3: Identify samples to repeat repeats_table <- getRepeats( qc_results = qc_results, plate_list = plate_list ) # View results repeats_table
A helper function to extract Sample ID based on plate name and row/col
getSampleID(processed_counts, plate_list)getSampleID(processed_counts, plate_list)
processed_counts |
Output from 'processCounts()'. |
plate_list |
Plate name inside of the plate layout file. |
Returns the corresponding Sample ID for the correct row/column in the plate layout file. Henceforth "Sample ID" refers to the code in the plate layout file, while "Sample" is the code in the Luminex file.
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control counts <- processCounts(sero_data) counts_raw <- getCounts(counts) sample_ids <- getSampleID(counts, plate_list)
This function imports the makes a card following the Fluent UI format.
makeCard(title, id, content, size = 12, style = "")makeCard(title, id, content, size = 12, style = "")
title |
String with the large title that will be printed in the card. |
id |
Identifying tag for use to link. |
content |
A list of content to be rendered. |
size |
A value from 1 to 12 of the width of the screen (default = 12). |
style |
Value for any css styling. |
A "card" in the Fluent UI format with content.
# Minimal example creating a simple Fluent UI card. # Safe for CRAN: runs only if shiny.fluent, htmltools, and glue are installed. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE) && requireNamespace("glue", quietly = TRUE)) { # Simple card content card_content <- list( htmltools::div("This is some example text inside the card.") ) # Create a Fluent UI card makeCard( title = "Example Card", id = "example-card", content = card_content, size = 6 ) }# Minimal example creating a simple Fluent UI card. # Safe for CRAN: runs only if shiny.fluent, htmltools, and glue are installed. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE) && requireNamespace("glue", quietly = TRUE)) { # Simple card content card_content <- list( htmltools::div("This is some example text inside the card.") ) # Create a Fluent UI card makeCard( title = "Example Card", id = "example-card", content = card_content, size = 6 ) }
This function fits a 5-parameter logistic standard curve to the dilutions of the positive controls for each protein and converts the MFI values into relative antibody units (RAU) written by Connie Li Wai Suen.
MFItoRAU(sero_data, plate_list, qc_results, std_point = 10, project = NULL)MFItoRAU(sero_data, plate_list, qc_results, std_point = 10, project = NULL)
sero_data |
Output from 'readSeroData()'. |
plate_list |
Output from 'readPlateLayout()'. |
qc_results |
Output from 'runQC()'. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
project |
Default = NULL. Only write "pkpfpv" if using Pk/Pf/Pv pipeline. |
A list of three data frames: 1. Data frame with MFI data, converted RAU data and matched SampleID's. 2. Plot information for 'plotModel' function 3. Data frame of RAU data for random forest classification use.
Dionne Argyropoulos, Connie Li Wai Suen
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU mfi_to_rau <- MFItoRAU( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results )# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU mfi_to_rau <- MFItoRAU( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results )
This function fits a 5-parameter logistic standard curve to the dilutions of the positive controls for each protein and converts the MFI values into relative antibody units (RAU) written by Eamon Conway.
MFItoRAU_Adj(sero_data, plate_list, qc_results, std_point = 10, project = NULL)MFItoRAU_Adj(sero_data, plate_list, qc_results, std_point = 10, project = NULL)
sero_data |
Output from 'readSeroData()'. |
plate_list |
Output from 'readPlateLayout()'. |
qc_results |
Output from 'runQC()'. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
project |
Default = NULL. Only write "pkpfpv" if using Pk/Pf/Pv pipeline. |
A list of three data frames: 1. Data frame with MFI data, converted RAU data and matched SampleID's. 2. Plot information for 'plotModel' function. 3. Data frame of RAU data for random forest classification use.
Eamon Conway, Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results )# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results )
This function fits a 5-parameter logistic standard curve to the dilutions of the positive controls for each protein and converts the MFI values into relative antibody units (RAU).
MFItoRAU_LDH(sero_data, plate_list, std_point = "PvLDH", file_path = NULL)MFItoRAU_LDH(sero_data, plate_list, std_point = "PvLDH", file_path = NULL)
sero_data |
Output from 'readSeroData()' or 'readSeroData()'. |
plate_list |
Output from 'readPlateLayout()'. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = "PvLDH". |
file_path |
A file path to write the .csv final file. Default: Current working directory. |
A data frame containing the MFI and RAU Dilution values for each sample
Connie Li Wai Suen, Caitlin Bourke, Dionne Argyropoulos
# Example demonstrating multi-plate processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- system.file("extdata", "example_BioPlex_PvLDH_plate1.xlsx", package = "SeroTrackR") your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Read in raw BioPlex data sero_data <- readSeroData( raw_data = your_raw_data, platform = "bioplex" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data ) # Run MFI to RAU conversion mfi_outputs <- MFItoRAU_LDH( sero_data = sero_data, plate_list = plate_list ) # View All Outputs mfi_outputs# Example demonstrating multi-plate processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- system.file("extdata", "example_BioPlex_PvLDH_plate1.xlsx", package = "SeroTrackR") your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Read in raw BioPlex data sero_data <- readSeroData( raw_data = your_raw_data, platform = "bioplex" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data ) # Run MFI to RAU conversion mfi_outputs <- MFItoRAU_LDH( sero_data = sero_data, plate_list = plate_list ) # View All Outputs mfi_outputs
This function is utilised in the master function 'MFItoRAU_Plasmo()'.
MFItoRAU_Pk(processed_Pk, plate_list, std_point, qc_results)MFItoRAU_Pk(processed_Pk, plate_list, std_point, qc_results)
processed_Pk |
df$Pk of output 'processPkPfPv()' |
plate_list |
Output of 'readPlateLayout()' |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
qc_results |
Output from 'runQC()'. |
Data frame with MFI data, converted RAU data and matched SampleID's.
Dionne Argyropoulos, Caitlin Bourke
This function leverages 'MFItoRAU_Pk()' and 'MFItoRAU()' to create a final MFI to RAU output for Pk/Pf/Pv analyses.
MFItoRAU_Plasmo(sero_data, plate_list, panel = "panel1", std_point, qc_results)MFItoRAU_Plasmo(sero_data, plate_list, panel = "panel1", std_point, qc_results)
sero_data |
Output of 'readserodata_output()' |
plate_list |
Output of 'readPlateLayout()' |
panel |
Panel of Pk/Pf/Pv antigens. Default = "panel1" or user provided csv of Antigens and Species. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
qc_results |
Output from 'runQC()'. |
A list of three data frames: 1. Data frame with MFI data, converted RAU data, matched SampleID's, all intermediate dilution conversion factors 2. Data frame with only SampleID's, MFI and RAU data 3. Data frame #2 in long-format
Dionne Argyropoulos, Caitlin Bourke
# Example demonstrating multi-plate 5-standard processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data_5std <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) your_plate_layout_5std <- system.file( "extdata", "example_platelayout_pk_5std.xlsx", package = "SeroTrackR" ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data_5std, platform = "magpix" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout_5std, sero_data = sero_data ) # Quality control qc_results <- runQC(sero_data, plate_list) # Run MFI to RAU conversion mfi_outputs <- MFItoRAU_Plasmo( sero_data = sero_data, plate_list = plate_list, panel = "panel1", std_point = 5, qc_results = qc_results ) # View All Outputs mfi_outputs# Example demonstrating multi-plate 5-standard processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data_5std <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) your_plate_layout_5std <- system.file( "extdata", "example_platelayout_pk_5std.xlsx", package = "SeroTrackR" ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data_5std, platform = "magpix" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout_5std, sero_data = sero_data ) # Quality control qc_results <- runQC(sero_data, plate_list) # Run MFI to RAU conversion mfi_outputs <- MFItoRAU_Plasmo( sero_data = sero_data, plate_list = plate_list, panel = "panel1", std_point = 5, qc_results = qc_results ) # View All Outputs mfi_outputs
Enhances the 'plotCounts()' output by providing greater resolution, displaying antigens per plate, and enabling SampleID name visibility via hover (transformed to Plotly in server.R)
plotBeadCounts(qc_results)plotBeadCounts(qc_results)
qc_results |
Output from 'runQC()'. |
Dot plot with values > 15 threshold coloured in blue (sufficient beads) and less than or equal to 15 beads coloured in red (repeat) faceted by each antigen (ggplot).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Plot Bead Counts plotBeadCounts(qc_results)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Plot Bead Counts plotBeadCounts(qc_results)
This function gets the blank sample data and plots the blank sample Median Fluorescent Intensity (MFI) values.
plotBlanks(sero_data, experiment_name)plotBlanks(sero_data, experiment_name)
sero_data |
Output from 'readSeroData()'. |
experiment_name |
User-input experiment name. |
Bar plot showing whether MFI values for the blanks for each antigen per plate is above or below the threshold MFI = 50 (ggplot).
Shazia Ruybal-Pesantez, Dionne Argyropoulos
# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot blanks plotBlanks( sero_data = sero_data, experiment_name = "experiment1" )# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot blanks plotBlanks( sero_data = sero_data, experiment_name = "experiment1" )
One example of data visualisation to detect the median and interquartile range of the RAU values per antigen for seropositive and seronegative individuals. Please note that the 'classifyResults()' function must be run first.
plotBoxPlotClassification(all_classifications, selected_threshold)plotBoxPlotClassification(all_classifications, selected_threshold)
all_classifications |
Data frame of 'classifyResults()' for all sens_spec thresholds. |
selected_threshold |
String with the threshold. |
Box plots with RAU values for each protein stratified by classification (ggplot).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Define sens/spec thresholds sens_spec_all <- c( "balanced", "90% specificity" ) # Step 5: Classify results across all thresholds all_classifications <- purrr::map_dfr(sens_spec_all, ~{ classifyResults( mfi_to_rau_output = mfi_to_rau, algorithm_type = "antibody_model", sens_spec = .x, qc_results = qc_results ) |> as.data.frame() |> dplyr::mutate(sens_spec = .x) }) # Plot classification for a single threshold plotBoxPlotClassification(all_classifications, "balanced")# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Define sens/spec thresholds sens_spec_all <- c( "balanced", "90% specificity" ) # Step 5: Classify results across all thresholds all_classifications <- purrr::map_dfr(sens_spec_all, ~{ classifyResults( mfi_to_rau_output = mfi_to_rau, algorithm_type = "antibody_model", sens_spec = .x, qc_results = qc_results ) |> as.data.frame() |> dplyr::mutate(sens_spec = .x) }) # Plot classification for a single threshold plotBoxPlotClassification(all_classifications, "balanced")
This function gets the count data and plots the plate image, creating a new facet (i.e., panel) for each antigen and each line represents the different plates so that they can be visualised.
plotCounts(qc_results, experiment_name)plotCounts(qc_results, experiment_name)
qc_results |
Output from 'runQC()'. |
experiment_name |
User-input experiment name. |
Tile Plot showing binary result of "sufficient beads" with cut-off >15 beads and "repeat" less than or equal to 15 beads (ggplot).
Shazia Ruybal-Pesántez, Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Plot Counts plotCounts(qc_results, "experiment1")# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Plot Counts plotCounts(qc_results, "experiment1")
Boxplot of the MFI values.
plotMFI(mfi_to_rau_output, location)plotMFI(mfi_to_rau_output, location)
mfi_to_rau_output |
Output from 'MFItoRAU()' or 'MFItoRAU_Adj()' . |
location |
"PNG" or "ETH". |
Box plots with MFI values for each protein (ggplot).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot MFI values plotMFI(mfi_to_rau, "MFI")# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot MFI values plotMFI(mfi_to_rau, "MFI")
This function gets the Median Fluorescent Intensity (MFI) to Relative Antibody Units (RAU) model results data and plots the model fits based on 'MFItoRAU'.
plotModel(mfi_to_rau_output, sero_data)plotModel(mfi_to_rau_output, sero_data)
mfi_to_rau_output |
Output from 'MFItoRAU()'. |
sero_data |
Output from 'readSeroData()'. |
List of dot and line plots of MFI to RAU model standard curve, with each one representing an individual plate (ggplot).
Shazia Ruybal-Pesantez, Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot Model Results plotModel(mfi_to_rau, sero_data)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot Model Results plotModel(mfi_to_rau, sero_data)
This function gets the Median Fluorescent Intensity (MFI) to Relative Antibody Units (RAU) model results data and plots the model fits based on 'MFItoRAU_Adj.'
plotModel_Adj(mfi_to_rau_output, sero_data)plotModel_Adj(mfi_to_rau_output, sero_data)
mfi_to_rau_output |
Output from 'MFItoRAU_Adj()'. |
sero_data |
Output from 'readSeroData()'. |
List of dot and line plots of MFI to RAU model standard curve, with each one representing an individual plate (ggplot).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot Model Results plotModel_Adj(mfi_to_rau, sero_data)# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot Model Results plotModel_Adj(mfi_to_rau, sero_data)
Boxplot of the RAU values.
plotRAU(mfi_to_rau_output, location)plotRAU(mfi_to_rau_output, location)
mfi_to_rau_output |
Output from 'MFItoRAU()' or 'MFItoRAU_Adj()' . |
location |
"PNG" or "ETH". |
Box plots with RAU values for each protein (ggplot).
Dionne Argyropoulos
# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot RAU values plotRAU(mfi_to_rau, "ETH")# Step 0: Load example raw data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Step 2: Process counts and perform quality control qc_results <- runQC(sero_data, plate_list) # Step 3: Convert MFI to RAU using ETH beads mfi_to_rau <- MFItoRAU_Adj( sero_data = sero_data, plate_list = plate_list, qc_results = qc_results ) # Step 4: Plot RAU values plotRAU(mfi_to_rau, "ETH")
This function gets the standards data and plots the standard curves.
plotStds(sero_data, std_point = 10, location, experiment_name)plotStds(sero_data, std_point = 10, location, experiment_name)
sero_data |
Output from 'readSeroData()'. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve. Default = 10. Value is an integer. |
location |
"PNG" or "ETH" to filter WEHI standard curve data. |
experiment_name |
User-input experiment name. |
- Dot and line plot of standard curves (S1-S10) with PNG or Ethiopia stds underneath (ggplot). - WEHI-acceptable standard curve data on background of plot with user data.
Dionne Argyropoulos, Shazia Ruybal-Pesantez
# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds( sero_data = sero_data, location = "ETH", experiment_name = "experiment1" )# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds( sero_data = sero_data, location = "ETH", experiment_name = "experiment1" )
This function gets the standards data and plots the standard curves for any antigens (i.e., non-PvSeroTaT specific).
plotStds_all(sero_data, experiment_name)plotStds_all(sero_data, experiment_name)
sero_data |
Output from 'readSeroData()'. |
experiment_name |
User-input experiment name. |
- Dot and line plot of standard curves (S1-S10) - WEHI-acceptable standard curve data on background of plot with user data.
Shazia Ruybal-Pesantez, Dionne Argyropoulos
# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds_all( sero_data = sero_data, experiment_name = "experiment1" )# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds_all( sero_data = sero_data, experiment_name = "experiment1" )
This function gets the standards data and plots the standard curves for antigens in the Pk/Pf/Pv panel.
plotStds_PkPfPv(sero_data, experiment_name, panel = "panel1")plotStds_PkPfPv(sero_data, experiment_name, panel = "panel1")
sero_data |
Output from 'readSeroData()'. |
experiment_name |
User-input experiment name. |
panel |
Panel of Pk/Pf/Pv antigens. Default = "panel1" or user provided csv of Antigens and Species. |
- Dot and line plot of standard curves (S1-S10) - WEHI-acceptable standard curve data on background of plot with user data.
Dionne Argyropoulos
# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds_PkPfPv( sero_data = sero_data, experiment_name = "experiment1", panel = "panel1" )# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Plot Standards plotStds_PkPfPv( sero_data = sero_data, experiment_name = "experiment1", panel = "panel1" )
A helper function to process counts data.
processCounts(sero_data)processCounts(sero_data)
sero_data |
Output from 'readSeroData()'. |
Returns a long table of counts with "Warning" category (<15 == 1 and
15 == 0) for downstream wrangling.
Dionne Argyropoulos
# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Process counts processed_master <- processCounts(sero_data = sero_data)# Example demonstrating how to process bead count data. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Process counts processed_master <- processCounts(sero_data = sero_data)
This is a pre-requisite function before running the 'MFItoRAU_Plasmo()' so that the appropriate MFI to RAU conversions can be run for the respective antigens.
processPkPfPv(sero_data, plate_list, panel = "panel1")processPkPfPv(sero_data, plate_list, panel = "panel1")
sero_data |
Output of 'readSeroData()' |
plate_list |
Output of 'readPlateLayout()' |
panel |
Panel of Pk/Pf/Pv antigens. Default = "panel1" or user provided csv of Antigens and Species. |
A list of two data frames: 1. Data frame with Pk antigens 2. Data frame with Pf/Pv antigens
Dionne Argyropoulos
# Example demonstrating multi-plate 5-standard processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data_5std <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) your_plate_layout_5std <- system.file( "extdata", "example_platelayout_pk_5std.xlsx", package = "SeroTrackR" ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data_5std, platform = "magpix" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout_5std, sero_data = sero_data ) # Process multi-species panel processed_master <- processPkPfPv( sero_data = sero_data, plate_list = plate_list, panel = "panel1" )# Example demonstrating multi-plate 5-standard processing workflow. # These files are included in the SeroTrackR package under inst/extdata. your_raw_data_5std <- c( system.file("extdata", "example_MAGPIX_pk_5std_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_pk_5std_plate2.csv", package = "SeroTrackR") ) your_plate_layout_5std <- system.file( "extdata", "example_platelayout_pk_5std.xlsx", package = "SeroTrackR" ) # Read in raw MAGPIX data sero_data <- readSeroData( raw_data = your_raw_data_5std, platform = "magpix" ) # Read matching plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout_5std, sero_data = sero_data ) # Process multi-species panel processed_master <- processPkPfPv( sero_data = sero_data, plate_list = plate_list, panel = "panel1" )
This function imports the plate layout. Each sheet of the plate layout ".xlsx" file must contain 13 columns (labelled Plate, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) (columns A-M) and 9 rows (Plate, A, B, C, D, E, F, G, H) (rows 1-9). *Note that the first row/column i.e., the A1 cell in excel is called "Plate". This function also checks that the plate sheet labels are consistent with the MAGPIX file input names, as a check prior to merging downstream.
readPlateLayout(plate_layout, sero_data)readPlateLayout(plate_layout, sero_data)
plate_layout |
An ".xlsx" file with sheets labelled plate1, plate2... etc.. |
sero_data |
Output from 'readSeroData()'. |
A list of data frames, with each one representing an individual plate.
Shazia Ruybal-Pesántez, Dionne Argyropoulos
# Example input files your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read and combine serological data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Step 2: Read plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data )# Example input files your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Step 1: Read and combine serological data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" ) # Step 2: Read plate layout plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data )
This function imports the raw data from the Magpix or Bioplex machine and matches the sample names from the plate layout based on their plate/well location.
readSeroData(raw_data, platform, version = "4.2", raw_data_filenames = NULL)readSeroData(raw_data, platform, version = "4.2", raw_data_filenames = NULL)
raw_data |
String with the raw data path. |
platform |
"magpix", "bioplex" or "intelliflex". |
version |
xPONENT software version. For "magpix" can be 4.2 or 4.3. Default: 4.2. |
raw_data_filenames |
String with the raw data filename path. Default is NA as it can be deduced from raw_data. Needs to be a parameter for the PvSeroApp. |
List of data frames: (i) raw data output, (ii) cleaned all results (iii) count data, (iv) blanks only, (v) standards only, (vi) run information.
Dionne Argyropoulos, Shazia Ruybal-Pesantez
# Example raw data files (MAGPIX platform) your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read and combine raw serology data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" )# Example raw data files (MAGPIX platform) your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Read and combine raw serology data sero_data <- readSeroData( raw_data = your_raw_data, platform = "magpix" )
This function runs the classification algorithm for all possible sensitivity and specificity options.
renderClassificationTable(mfi_to_rau_output, algorithm_type, qc_results)renderClassificationTable(mfi_to_rau_output, algorithm_type, qc_results)
mfi_to_rau_output |
Output from 'MFItoRAU()' or 'MFItoRAU_Adj()'. |
algorithm_type |
Algorithm: "antibody_model" (PvSEM algorithm; default) |
qc_results |
Output from 'runQC()'. |
A table of all classification outputs.
Dionne Argyropoulos
# Step 0: Load in Raw Data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file("extdata", "example_platelayout_1.xlsx", package = "SeroTrackR") # Step 1: Reading in Raw Data sero_data <- readSeroData(raw_data = your_raw_data, "magpix") plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data ) # Step 2: Quality Control and MFI to RAU qc_results <- runQC(sero_data, plate_list) # Step 4: Run MFI to RAU (e.g., using ETH beads) mfi_to_rau_output <- MFItoRAU_Adj(sero_data, plate_list, qc_results) # Step 5: Render classification table renderClassificationTable( mfi_to_rau_output = mfi_to_rau_output, algorithm_type = "antibody_model", qc_results = qc_results )# Step 0: Load in Raw Data your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR") ) your_plate_layout <- system.file("extdata", "example_platelayout_1.xlsx", package = "SeroTrackR") # Step 1: Reading in Raw Data sero_data <- readSeroData(raw_data = your_raw_data, "magpix") plate_list <- readPlateLayout( plate_layout = your_plate_layout, sero_data = sero_data ) # Step 2: Quality Control and MFI to RAU qc_results <- runQC(sero_data, plate_list) # Step 4: Run MFI to RAU (e.g., using ETH beads) mfi_to_rau_output <- MFItoRAU_Adj(sero_data, plate_list, qc_results) # Step 5: Render classification table renderClassificationTable( mfi_to_rau_output = mfi_to_rau_output, algorithm_type = "antibody_model", qc_results = qc_results )
This function makes the table in a Fluent UI format.
renderDetailsList(df)renderDetailsList(df)
df |
Any processed data frame |
A table in the Fluent UI format
Dionne Argyropoulos
# Minimal example using a small data frame. # This example is safe for CRAN because it runs only if # shiny.fluent and htmltools are installed. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE)) { # Tiny example data frame example_df <- data.frame( Sample = c("A", "B"), Value = c(10, 20), stringsAsFactors = FALSE ) # Render Fluent UI DetailsList renderDetailsList(example_df) }# Minimal example using a small data frame. # This example is safe for CRAN because it runs only if # shiny.fluent and htmltools are installed. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE)) { # Tiny example data frame example_df <- data.frame( Sample = c("A", "B"), Value = c(10, 20), stringsAsFactors = FALSE ) # Render Fluent UI DetailsList renderDetailsList(example_df) }
Generate QC PDF Report
renderQCReport( raw_data, plate_layout, platform, experiment_name = "experiment1", date = format(Sys.Date(), "%Y%m%d"), experiment_notes = "no notes", location, std_point = 10, path = "." )renderQCReport( raw_data, plate_layout, platform, experiment_name = "experiment1", date = format(Sys.Date(), "%Y%m%d"), experiment_notes = "no notes", location, std_point = 10, path = "." )
raw_data |
A string with the raw data path. |
plate_layout |
A string with the plate layout path. |
platform |
A string: "magpix", "intelliflex", or "bioplex". |
experiment_name |
A string for experiment name. |
date |
A string or Date. Defaults to today's date. |
experiment_notes |
A string of notes. Default is "no notes". |
location |
A string for experiment location: "ETH" or "PNG" accepted. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
path |
Output path for the PDF file. Defaults to current working directory. |
Rendered PDF report.
Dionne Argyropoulos
## Not run on CRAN because it requires interactive rendering and can be slow: ## Not run: # Example raw data files (MAGPIX platform) your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Example plate layout file your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Generate the QC PDF report renderQCReport( raw_data = your_raw_data, plate_layout = your_plate_layout, platform = "magpix", location = "ETH" ) ## End(Not run)## Not run on CRAN because it requires interactive rendering and can be slow: ## Not run: # Example raw data files (MAGPIX platform) your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) # Example plate layout file your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Generate the QC PDF report renderQCReport( raw_data = your_raw_data, plate_layout = your_plate_layout, platform = "magpix", location = "ETH" ) ## End(Not run)
A short function to render the rmarkdown report on Shiny.
renderReport(input, output, params)renderReport(input, output, params)
input |
Input files |
output |
Output files |
params |
Parameters to generate outputs. |
PDF output.
Dionne Argyropoulos
# Minimal example that renders a temporary Rmd file. # Safe for CRAN because it only writes to tempdir() ## Not run: if (requireNamespace("rmarkdown", quietly = TRUE) && rmarkdown::pandoc_available()) { # Create a temporary Rmd that declares params in the YAML rmd_file <- tempfile(fileext = ".Rmd") writeLines(c( "---", "title: \"Test Report\"", "output: html_document", "params:", " value: 0", "---", "", "This is a test report.", "", "Parameter value: `r params$value`" ), con = rmd_file) # Output location out_file <- tempfile(fileext = ".html") # Example parameters to pass in example_params <- list(value = 123) # Render report renderReport( input = rmd_file, output = out_file, params = example_params ) # Optionally inspect the output path out_file } ## End(Not run)# Minimal example that renders a temporary Rmd file. # Safe for CRAN because it only writes to tempdir() ## Not run: if (requireNamespace("rmarkdown", quietly = TRUE) && rmarkdown::pandoc_available()) { # Create a temporary Rmd that declares params in the YAML rmd_file <- tempfile(fileext = ".Rmd") writeLines(c( "---", "title: \"Test Report\"", "output: html_document", "params:", " value: 0", "---", "", "This is a test report.", "", "Parameter value: `r params$value`" ), con = rmd_file) # Output location out_file <- tempfile(fileext = ".html") # Example parameters to pass in example_params <- list(value = 123) # Render report renderReport( input = rmd_file, output = out_file, params = example_params ) # Optionally inspect the output path out_file } ## End(Not run)
This function creates two columns in the Fluent UI format.
renderTwoCols( first_col, second_col, first_width = "50%", second_width = "50%" )renderTwoCols( first_col, second_col, first_width = "50%", second_width = "50%" )
first_col |
A list of content for the first column. |
second_col |
A list of content for the second column. |
first_width |
Percent width of the column space (default: 50%). |
second_width |
Percent width of the column space (default: 50%). |
Fluent UI window with two columns.
Dionne Argyropoulos
# Minimal example using htmltools elements. # This example runs without starting a Shiny app and is safe for CRAN. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE)) { # Create simple content for each column col1 <- list(htmltools::div("First column content")) col2 <- list(htmltools::div("Second column content")) # Render two columns with default widths renderTwoCols(first_col = col1, second_col = col2) }# Minimal example using htmltools elements. # This example runs without starting a Shiny app and is safe for CRAN. if (requireNamespace("shiny.fluent", quietly = TRUE) && requireNamespace("htmltools", quietly = TRUE)) { # Create simple content for each column col1 <- list(htmltools::div("First column content")) col2 <- list(htmltools::div("Second column content")) # Render two columns with default widths renderTwoCols(first_col = col1, second_col = col2) }
A master function combining the entire LDH pipeline into one command to run in R.
runLDHPipeline( raw_data, plate_layout, platform = "bioplex", dilution = c(1e+06, 333333.33, 111111.11, 37037.04, 12345.68, 4115.23, 1371.74, 457.25, 152.42, 50.81), experiment_name = "experiment1", file_path = NULL )runLDHPipeline( raw_data, plate_layout, platform = "bioplex", dilution = c(1e+06, 333333.33, 111111.11, 37037.04, 12345.68, 4115.23, 1371.74, 457.25, 152.42, 50.81), experiment_name = "experiment1", file_path = NULL )
raw_data |
String with the raw data path. |
plate_layout |
An ".xlsx" file with sheets labelled plate1, plate2... etc. |
platform |
"magpix" or "bioplex". Default: "Bioplex" |
dilution |
A list of numbers ranging from S1 to S10. Default: 1000000, 333333.33, 111111.11, 37037.04, 12345.68, 4115.23, 1371.74, 457.25, 152.42, 50.81. |
experiment_name |
User-input experiment name. Default: "experiment1". |
file_path |
A file path to write the .csv final file. Default: Current working directory. |
A data frame containing the MFI and RAU Dilution values for each sample, QC plots for standard curve, bead counts and blanks.
Dionne Argyropoulos
# Example input files your_raw_data <- system.file( "extdata", "example_BioPlex_PvLDH_plate1.xlsx", package = "SeroTrackR" ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Run full LDH processing pipeline runLDHPipeline( raw_data = your_raw_data, # Vector of raw data files plate_layout = your_plate_layout, # Plate layout file )# Example input files your_raw_data <- system.file( "extdata", "example_BioPlex_PvLDH_plate1.xlsx", package = "SeroTrackR" ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Run full LDH processing pipeline runLDHPipeline( raw_data = your_raw_data, # Vector of raw data files plate_layout = your_plate_layout, # Plate layout file )
Run Pk/Pf/Pv Data Analysis Pipeline from Start to End
runPlasmoPipeline( raw_data, platform = "magpix", plate_layout, panel = "panel1", std_point, experiment_name = "experiment1", classify = "Yes", algorithm_type = "antibody_model", sens_spec = "balanced" )runPlasmoPipeline( raw_data, platform = "magpix", plate_layout, panel = "panel1", std_point, experiment_name = "experiment1", classify = "Yes", algorithm_type = "antibody_model", sens_spec = "balanced" )
raw_data |
String with the raw data path. |
platform |
"magpix" or "bioplex". Default: "Bioplex" |
plate_layout |
An ".xlsx" file with sheets labelled plate1, plate2... etc. |
panel |
Panel of Pk/Pf/Pv antigens. Default = "panel1" or user provided csv of Antigens and Species. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve. Value is an integer. |
experiment_name |
User-input experiment name. Default: "experiment1". |
classify |
"Yes" or "No" depending on whether you would like classification or not. Default = "Yes". |
algorithm_type |
Algorithm: "antibody_model" (PvSEM algorithm; default) |
sens_spec |
User-selected Sensitivity/Specificity threshold: "balanced" (default) or "90% specificity". |
A data frame containing the MFI and RAU Dilution values for each sample, QC plots for standard curve, bead counts and blanks.
Dionne Argyropoulos
# Helper to avoid repetition in examples run_example_std <- function(std_point) { # Load raw data for given standard curve your_raw_data <- c( system.file("extdata", paste0("example_MAGPIX_pk_", std_point, "std_plate1.csv"), package = "SeroTrackR"), system.file("extdata", paste0("example_MAGPIX_pk_", std_point, "std_plate2.csv"), package = "SeroTrackR") ) layout_file <- system.file( "extdata", paste0("example_platelayout_pk_", std_point, "std.xlsx"), package = "SeroTrackR" ) # Run pipeline runPlasmoPipeline( raw_data = your_raw_data, platform = "magpix", plate_layout = layout_file, panel = "panel1", std_point = std_point, experiment_name = paste0(std_point, "-point standard curve") ) } # ---- 5-point standard curve ---- results_5std <- run_example_std(5) # ---- 10-point standard curve ---- results_10std <- run_example_std(10)# Helper to avoid repetition in examples run_example_std <- function(std_point) { # Load raw data for given standard curve your_raw_data <- c( system.file("extdata", paste0("example_MAGPIX_pk_", std_point, "std_plate1.csv"), package = "SeroTrackR"), system.file("extdata", paste0("example_MAGPIX_pk_", std_point, "std_plate2.csv"), package = "SeroTrackR") ) layout_file <- system.file( "extdata", paste0("example_platelayout_pk_", std_point, "std.xlsx"), package = "SeroTrackR" ) # Run pipeline runPlasmoPipeline( raw_data = your_raw_data, platform = "magpix", plate_layout = layout_file, panel = "panel1", std_point = std_point, experiment_name = paste0(std_point, "-point standard curve") ) } # ---- 5-point standard curve ---- results_5std <- run_example_std(5) # ---- 10-point standard curve ---- results_10std <- run_example_std(10)
A master function combining the entire PvSeroApp pipeline into one command to run in R.
runPvSeroPipeline( raw_data, plate_layout, platform = "magpix", location, experiment_name = "experiment1", std_point = 10, classify = "Yes", algorithm_type = "antibody_model", sens_spec = "balanced" )runPvSeroPipeline( raw_data, plate_layout, platform = "magpix", location, experiment_name = "experiment1", std_point = 10, classify = "Yes", algorithm_type = "antibody_model", sens_spec = "balanced" )
raw_data |
String with the raw data path. |
plate_layout |
An ".xlsx" file with sheets labelled plate1, plate2... etc. |
platform |
"magpix" or "bioplex". Default = "magpix". |
location |
"PNG" or "ETH" to filter WEHI standard curve data. |
experiment_name |
User-input experiment name. |
std_point |
Standard Point Curve: 5 = 5-point curve, 10 = 10-point curve, "PvLDH" for LDH specific curve. Default = 10. Value is an integer. |
classify |
"Yes" or "No" depending on whether you would like classification or not. Default = "Yes". |
algorithm_type |
Algorithm: "antibody_model" (PvSEM algorithm; default) |
sens_spec |
User-selected Sensitivity/Specificity threshold: "balanced" (default) or "90% specificity". |
classifyResults_output, stdcurve_plot, plateqc_plot, check_repeats_output, blanks_plot, model_plot
Dionne Argyropoulos
# Example data supplied with the package your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Run full pipeline including classification runPvSeroPipeline( raw_data = your_raw_data, plate_layout = plate_layout, platform = "magpix", location = "PNG", experiment_name = "experiment1", std_point = 10, algorithm_type = "antibody_model", sens_spec = "balanced", classify = "Yes" ) # Run processing pipeline only (no classification) runPvSeroPipeline( raw_data = your_raw_data, plate_layout = plate_layout, platform = "magpix", location = "PNG", experiment_name = "experiment1", std_point = 10, algorithm_type = "antibody_model", sens_spec = "balanced", classify = "No" )# Example data supplied with the package your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Run full pipeline including classification runPvSeroPipeline( raw_data = your_raw_data, plate_layout = plate_layout, platform = "magpix", location = "PNG", experiment_name = "experiment1", std_point = 10, algorithm_type = "antibody_model", sens_spec = "balanced", classify = "Yes" ) # Run processing pipeline only (no classification) runPvSeroPipeline( raw_data = your_raw_data, plate_layout = plate_layout, platform = "magpix", location = "PNG", experiment_name = "experiment1", std_point = 10, algorithm_type = "antibody_model", sens_spec = "balanced", classify = "No" )
A master function containing each quality control processing step.
runQC(sero_data, plate_list)runQC(sero_data, plate_list)
sero_data |
Output from 'readSeroData()'. |
plate_list |
Output from 'readPlateLayout()'. |
processCounts_output, getCounts_output, sampleid_output, getAntigenCounts_output, getCountsQC_output
Dionne Argyropoulos
# Example data supplied with the package your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Run full pipeline including classification runQC( sero_data = sero_data, plate_list = plate_list )# Example data supplied with the package your_raw_data <- c( system.file("extdata", "example_MAGPIX_plate1.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate2.csv", package = "SeroTrackR"), system.file("extdata", "example_MAGPIX_plate3.csv", package = "SeroTrackR") ) your_plate_layout <- system.file( "extdata", "example_platelayout_1.xlsx", package = "SeroTrackR" ) # Read serology data and plate layout sero_data <- readSeroData(your_raw_data,"magpix") plate_list <- readPlateLayout(your_plate_layout, sero_data) # Run full pipeline including classification runQC( sero_data = sero_data, plate_list = plate_list )