WPM is a shiny application deployed in the form of an R package. Functions for a command-line/script use are also available. Its objective is to allow a user to generate a well plate plan in order to perform his experiments by controlling batch effects (in particular preventing plate edge effects). The algorithm for placing the samples is inspired by the backtracking algorithm.
R version >= 4.0.0
OS tested : Windows
, Fedora
, Ubuntu
,MacOS
But the app should work also on the others.
WPM R package dependencies:
utils
, methods
, Biobase
, SummarizedExperiment
, config
, golem
,
rlang
, shiny
, shinydashboard
, shinyWidgets
, shinycustomloader
, DT
,
RColorBrewer
, logging
, dplyr
, stringr
, ggplot2
From GitHub
devtools::install_github("HelBor/wpm", build_vignettes=TRUE)
There are two ways to use WPM:
| Input Format | Command line | WPM app | | --------------------- |:------------:| :------:| | CSV | yes | yes | | ExpressionSet | yes | no | | SummarizedExperiment | yes | no | | MSnSet | yes | no |
library(wpm)
To see a complete Tutorial, please see the Vignette of the package.
browseVignettes("wpm")
In command line there a some steps to process in the right order:
You can work with CSV files, or ExpressionSet
, MSnSet
,
SummarizedExperiment
objects.
The first step is to create a dataframe containing all the data needed by wpm
to work properly. To do so, you need to specify which column in the CSV
corresponds to the grouping factor if any.
# if you have a CSV file
df <- convertCSV("path-to-your-CSV", "grouping_factor")
# if you have an ExpressionSet or an MSnSet
df <- convertESet(myExpressionSet, "grouping_factor") # or convertESet(myMSnSet)
# if you have a SummarizedExperiment
df <- convertSE(mySummarizedExperiment, "grouping_factor")
The next step is to run the wpm wrapper function by giving it all the parameters needed: the dataframe, the plate dimensions, the number of plates to fill, the forbidden wells (wells that must not be filled at all for the experiment), buffer wells (wells where there will be solution without sample in it), fixed wells, the spatial constraint to place the samples and the maximal number of attemps for WPM to find a valid solution.
# example where we do not specify buffers
wpm_res <- wrapperWPM(user_df = df,
plate_dims = list(8,12),
nb_plates = 1,
forbidden_wells = "A1,A2,A3",
fixed_wells = "B1,B2",
spatial_constraint = "NS")
The last step is to plot the plate plan(s) using the drawMap()
function :
drawned_map <- wpm::drawMap(df = wpm_result,
sample_gps = length(levels(as.factor(pd$Environment))),
gp_levels = gp_lvl <- levels(as.factor(pd$Environment)),
plate_lines = 8,
plate_cols = 12,
project_title = "my Project Title")
drawned_map
Since WPM provides also a GUI, the idea is to just provide a minimum of parameters to the application. No programming skills are required. Simply run in the console:
wpm()
WPM has 4 main panels:
1) Provide a CSV file containing the sample names and variable factors if any.
2) Specify the plate dimensions and their number (the user can choose between 6, 24, 48, 96, 386, 1534 and custom). WPM checks that all the given settings arecompatible)
3) Specify the Forbidden well: These wells will not be filled with any kind of sample. We simply do not want to fill them (e.g. the coins of the plate), or in case of dirty wells, broken pipettes, etc.
4) Specify the Buffers: correspond to solution without biological sample in it. Provide the neighborhood constraints, which depend on the "Buffer" mode chosen. (Shouldn't samples from the same group be found side by side?)
5) Specify the Fixed samples: correspond to Quality Control samples or standards.
6) Choose a maximum number of iterations that WPM can do to find a solution,then start WPM. If the samples do not have a group, then the samples will be placedcompletely randomly on the plates. If there are groups, wpm will use an algorithminspired by the backtracking algorithm (in order to place the samples in the wellswhile respecting the specified constraints.).
This Panel allows you to look after the final dataset containing the wells chosen for each sample and a plot of your final well-plate map. Dataframe and plots are downloadable separately.
Example fo final dataset:
Example of final plot for a 96 well-plate with 80 samples divided into 10 groups:
The published article of the project will be linked here.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.