Learn R Programming

shinyMolBio (version 0.2)

pcrPlateInput: Create a PCR plate input control

Description

Create an input control for representing PCR plate and dynamically selecting wells inside it.

Usage

pcrPlateInput(inputId,
       label = NULL,
       plateDescription,
       pcrFormat = pcrFormatType$new(8, 12, labelFormatType$new("ABC"),
        labelFormatType$new("123")),
       selection = NULL,
       highlighting = NULL,
       wellLabelTemplate = "{{sample}}",
       onHoverWellTextTemplate = "{{position}}\u000A{{sample}}\u000A{{targets}}",
       wellClassTemplate = NULL,
       wellStyleTemplate = NULL,
       wellGroupTemplate = "{{sample}}-{{targets}}",
       cssFile = system.file("/css/pcrPlateInputStyle.css",
                 package = "shinyMolBio"),
       cssText = NULL,
       legend = NULL,
       interactive = TRUE)

Arguments

inputId

The input slot that will be used to access the selected wells positions.

label

Display label for the control, or NULL for no label.

plateDescription

Plate description - basicly output from RDML AsTable() function.

pcrFormat

PCR plate parametrs. Should be pcrFormatType.

selection

Set preselected wells (e.g. c("A01", "A02") or c(1, 2))

highlighting

Set highlighted wells (e.g. c("A01", "A02") or c(1, 2))

wellLabelTemplate

Template of the well label.

onHoverWellTextTemplate

Template of the text on hover.

wellClassTemplate

Template of the well class (css class).

wellStyleTemplate

Template of the well style (css).

wellGroupTemplate

Template of the well group for selecting.

cssFile

Path to the css styles file.

cssText

CSS styles as text.

legend

Plate legend (any HTML content).

interactive

Should be this pcrPlate interactive or not.

Value

A PCR plate control that can be added to a UI definition.

See Also

updatePcrPlateInput

Examples

Run this code
# NOT RUN {
## Only run examples in interactive R sessions
library(RDML)
if (interactive()) {
ui <- fluidPage(
    pcrPlateInput("plate1",
                   "Plate 1",
                   RDML$new(system.file("/extdata/stepone_std.rdml", package = "RDML"))$AsTable(),
                  pcrFormatType$new(8,12,labelFormatType$new("ABC"),
                                         labelFormatType$new("123"))),
   verbatimTextOutput("selected")
 )
 server <- function(input, output) {
   output$selected <- renderText({ input$plate1 })
 }
 shinyApp(ui, server)
}
# }

Run the code above in your browser using DataLab