View source: R/olink_normalization_format.R
| olink_normalization_format | R Documentation |
For within-product bridging and subset normalization:
Adds non-overlapping assays between projects to the bridged file without adjustment.
Removes external controls, except sample controls.
For cross-product bridging:
Adds non-overlapping assays between projects and not bridgeable assays to the bridged file without adjustment.
Removes external controls, except sample controls.
Replaces the NPX values of the non-reference project by the Median Centered or QS Normalized NPX, according to the Bridging Recommendation.
Edits the BridgingRecommendation column to indicate whether an assay is NotBridgeable, NotOverlapping, MedianCentering, or QuantileSmoothing bridged.
Replaces OlinkID by the concatenation of each product's OlinkIDs to record the OlinkIDs from both projects for bridgeable assays. Assays that are NotBridgeable or NotOverlapping retain their original OlinkIDs and NPX values.
Replaces Panel by the concatenation of each product panel per assay. Assays that are NotBridgeable or NotOverlapping retain their original Panel value.
Removes MedianCenteredNPX, QSNormalizedNPX, OlinkID_E3072 columns.
#' For reference median normalization:
Adds non-overlapping assays from the dataset, but not from the reference medians, to the bridged file without adjustment.
Removes external controls, except sample controls.
In all cases, normalization and formatting changes are applied to the NPX column. The contents of the Count and PCNormalizedNPX columns remain unchanged.
olink_normalization_format(df_norm, lst_check)
df_norm |
A "tibble" of Olink data in long format resulting from the
|
lst_check |
Normalization input list checks generated by
|
A "tibble" of Olink data in long format containing both input datasets with the bridged NPX quantifications, with the above modifications.
Danai G. Topouza Klev Diamanti
# bridge samples
bridge_samples <- intersect(
x = unique(OlinkAnalyze:::data_ht_small$SampleID),
y = unique(OlinkAnalyze:::data_3k_small$SampleID)
) |>
(\(x) x[!grepl("CONTROL", x)])()
# run olink_normalization
df_norm <- olink_normalization(
df1 = OlinkAnalyze:::data_ht_small,
df2 = OlinkAnalyze:::data_3k_small,
overlapping_samples_df1 = bridge_samples,
df1_project_nr = "Explore HT",
df2_project_nr = "Explore 3072",
reference_project = "Explore HT"
)
# generate lst_check
lst_check <- OlinkAnalyze:::olink_norm_input_check(
df1 = OlinkAnalyze:::data_3k_small,
df2 = OlinkAnalyze:::data_ht_small,
overlapping_samples_df1 = bridge_samples,
overlapping_samples_df2 = NULL,
df1_project_nr = "P1",
df2_project_nr = "P2",
reference_project = "P2",
reference_medians = NULL
)
# format output
OlinkAnalyze:::olink_normalization_format(
df_norm = df_norm,
lst_check = lst_check
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.