build_evaluation_sheet: Build Evaluation Sheet

View source: R/build_evaluation_sheet.R

build_evaluation_sheetR Documentation

Build Evaluation Sheet

Description

A function to build an excel file with fill-in-the-blank cells for common information needed about a sample evaluation.

Usage

build_evaluation_sheet(
  evaluation_name,
  evaluation_description = NA_character_,
  developer = NA_character_,
  assay = NA_character_,
  lot_numbers = NA_character_,
  panel_data = NA,
  panel_data_filepath = NA_character_,
  analytes,
  targets,
  qualitative_outcomes = c("Positive", "Negative"),
  semiquantitative_outcomes = NA_character_,
  quantitative_units = NA_character_,
  randomize = TRUE,
  blind = TRUE
)

Arguments

evaluation_name

The name of the evaluation being used for the evaluation. Must be a character string (not a multi-level vector) and must not be NA.

evaluation_description

An optional sentence or paragraph describing the evaluation. Defaults to NA. If provided, it must be a string rather than a multi-level vector.

developer

The developer of the assay under evaluation. A character string. Defaults to NA

assay

The name of the assay under evaluation. A character string. Defaults to NA

lot_numbers

All lot numbers associated with the evaluation. May be a character vector of length 1 or more. Defaults to NA

panel_data

The output of build_panel_sheet. Either this or a panel_data_filepath must be provided, but not both. Defaults to NA.

panel_data_filepath

An excel file generated by write_panel_sheet(). Either this or panel_data mupst be provided, but not both. Defaults to NA.

analytes

The analyte or analytes to be included in the evaluation. This must be provided with at least one level (not NA). This function will stop with an error if the analytes to be evaluated arte not included in the sample panel.

targets

The target or targets for which the assay under evaluation. For example, for a SARS-CoV-2 assay, this could be "Spike" or "RBD". Multiple targets can also be used, such as c("Spike", "Nucleocapsid"). This must be provided with at least one level (not NA).

qualitative_outcomes

The valid qualitative outcomes associated with the evaluation. Typically, this should be c("Positive", "Negative"). Note that while the assay being evaluated may also provide an "Equivocal" result level, equivocal results will be counted against the assay in terms of performance. That is, an equivocal result on a positive sample will be called as a false negative result and an equivocal result on a negative sample will be called as a false positive result.

semiquantitative_outcomes

The valid semi-quantitative outcomes associated with the evaluation. Defaults to NA.

quantitative_units

If quantitative outcomes have been established for the evaluation, this is a character string describing the units of those quantitative results. Defaults to NA. If the results are unit-less, "Unit-less" can be used.

randomize

Defaults to TRUE, meaning sample IDs from the panel data will be put in a random order for this evaluation.

blind

Defaults to TRUE, meaning sample IDs from the panel data will be assigned a number unique to this evaluation.

Value

Returns a list including the evaluation_metadata, sample_blinding, and evaluation_table

Examples

build_evaluation_sheet(
  evaluation_name = "Example Evaluation",
  evaluation_description = NA_character_,
  developer = "ACME Test Corp.",
  assay = "Test Assay #1",
  lot_numbers = "20200101",
  panel_data =
    build_panel_sheet(
      panel_name = "Example Panel",
      panel_description = "An example panel.",
      n_samples = 5L,
      sample_groups = "Samples",
      sample_matrices = "Serum",
      analytes = c("IgM", "IgG", "Pan-Ig"),
      targets = "Spike",
      qualitative_outcomes = c("Positive", "Negative"),
      qualitative_comparators = "Authorized NAAT and CDC Assay",
      semiquantitative_outcomes = NA,
      semiquantitative_comparators = NA,
      quantitative_units = NA,
      quantitative_comparators = NA
    ),
  analytes = c("IgM", "IgG", "Pan-Ig"),
  targets = "Spike",
  qualitative_outcomes = c("Positive", "Negative"),
  semiquantitative_outcomes = NA_character_,
  quantitative_units = NA_character_,
  randomize = FALSE,
  blind = FALSE
)

bjoleary/dxr documentation built on Dec. 5, 2023, 8:33 p.m.