plot {maigesPack} | R Documentation

## Method plot for objects defined in this package

### Description

Generic function `plot` to display scatter plots or other types of graphical representation for objects defined in this package.

### Usage

    ## S3 method for class 'maigesRaw':
    plot(x, bkgSub="subtract", z=NULL, legend.func=NULL,
        ylab="W", ...)

    ## S3 method for class 'maiges':
    plot(x, z=NULL, legend.func=NULL, ylab="W", ...)

    ## S3 method for class 'maigesANOVA':
    plot(x, z=NULL, legend.func=NULL, ylab="W", ...)

    ## S3 method for class 'maigesDE':
    plot(x, adjP="none", idx=1, ...)

    ## S3 method for class 'maigesDEcluster':
    plot(x, adjP="none", idx=1, ...)

    ## S3 method for class 'maigesClass':
    plot(x, idx=1, ...)

    ## S3 method for class 'maigesRelNetB':
    plot(x=NULL, cutPval=0.05, cutCor=NULL,
    name=NULL, ...)

    ## S3 method for class 'maigesRelNetM':
    plot(x=NULL, cutPval=0.05, names=NULL, ...)

    ## S3 method for class 'maigesActMod':
    plot(x, type=c("S", "C")[2], keepEmpty=FALSE, ...)

    ## S3 method for class 'maigesActNet':
    plot(x, type=c("score", "p-value")[1], ...)

### Arguments

`x` | an object of any class defined in this package, except `maigesPreRaw`.
`bkgSub` | string specifying the method for background subtraction. See function `backgroundcorrect` to find the available options.
`z` | accessor method for stratifying data, see `maPlot`.
`legend.func` | string specifying options to show legend in the figure.
`ylab` | character string specifying the label to y axis.
`adjP` | type of p-value adjustment, see function `mt.rawp2adjp` in package multtest.
`idx` | index of the test statistic to be plotted in case of objects of classes `maigesDE` and `maigesDEcluster` or the index of the clique to be plotted in case of object with class `maigesClass`.
`cutPval` | real number in [0,1] specifying a cutoff p-value to show significant results from relevance network analysis. For class `maigesRelNetB`, if this parameter is specified the argument `cutCor` isn't used.
`cutCor` | real number in [0,1], specifying a coefficient correlation value cutoff (in absolute value) to show only absolute correlation values greater than this value. Pay attention, to use this cutoff it is necessary to specify `cutPval` as NULL.
`name` | character string giving a name for sample type tested to be plotted as a name in the method for class `maigesRelNetB`.
`names` | similar to the previous one, but it is a vector of length 3.
`type` | string specifying the type of colour map to be plotted. For class `maigesActMod` it must be 'S' or 'C' for samples or biological conditions, respectively. For class `maigesActNet` it must be 'score' or 'p-value' for the statistics or p-values of the tests, respectively.
`keepEmpty` | logical, if true the results of all gene groups are displayed, else only the gene groups that present at least one significant result are displayed.
`...` | additional arguments for method `maPlot` or `plot`

### Details

This method uses the function `maPlot` to display scatter plots ratio vs mean values for objects of class `maiges`, `maigesRaw` or `maigesANOVA`. For objects of class `maigesDE` or `maigesDEcluster`, this method display volcano plots. For objects of class `maigesClass` it do 2 or 3 dimensions scatter plots that facilitate the visualisation of good classifying cliques of genes For objects of class `maigesRelNetM` the method displays 3 circular graphs representing the correlation values for the two groups tested and the p-values of the tests. For class `maigesRelNetB` it displays only one circular graph showing the correlation values for the type tested. In objects of class `maigesActMod` and `maigesActNet` the method do the same job as `image`.

Pay attention that, even using the method `maPlot` from marray package, we plot W values against A values instead of MA plots.

### Author(s)

Gustavo H. Esteves <gesteves@vision.ime.usp.br>

### See Also

`mt.rawp2adjp`, `backgroundcorrect`, `maPlot` in the package marray, `plot` in the base package.

### Examples

    ## Loading the dataset
    data(gastro)

    ## Example with an object of class maigesRaw, without and with backgound
    ## subtraction, also we present a plot with normexp (from limma package)
    ## subtract algorithm.
    plot(gastro.raw[,1], bkgSub="none")
    plot(gastro.raw[,1], bkgSub="subtract")
    plot(gastro.raw[,1], bkgSub="normexp")

    ## Example with an object of class maigesNorm.
    plot(gastro.norm[,1])

    ## Example for objects of class maigesDE.

    ## Doing bootstrap from t statistic test fot 'Type' sample label, k=1000
    ## specifies one thousand bootstraps
    gastro.ttest = deGenes2by2Ttest(gastro.summ, sLabelID="Type")

    plot(gastro.ttest) ## Volcano plot

    ## Example for object of class maigesClass.

    ## Doing LDA classifier with 3 genes for the 6th gene group comparing
    ## the 2 categories from 'Type' sample label.
    gastro.class = classifyLDA(gastro.summ, sLabelID="Type",
      gNameID="GeneName", nGenes=3, geneGrp=6)

    plot(gastro.class) ## plot the 1st classifier
    plot(gastro.class, idx=7) ## plot the 7th classifier

    ## Example for object of class maigesActNet

    ## Doing functional classification of gene groups for 'Tissue' sample label
    gastro.mod = activeMod(gastro.summ, sLabelID="Tissue", cutExp=1,
      cutPhiper=0.05)

    plot(gastro.mod, "S", margins=c(15,3)) ## Plot for individual samples
    plot(gastro.mod, "C", margins=c(21,5)) ## Plot for unique biological conditions

    ## Example for object of class maigesRelNetB

    ## Constructing the relevance network (Butte's method) for sample
    ## 'Tissue' equal to 'Neso' for the 1st gene group
    gastro.net = relNetworkB(gastro.summ, sLabelID="Tissue",
      samples="Neso", geneGrp=1, type="Rpearson")

    plot(gastro.net, cutPval=0.05)

    ## Example for object of class maigesRelNetM

    ## Constructing the relevance network for sample
    ## 'Tissue' comparing 'Neso' and 'Aeso' for the 1st gene group
    gastro.net = relNetworkM(gastro.summ, sLabelID="Tissue",
      samples = list(Neso="Neso", Aeso="Aeso"), geneGrp=11,
      type="Rpearson")

    plot(gastro.net, cutPval=0.05)
    plot(gastro.net, cutPval=0.01)

    ## Example for objects of class maigesActNet

    ## Doing functional classification of gene networks for sample Label
    ## given by 'Tissue'
    gastro.net = activeNet(gastro.summ, sLabelID="Tissue")

    plot(gastro.net, type="score", margins=c(21,5))
    plot(gastro.net, type="p-value", margins=c(21,5))

[Package maigesPack version 1.4.0 Index]