Plot static parallel coordinate plots onto side-by-side boxplot of whole dataset.

plotPCP(
  data,
  dataMetrics = NULL,
  dataSE = NULL,
  geneList = NULL,
  threshVar = "FDR",
  threshVal = 0.05,
  lineSize = 0.1,
  lineColor = "orange",
  vxAxis = FALSE,
  outDir = tempdir(),
  saveFile = TRUE,
  hover = FALSE
)

Arguments

data

DATA FRAME | Read counts

dataMetrics

LIST | Differential expression metrics; If both geneList and dataMetrics are NULL, then no genes will be overlaid onto the side-by-side boxplot; default NULL

dataSE

SUMMARIZEDEXPERIMENT | Summarized experiment format that can be used in lieu of data and dataMetrics; default NULL

geneList

CHARACTER ARRAY | List of gene IDs to be drawn onto the scatterplot matrix of all data. If this parameter is defined, these will be the overlaid genes to be drawn. After that, dataMetrics, threshVar, and threshVal will be considered for overlaid genes. If both geneList and dataMetrics are NULL, then no genes will be overlaid onto the side-by-side boxplot; default NULL

threshVar

CHARACTER STRING | Name of column in dataMetrics object that is used to threshold significance; default "FDR"

threshVal

INTEGER | Maximum value to threshold significance from threshVar object; default 0.05

lineSize

INTEGER | Line width of parallel coordinate lines; default 0.1

lineColor

CHARACTER STRING | Color of parallel coordinate lines; default "orange"

vxAxis

BOOLEAN [TRUE | FALSE] | Flip x-axis text labels to vertical orientation; default FALSE

outDir

CHARACTER STRING | Output directory to save all plots; default tempdir()

saveFile

BOOLEAN [TRUE | FALSE] | Save file to outDir; default TRUE

hover

BOOLEAN [TRUE | FALSE] | Allow to hover over points to identify IDs; default FALSE

Value

List of n elements of parallel coordinate plots, where n is the number of treatment pair combinations in the data object. The background of each plot is a side-by-side boxplot of the full data object, and the parallel coordinate lines on each plot are the subset of genes determined to be superimposed through the dataMetrics or geneList parameter. If the saveFile parameter has a value of TRUE, then each parallel coordinate plot is saved to the location specified in the outDir parameter as a JPG file.

Examples

# The first set of four examples use data and dataMetrics # objects as input. The last set of four examples create the same plots now # using the SummarizedExperiment (i.e. dataSE) object input. # Example 1: Plot the side-by-side boxplots of the whole dataset without # overlaying any metrics data by keeping the dataMetrics parameter its # default value of NULL. data(soybean_ir_sub) soybean_ir_sub[,-1] = log(soybean_ir_sub[,-1] + 1) ret <- plotPCP(data = soybean_ir_sub, saveFile = FALSE) ret[[1]]
# Example 2: Overlay genes with FDR < 1e-4 as orange parallel coordinate # lines. data(soybean_ir_sub_metrics) ret <- plotPCP(data = soybean_ir_sub, dataMetrics = soybean_ir_sub_metrics, threshVal = 1e-4, saveFile = FALSE) ret[[1]]
# Example 3: Overlay the ten most significant genes (lowest FDR values) as # blue parallel coordinate lines. geneList = soybean_ir_sub_metrics[["N_P"]][1:10,]$ID ret <- plotPCP(data = soybean_ir_sub, geneList = geneList, lineSize = 0.3, lineColor = "blue", saveFile = FALSE) ret[[1]]
# Example 4: Repeat this same procedure, only now set the hover parameter to # TRUE to allow us to hover over blue parallel coordinate lines and # determine their individual IDs. ret <- plotPCP(data = soybean_ir_sub, geneList = geneList, lineSize = 0.3, lineColor = "blue", saveFile = FALSE, hover = TRUE) ret[[1]] # Below are the same four examples, only now using the # SummarizedExperiment (i.e. dataSE) object as input. # Example 1: Plot the side-by-side boxplots of the whole dataset without # overlaying any metrics. We prevent overlaying metrics by setting the # rowData() to NULL. if (FALSE) { data(se_soybean_ir_sub) se_soybean_ir_sub[,-1] <- log(se_soybean_ir_sub[,-1]+1) se_soybean_ir_sub_nm <- se_soybean_ir_sub rowData(se_soybean_ir_sub_nm) <- NULL ret <- plotPCP(dataSE = se_soybean_ir_sub_nm, saveFile = FALSE) ret[[1]] } if (FALSE) { # Example 2: Overlay genes with FDR < 1e-4 as orange parallel coordinate # lines. ret <- plotPCP(dataSE = se_soybean_ir_sub, threshVal = 1e-4, saveFile = FALSE) ret[[1]] } # Example 3: Overlay the ten most significant genes (lowest FDR values) as # blue parallel coordinate lines. if (FALSE) { geneList <- as.data.frame(rowData(se_soybean_ir_sub)) %>% arrange(N_P.FDR) %>% filter(row_number() <= 10) geneList <- geneList[,1] ret <- plotPCP(dataSE = se_soybean_ir_sub, geneList = geneList, lineSize = 0.3, lineColor = "blue", saveFile = FALSE) ret[[1]] } # Example 4: Repeat this same procedure, only now set the hover parameter to # TRUE to allow us to hover over blue parallel coordinate lines and # determine their individual IDs. if (FALSE) { ret <- plotPCP(data = soybean_ir_sub, geneList = geneList, lineSize = 0.3, lineColor = "blue", saveFile = FALSE, hover = TRUE) ret[[1]] }