add_concentration {microdiluteR}R Documentation

Add concentration metadata

Description

add_concentration adds concentration metadata to photometer data that is specified in long format. For this function to work properly, the column containing the well positions should be named 'Position' and the column containing the corresponding absorption values should be named 'Values'.

generate_concentration_list generates a list of provided concentration levels mapped to the user-specified plate layout. The plate layout is based on a 96-well plate and can be either horizontal (i.e. letters A-H) or vertical (i.e. numbers 1-12).

ask_concentration_list works the same way as generate_concentration_list, but retrieves the concentration levels based on a user prompt instead of user-set parameters. The plate axis can be either in horizontal direction providing letters A-H or in vertical direction providing numbers 1-12 based on a 96-well plate layout.

match_concentration maps concentration levels to corresponding well positions and returns 'NA' otherwise.

Usage

add_concentration(
  input_data,
  concentration_list = NULL,
  ask_concentration_list = TRUE,
  ...
)

generate_concentration_list(concentration_levels, direction)

ask_concentration_list(direction = c("horizontal", "vertical"))

match_concentration(well_position, concentration_list)

Arguments

input_data

A data frame with well positions and their corresponding values.

concentration_list

A list containing concentration information

ask_concentration_list

A boolean parameter indicating whether concentration levels should be retrieved via user prompt (default) or not.

...

Additional arguments to be passed to ask_concentration_list.

concentration_levels

A numeric vector containing concentration levels.

direction

A character vector specifying the orientation of the plate layout. It can be either "horizontal" or "vertical".

well_position

The sample position(s) to check

Details

generate_concentration_list checks if the length of concentration_levels matches the specified number of rows or columns based on the direction parameter. If not, it throws an error. If the lengths match, it generates a list of concentration levels where each level is assigned to a corresponding row or column based on the direction parameter.

Value

add_concentration returns a data frame with concentration metadata added.

generate_concentration_list returns a list of concentration levels where each level is assigned to a corresponding row or column based on the selected direction parameter.

ask_concentration_list returns a list containing plate axes as keys and concentration information as values.

match_concentration returns the corresponding concentration level if sample position matches concentration criteria, "NA" otherwise

See Also

generate_experiment_list, ask_experiment_list, generate_group_list, ask_group_list, add_treatment, validate_cells


[Package microdiluteR version 1.0.1 Index]