runAn {MineICA} | R Documentation

## Run analysis of an IcaSet object

### Description

This function runs the analysis of an ICA decomposition contained in an IcaSet object, according to the parameters entered by the user and contained in a MineICAParams.

### Usage

      runAn(params, icaSet, keepVar,
        heatmapCutoff = params["selCutoff"],
        funClus = c("Mclust", "kmeans"), nbClus,
        clusterOn = "A", keepComp, keepSamples,
        adjustBy = c("none", "component", "variable"),
        typePlot = c("boxplot", "density"),
        mart = useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl"),
        dbGOstats = c("KEGG", "GO"), ontoGOstats = "BP",
        condGOstats = TRUE,
        cutoffGOstats = params["pvalCutoff"],
        writeGenesByComp = TRUE, writeFeaturesByComp = FALSE,
        selCutoffWrite = 2.5, runVarAnalysis = TRUE,
        onlySign = T, runClustering = FALSE, runGOstats = TRUE,
        plotHist = TRUE, plotHeatmap = TRUE)

### Arguments

`params` | An object of class `MineICAParams` containing the parameters of the analysis.
`icaSet` | An object of class `IcaSet`.
`keepVar` | The variable labels to be considered, i.e a subset of the annotation variables available in (`varLabels(icaSet)`).
`keepSamples` | The samples to be considered, i.e a subset of (`sampleNames(icaSet)`).
`heatmapCutoff` | The cutoff (applied to the scaled feature/gene projections contained in S/SByGene) used to select the contributing features/genes.
`funClus` | The function to be used to cluster the samples, must be one of `c("Mclust","kmeans","pam","pamk","hclust","agnes")`. Default is `"Mclust"`.
`nbClus` | The number of clusters to be computed when applying `funClus`. Can be missing (default) if `funClus="Mclust"` or `funClus="pamk"`.
`keepComp` | The indices of the components to be analyzed, must be included in `indComp(icaSet)`. If missing, all components are treated.
`adjustBy` | The way the p-values of the Wilcoxon and Kruskal-Wallis tests should be corrected for multiple testing: `"none"` if no p-value correction has to be done, `"component"` if the p-values have to be corrected by component, `"annotation"` if the p-values have to be corrected by variable
`typePlot` | The type of plot used to show distribution of sample-groups contributions, either "density" or "boxplot"
`mart` | A mart object used for annotation, see function `useMart`
`dbGOstats` | The used database to use ('GO' and/or 'KEGG'), default is both.
`ontoGOstats` | A string specifying the GO ontology to use. Must be one of 'BP', 'CC', or 'MF', see `GOHyperGParams`. Only used when argument `dbGOstats` is 'GO'.
`condGOstats` | A logical indicating whether the calculation should conditioned on the GO structure, see `GOHyperGParams`.
`cutoffGOstats` | The p-value threshold used for selecting enriched gene sets, default is params["pvalCutoff"]
`writeGenesByComp` | If TRUE (default) the gene projections (`SByGene(icaSet)`) are written in an html file and annotated using `biomaRt` for each component.
`writeFeaturesByComp` | If TRUE (default) the feature projections (`S(icaSet)`) are written in an html file and annotated using `biomaRt` for each component.
`runGOstats` | If TRUE the enrichment analysis of the contributing genes is run for each component using package `GOstats` (default is TRUE).
`plotHist` | If TRUE the position of the sample annotations within the histograms of the sample contributions are plotted.
`plotHeatmap` | If TRUE the heatmap of the contributing features/genes are plotted for each component.
`runClustering` | If TRUE the potential associations between a clustering of the samples (performed according to the components), and the sample annotations, are tested using chi-squared tests.
`runVarAnalysis` | If TRUE the potential associations between sample contributions (contained in `A(icaSet)`) are tested using Wilcoxon or Kruskal-Wallis tests.
`onlySign` | If TRUE (default), only the significant results are plotted in functions `qualVarAnalysis, quantVarAnalysis, clusVarAnalysis`, else all plots are done.
`selCutoffWrite` | The cutoff applied to the absolute feature/gene projection values to select the features/genes that will be annotated using package `biomaRt`, default is 2.5.
`clusterOn` | Specifies the matrix used to apply clustering if `runClustering=TRUE`: `"A"`: the clustering is performed in one dimension, on the vector of sample contributions, "S": the clustering is performed on the original data restricted to the contributing individuals, "AS": the clustering is performed on the matrix formed by the product of the column of A and the row of S.

### Details

This function calls functions of the MineICA package depending on the arguments:

`writeProjByComp` (if `writeGenesByComp=TRUE` or `writeFeaturesByComp`)

  which writes in html files the description of the features/genes contributing to each component, and their projection values on all the components.

`plot_heatmapsOnSel` (if `plotHeatmap=TRUE`)

  which plots heatmaps of the data restricted to the contributing features/genes of each component.

`plotPosAnnotInComp` (if `plotHist=TRUE`)

  which plots, within the histogram of the sample contribution values of every component, the position of groups of samples formed according to the sample annotations contained in `pData(icaSet)`.

`clusterSamplesByComp` (if `runClustering=TRUE`)

  which clusters the samples according to each component.

`clusVarAnalysis` (if `runClustering=TRUE`)

  which computes the chi-squared test of association between a given clustering of the samples and each annotation level contained in `pData(icaSet)`, and summarizes the results in an HTML file.

`runEnrich` (if `runGOstats=TRUE`)

  which perforns enrichment analysis of the contributing genes of the components using package GOstats.

`qualVarAnalysis` and `quantVarAnalysis` (if `varAnalysis=TRUE`)

  which tests if the groups of samples formed according to sample annotations contained in `pData(icaSet)` are differently distributed on the components, in terms of contribution value.

Several directories containing the results of each analysis are created by the function:

ProjByComp:

  contains the annotations of the features or genes, one file per component;

varAnalysisOnA:

  contains two directories: 'qual/' and 'quant/' which respectively contain the results of the association between components qualitative and quantitative variables;

Heatmaps:

  contains the heatmaps (one pdf file per component) of contributing genes by component;

varOnSampleHist:

  contains athe histograms of sample contributions superimposed with the histograms of the samples grouped by variable;

cluster2var:

  contains the association between a clustering of the samples performed on the mixing matrix `A` and the variables.

### Value

NULL

### Author(s)

Anne Biton

### See Also

`writeProjByComp`,

### Examples

    ## Not run:

    ## load an example of IcaSet
    data(icaSetCarbayo)
    ## make sure the 'mart' attribute is correctly defined
    mart(icaSetCarbayo) <- useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl")

    ## creation of an object of class MineICAParams
    ## here we use a low threshold because 'icaSetCarbayo' is already
    # restricted to the contributing features/genes
    params <- buildMineICAParams(resPath="~/resMineICACarbayotestRunAn/", selCutoff=2, pvalCutoff=0.05)
    require(hgu133a.db)

    runAn(params=params, icaSet=icaSetCarbayo)

    ## End(Not run)

[Package MineICA version 1.30.0 Index]