generateMap: Generate a plate map according to the input parameters

Description Usage Arguments Details Value

View source: R/fct_generate_map.R

Description

This function generates a plate map using a backtracking algorithm and returns a dataframe if success. If it fails to find a solution, returns NULL. If there are not enough wells to place all the samples, returns 0.

Usage

1
2
3
4
5
6
7
8
9
generateMap(
  user_df,
  nb_rows,
  nb_cols,
  df_forbidden,
  mod,
  max_it,
  updateProgress = NULL
)

Arguments

user_df

dataframe containing 9 features: Sample, ID, Group, Sample.name, Well, Status, Row, Column, Plate. See details.

nb_rows

numeric, number of lines on the plate

nb_cols

numeric, number of columns on the plate

df_forbidden

dataframe with the same structure than user_df, but for the forbidden, buffer solutions and Not randomized wells.

mod

character, neighborhood spatial constraint

max_it

numeric, maximum number of attempts to generate a plate plan before returning a failure.

updateProgress

shiny object, reports progress to the user.

Details

The dataframe is generated using dedicated functions of the wpm package: 'convertCSV()', 'convertESet()' or 'convertSE()'. But the user can also generate it by hand.

A number of attempts is allowed. Consequently, if the maximal number if attempts is reeched and no solution was found with the backtracking (i.e. the randomWalk does not return a dataframe), this function prints a warning message and returns NULL. If a solution is found, then it returns the dataframe.

Value

Returns a dataframe containing all the data of the plate map(s)


HelBor/wpm documentation built on June 15, 2021, 4:16 p.m.