olink_norm_input_validate: Validate inputs of normalization function

View source: R/olink_normalization_utils.R

olink_norm_input_validateR Documentation

Description

This function takes as input some of the inputs of the Olink normalization function and checks the validity of the input.

Usage

olink_norm_input_validate(
  df1,
  df2,
  overlapping_samples_df1,
  overlapping_samples_df2,
  reference_medians
)

Arguments

df1

First dataset to be used in normalization (required).

df2

Second dataset to be used in normalization.

overlapping_samples_df1

Samples to be used for adjustment factor calculation in df1 (required).

overlapping_samples_df2

Samples to be used for adjustment factor calculation in df2.

reference_medians

Dataset with columns "OlinkID" and "Reference_NPX". Used for reference median normalization.

Details

Depending on the input the function will return:

  • Error: if the required components are lacking from the input or if the normalization cannot be performed.

  • Warning: if the normalization can be determined but extra inputs are provided. This will be followed by a message and the type of normalization to be performed.

  • Message: Information about the type of normalization to be performed.

Note that input are passed directly from the main olink_normalization function.

Value

Scalar character from olink_norm_modes if normalization can be determined from the input, otherwise see details.

Author(s)

Klev Diamanti


OlinkAnalyze documentation built on Sept. 25, 2024, 9:07 a.m.