README.md

R GitHub issues Release GitHub license

Brief introduction

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.

Getting started

Pre-requisites

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

How to install

From GitHub

devtools::install_github("HelBor/wpm", build_vignettes=TRUE)

How to use WPM

There are two ways to use WPM:

Supported input formats

| Input Format | Command line | WPM app | | --------------------- |:------------:| :------:| | CSV | yes | yes | | ExpressionSet | yes | no | | SummarizedExperiment | yes | no | | MSnSet | yes | no |

Load the library

library(wpm)

To see a complete Tutorial, please see the Vignette of the package.

browseVignettes("wpm")

Using WPM from the command line

In command line there a some steps to process in the right order:

Prepare dataset

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")

Run WPM

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")

Plate map visualization

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

Using WPM in web interface

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:

Provide parameters

Check your Results

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:

Pending Features

Citing Our work

The published article of the project will be linked here.



Try the wpm package in your browser

Any scripts or data that you put into this service are public.

wpm documentation built on Nov. 8, 2020, 5:34 p.m.