dataPlot {KnowSeq} | R Documentation

## Plot different graphs depending on the current step of KnowSeq pipeline.

### Description

This function allows to plot different charts only by changing the parameters, for the different KnowSeq pipeline steps. Furthermore, the chosen plot can be saved to PNG and PDF.

### Usage

    dataPlot(data, labels, colours = c("green", "red"), main = "",
      ylab = "Expression", xlab = "Samples", legend = "",
      mode = "boxplot", clusters = 2, toPNG = FALSE, toPDF = FALSE)

### Arguments

`data` | Normally, the data parameter is an expression matrix or data.frame, however for the confusionMatrix plot, the data are a confussion matrix that can be achieved by using the output of any of the machine learning functions of this package.
`labels` | A vector or factor that contains the labels for each of the samples in the data parameter.
`colours` | A vector that contains the desired colours to plot the different charts. Example: c("red","green","blue").
`main` | The title for the plot.
`ylab` | The description for the y axis.
`xlab` | The description for the x axis.
`legend` | A vector with the elements in the legend of the plot.
`mode` | The different plots supported by this package. The possibilities are boxplot, orderedBoxplot, genesBoxplot, heatmap, optimalClusters, knnClustering, confusionMatrix and classResults.
`clusters` | The number of optimal clusters for the data parameter calculated with this function in mode optimalCluster. This is useful to know the possible clusters formed due to the batch effect.
`toPNG` | Boolean variable to indicate if a plot would be save to PNG.
`toPDF` | Boolean variable to indicate if a plot would be save to PDF.

### Value

Nothing to return.

### Examples

    dir <- system.file("extdata", package="KnowSeq")
    load(paste(dir,"/expressionExample.RData",sep = ""))

    dataPlot(expressionMatrix,labels,mode = "boxplot",toPNG = TRUE,toPDF = TRUE)
    dataPlot(DEGsMatrix[1:12,],labels,mode = "orderedBoxplot",toPNG = TRUE,toPDF = TRUE)
    dataPlot(DEGsMatrix[1:12,],labels,mode = "genesBoxplot",toPNG = TRUE,toPDF = FALSE)
    dataPlot(DEGsMatrix[1:12,],labels,mode = "heatmap",toPNG = TRUE,toPDF = TRUE)

[Package KnowSeq version 1.0.0 Index]