% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-methods.R
\name{plot,biosignMultiDataSet,ANY-method}
\alias{plot,biosignMultiDataSet,ANY-method}
\alias{plot.biosignMultiDataSet}
\alias{plot,biosignMultiDataSet-method}
\alias{plot,biosign,ANY-method}
\alias{plot.biosign}
\alias{plot,biosign-method}
\title{Plot method for biosign signatures}
\usage{
\S4method{plot}{biosignMultiDataSet,ANY}(
  x,
  y,
  fig.pdfC = c("none", "interactive", "myfile.pdf")[2],
  info.txtC = c("none", "interactive", "myfile.txt")[2],
  ...
)

\S4method{plot}{biosign,ANY}(
  x,
  y,
  tierMaxC = "S",
  typeC = c("tier", "boxplot")[1],
  plotSubC = NA,
  fig.pdfC = c("none", "interactive", "myfile.pdf")[2],
  info.txtC = c("none", "interactive", "myfile.txt")[2],
  file.pdfC = NULL,
  .sinkC = NULL,
  ...
)
}
\arguments{
\item{x}{An S4 object of class \code{biosign}, created by the \code{biosign}
function.}

\item{y}{Currently not used.}

\item{fig.pdfC}{Character: File name with '.pdf' extension for the figure;
if 'interactive' (default), figures will be displayed interactively; if 'none',
no figure will be generated}

\item{info.txtC}{Character: File name with '.txt' extension for the printed
results (call to sink()'); if 'interactive' (default), messages will be
printed on the screen; if 'none', no verbose will be generated}

\item{...}{Currently not used.}

\item{tierMaxC}{Character: Maximum level of tiers to display: Either 'S' and
'A', (for boxplot), or also 'B', 'C', 'D', and 'E' (for tiers) by decreasing
number of selections}

\item{typeC}{Character: Plot type; either 'tier' [default] displaying the
comparison of signatures up to the selected 'tierMaxC' or 'boxplot' showing
the individual boxplots of the features selected by all the classifiers}

\item{plotSubC}{Character: Graphic subtitle}

\item{file.pdfC}{Character: deprecated; use the 'fig.pdfC' argument instead}

\item{.sinkC}{Character: deprecated; use the 'info.txtC' argument instead}
}
\value{
A plot is created on the current graphics device.
}
\description{
This function plots signatures obtained by \code{biosign}.

Displays classifier tiers or individual boxplots from selected features
}
\examples{
# Loading the 'NCI60_4arrays' from the 'omicade4' package
data("NCI60_4arrays", package = "omicade4")
# Selecting two of the four datasets
setNamesVc <- c("agilent", "hgu95")
# Creating the MultiDataSet instance
nciMset <- MultiDataSet::createMultiDataSet()
# Adding the two datasets as ExpressionSet instances
for (setC in setNamesVc) {
  # Getting the data
  exprMN <- as.matrix(NCI60_4arrays[[setC]])
  pdataDF <- data.frame(row.names = colnames(exprMN),
                        cancer = substr(colnames(exprMN), 1, 2),
                        stringsAsFactors = FALSE)
  fdataDF <- data.frame(row.names = rownames(exprMN),
                        name = rownames(exprMN),
                        stringsAsFactors = FALSE)
  # Building the ExpressionSet
  eset <- Biobase::ExpressionSet(assayData = exprMN,
                                 phenoData = new("AnnotatedDataFrame",
                                                 data = pdataDF),
                                 featureData = new("AnnotatedDataFrame",
                                                   data = fdataDF),
                                 experimentData = new("MIAME",
                                                      title = setC))
  # Adding to the MultiDataSet
  nciMset <- MultiDataSet::add_eset(nciMset, eset, dataset.type = setC,
                                    GRanges = NA, warnings = FALSE)
}
# Restricting to the 'ME' and 'LE' cancer types
sampleNamesVc <- Biobase::sampleNames(nciMset[["agilent"]])
cancerTypeVc <- Biobase::pData(nciMset[["agilent"]])[, "cancer"]
nciMset <- nciMset[sampleNamesVc[cancerTypeVc \%in\% c("ME", "LE")], ]
# Summary of the MultiDataSet
nciMset
# Selecting the significant features for PLS-DA, RF, and SVM classifiers, and getting back the updated MultiDataSet
nciBiosign <- biosigner::biosign(nciMset, "cancer")
# Plotting the selected signatures
plot(nciBiosign)

## loading the diaplasma dataset

data(diaplasma)
attach(diaplasma)

## restricting to a smaller dataset for this example

featureSelVl <- variableMetadata[, "mzmed"] >= 490 & variableMetadata[, "mzmed"] < 500
dataMatrix <- dataMatrix[, featureSelVl]
variableMetadata <- variableMetadata[featureSelVl, ]

## signature selection for all 3 classifiers
## a bootI = 5 number of bootstraps is used for this example
## we recommend to keep the default bootI = 50 value for your analyzes

set.seed(123)
diaSign <- biosign(dataMatrix, sampleMetadata[, "type"], bootI = 5)

## individual boxplot of the selected signatures

plot(diaSign, typeC = "boxplot")

detach(diaplasma)

}
\author{
Philippe Rinaudo and Etienne Thevenot (CEA)
}
