Title: | Analysis of Surface Plasmon Resonance Data |
---|---|
Description: | Analysis of Surface Plasmon Resonance (SPR) and Biolayer Interferometry data, with automations for high-throughput SPR. This version of the package fits the 1: 1 binding model, with and without bulkshift. It offers optional local or global Rmax fitting. The user must provide a sample sheet and a Carterra output file in Carterra's current format. There is a utility function to convert from Carterra's old output format. The user may run a custom pipeline or use the provided 'Runscript', which will produce a pdf file containing fitted Rmax, ka, kd and standard errors, a plot of the sensorgram and fits, and a plot of residuals. The script will also produce a .csv file with all of the relevant parameters for each spot on the SPR chip. |
Authors: | Janice McCarthy Developer [aut, cre, cph], Kan Li Dev [aut], S. Moses Dennison [aut], Georgia D. Tomaras [aut] |
Maintainer: | Janice McCarthy Developer <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2024-10-27 05:21:05 UTC |
Source: | https://github.com/cran/htrSPRanalysis |
Create csv file with all fit parameters.
create_csv(processed_input, fits_list)
create_csv(processed_input, fits_list)
processed_input |
Processed_input as returned by |
fits_list |
List of fits as returned by |
a data frame with the fit parameters and errors. A csv file is also created using the path name supplied to process_input
Create pdf file with sensorgrams with fitted curves, residuals, table of fit parameters, and response curves.
create_pdf(processed_input, fits_list, rc_list, plot_list, ...)
create_pdf(processed_input, fits_list, rc_list, plot_list, ...)
processed_input |
Processed_input as returned by |
fits_list |
List of fits as returned by |
rc_list |
List of response curves as returned by |
plot_list |
List of plots as returned by |
... |
Arguments passed to the |
NULL
A pdf file is created using the path name supplied to process_input
Get fits of all selected sensorgrams as indicated in the sample information.
get_fits(processed_input)
get_fits(processed_input)
processed_input |
The processed_input object returned by the function |
A list of all fits. The fits are performed using the safely
function, so that the list has a $result
entry
and a $error
entry for each item. If $error
is NULL
, the sensorgram was fit succesfully.
Plot fitted sensorgras and raw data.
get_fitted_plots(processed_input, fits_list)
get_fitted_plots(processed_input, fits_list)
processed_input |
processed_input as returned by |
fits_list |
List of fits as returned by |
list of plots of sensorgrams and fits
Incl.
column in the sample information). No
adjustments are made to the data.Plot all raw data that has been selected to be processed (via the Incl.
column in the sample information). No
adjustments are made to the data.
get_plots_before_baseline(processed_input)
get_plots_before_baseline(processed_input)
processed_input |
The list file that is output from the |
A list of all plots that have been selected via the Incl.
column in sample information
Plot response curve. Average RU versus log10 of concentration. Color coded for concentrations selected for fitting.
get_rc_plots(processed_input)
get_rc_plots(processed_input)
processed_input |
Processed input object as returned from |
list of plots of response curves, indicating the concentrations chosen for fitting
Performs all functions selected in sample information, such as automated dissociation window detection, automated concentration range, automated bulk shift detection and returns a list object with the titration time series, processed sample information, all user inputs directing file outputs and fitting options
process_input( sample_sheet_path = NULL, data_file_path = NULL, output_file_path = NULL, output_pdf = NULL, output_csv = NULL, error_pdf = NULL, num_cores = NULL, min_allowed_kd = 10^(-5), max_iterations = 1000, ptol = 10^(-10), ftol = 10^(-10), min_RU_tol = 20, max_RU_tol = 300 )
process_input( sample_sheet_path = NULL, data_file_path = NULL, output_file_path = NULL, output_pdf = NULL, output_csv = NULL, error_pdf = NULL, num_cores = NULL, min_allowed_kd = 10^(-5), max_iterations = 1000, ptol = 10^(-10), ftol = 10^(-10), min_RU_tol = 20, max_RU_tol = 300 )
sample_sheet_path |
The full path to the sample information file. |
data_file_path |
The full path to the titration data file. |
output_file_path |
The full path where output should be stored. This directory needs to exist. |
output_pdf |
The name of the file for the pdf output. |
output_csv |
The name of the file for the csv output. |
error_pdf |
The name of the file for error output. |
num_cores |
The number of cores to use for parallel processing. The default is( the number of cores detected by |
min_allowed_kd |
The minimum value for the dissociation constant. The default is 10^(-5). |
max_iterations |
The maximum number of iterations for curve fitting. The default is 1000. |
ptol |
Curve fitting parameter. If the proposed changes in parameters is smaller than this value, the optimization is considered converged. The default is 10^(-10) |
ftol |
Curve fitting parameter. If the squared error between observed and predicted values is smaller than ftol, the optimization is considered converged. The default is 10^(-10) |
min_RU_tol |
Minimum RU required for dissociation window detection |
max_RU_tol |
Maximum RU required for dissociation window detection. Also used in curve fitting. |
A list object containing the following
expanded_sample_sheet |
The sample sheet expanded to include all spots that are represented, expanding the short-hand entries for Position/Block/Channel |
sample_info |
The expanded sample sheet with only the rows that are to be fit |
sample_info_fits |
The sample_info without rows that have encountered errors in initial processing |
Time |
The dataframe whose columns are the Time values for the input titration data. This only includes columns selected for analysis. |
RU |
The dataframe whose columns are the RU values for the input titration data. Only the columns for the samples to be analyzed are included |
correctedRU |
The |
keep_concentrations |
A vector containing the indices of the columns from |
all_concentrations_values |
A vector containing the concentration values corresponding to the columns of the |
incl_concentrations_values |
A vector containing the concentration values corresponding to the |
n_time_points |
The maximum length of titration time series |
max_RU_tol |
The maximum RU for dissociation window trimming to be automated |
min_RU_tol |
The minimum RU for dissociation window trimming to be automated |
min_RU_tol |
The minimum RU for dissociation window trimming to be automated |
nwells |
The number of rows in the |
n_fit_wells |
The number of rows in the |
ftol |
The ftol parameter passed to the |
ptol |
The ptol parameter passed to the |
ptol |
The ptol parameter passed to the |
output_pdf |
The full pathname for the output pdf file |
output_csv |
The full pathname for the output csv file |
error_pdf |
The full pathname for the pdf error file. This is where errors in processing can be found. |
error_idx_concentrations |
If there is an issue in determining the concentration window for some spots, they will be logged here |
# set up file paths for example sample_sheet_path <- system.file("extdata", "sample_sheet.xlsx", package="htrSPRanalysis") fn <- paste0("https://gitlab.oit.duke.edu/janice/htrspranalysis/", "-/raw/master/inst/extdata/titration_data.xlsx?ref_type=heads") download.file(fn, destfile = paste0(tempdir(),"/titration_data.xlsx"), mode = "wb") data_file_path <- paste0(tempdir(), "/titration_data.xlsx") # process the input processed_input <- process_input(sample_sheet_path = sample_sheet_path, data_file_path = data_file_path, num_cores = 2)
# set up file paths for example sample_sheet_path <- system.file("extdata", "sample_sheet.xlsx", package="htrSPRanalysis") fn <- paste0("https://gitlab.oit.duke.edu/janice/htrspranalysis/", "-/raw/master/inst/extdata/titration_data.xlsx?ref_type=heads") download.file(fn, destfile = paste0(tempdir(),"/titration_data.xlsx"), mode = "wb") data_file_path <- paste0(tempdir(), "/titration_data.xlsx") # process the input processed_input <- process_input(sample_sheet_path = sample_sheet_path, data_file_path = data_file_path, num_cores = 2)