% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotLitreApp.R
\name{plotLitreApp}
\alias{plotLitreApp}
\title{Plot interactive litre plots}
\usage{
plotLitreApp(
  data = data,
  dataMetrics = dataMetrics,
  dataSE = NULL,
  geneList = NULL,
  pointColor = "orange",
  option = c("hexagon", "allPoints")
)
}
\arguments{
\item{data}{DATA FRAME | Read counts}

\item{dataMetrics}{LIST | Differential expression metrics}

\item{dataSE}{SUMMARIZEDEXPERIMENT | Summarized experiment format that
can be used in lieu of data; default NULL}

\item{geneList}{CHARACTER ARRAY | List of gene IDs to be drawn onto the
litre. Use this parameter if you have predetermined subset of genes to be
drawn. Otherwise, all genes in the data object can be superimposed on the
litre plot; default NULL}

\item{pointColor}{CHARACTER STRING | Color of overlaid points on scatterplot 
matrix; default "orange"}

\item{option}{CHARACTER STRING ["hexagon" | "allPoints"] | The background
of plot; default "hexagon"; "allPoints" may be too slow depending on data}
}
\value{
A Shiny application that shows a litre plot background and allows
users to superimpose the subset of genes determined to be superimposed
through the dataMetrics or geneList parameter. The application allows users
to order how to sequentially superimpose the genes by columns in the
dataMetrics parameter.
}
\description{
Plot interactive litre plots.
}
\examples{
# The first pair of examples use data and dataMetrics
# objects as input. The last pair of examples create the same plots now
# using the SummarizedExperiment (i.e. dataSE) object input.

# Example 1: Create an interactive litre plot for the logged data using
# default background of hexagons.

data(soybean_ir_sub)
data(soybean_ir_sub_metrics)
soybean_ir_sub_log <- soybean_ir_sub
soybean_ir_sub_log[,-1] <- log(soybean_ir_sub[,-1]+1)
app <- plotLitreApp(data = soybean_ir_sub_log,
    dataMetrics = soybean_ir_sub_metrics)
if (interactive()) {
    shiny::runApp(app, port = 1234, launch.browser = TRUE)
}

# Example 2: Repeat the same process, only now plot background data as 
# individual points. Note this may be too slow now that all points are drawn
# in the background.

app <- plotLitreApp(data = soybean_ir_sub_log,
    dataMetrics = soybean_ir_sub_metrics, option = "allPoints",
    pointColor = "red")
if (interactive()) {
    shiny::runApp(app)
}

# Below are the same pair of examples, only now using the
# SummarizedExperiment (i.e. dataSE) object as input.

# Example 1: Create an interactive litre plot for the logged data using
# default background of hexagons.

\dontrun{
data(se_soybean_ir_sub)
se_soybean_ir_sub_log <- se_soybean_ir_sub
assay(se_soybean_ir_sub_log) <-
   log(as.data.frame(assay(se_soybean_ir_sub_log))+1)
app <- plotLitreApp(dataSE = se_soybean_ir_sub_log)
if (interactive()) {
    shiny::runApp(app, port = 1234, launch.browser = TRUE)
}
}

# Example 2: Repeat the same process, only now plot background data as 
# individual points. Note this may be too slow now that all points are
# drawn in the background.

\dontrun{
app <- plotLitreApp(dataSE = se_soybean_ir_sub_log, option = "allPoints",
    pointColor = "red")
if (interactive()) {
    shiny::runApp(app)
}
}

}
