plot,biosignMultiDataSet,ANY-method {biosigner} | R Documentation

## Plot method for biosign signatures

### Description

This function plots signatures obtained by `biosign`.

Displays classifier tiers or individual boxplots from selected features

### Usage

    ## S4 method for signature 'biosignMultiDataSet,ANY'
    plot(
      x,
      y,
      fig.pdfC = c("none", "interactive", "myfile.pdf")[2],
      info.txtC = c("none", "interactive", "myfile.txt")[2],
      ...
    )

    ## S4 method for signature 'biosign,ANY'
    plot(
      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

`x` | An S4 object of class `biosign`, created by the `biosign` function.
`y` | Currently not used.
`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
`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
`...` | Currently not used.
`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
`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
`plotSubC` | Character: Graphic subtitle
`file.pdfC` | Character: deprecated; use the 'fig.pdfC' argument instead
`.sinkC` | Character: deprecated; use the 'info.txtC' argument instead

### Value

A plot is created on the current graphics device.

### Author(s)

Philippe Rinaudo and Etienne Thevenot (CEA)

### 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)

[Package biosigner version 1.22.0 Index]