writeHtmlResTestsByAnnot {MineICA} | R Documentation

## Tests if groups of samples are differently distributed on the components according and do the corresponding plots.

### Description

This internal function creates an HTML file containing a table of dimensions 'variables x components' with p-values. When a p-value is considered as significant according to the threshold `cutoff`, it is written in bold and filled with a link pointing to the corresponding plot. These plots are contained in images located in the path `pathplot`. To be identified by the function, the file syntax of each image file must be "index-of-component_colAnnot.typeImage".

### Usage

      writeHtmlResTestsByAnnot(params, icaSet, res, res2,
        nameres = "p", nameres2 = "cor", onlySign = TRUE,
        cutoff = params["pvalCutoff"],
        cutoffDir = c("<=", ">="), path, pathplot = "plots/",
        filename = NULL, typeImage = "png", caption = "",
        keepVar)

### Arguments

`params` | An object of class `MineICAParams` containing the parameters of the analysis
`icaSet` | An object of class `IcaSet`
`res` | A matrix or data.frame of dimension 'components x variables' containing numeric values that quantify the association of the components with sample variables (e.g p-values, FDR, correlation values). This is the matrix used to select the significant results according to `cutoff` and `cutoffDir`.
`res2` | A matrix or data.frame of dimension 'components x variables' containing numeric values that quantify the association of the components with sample annotations (e.g p-values, FDR, correlation values). It is only used as an additional result displayed in the output.
`nameres` | Name of the values contained in `res`, default is "p"
`nameres2` | Name of the values contained in `res2`, default is "cor"
`onlySign` | If TRUE (default), only the significant results are plotted
`cutoff` | The threshold p-value for statistical significance
`path` | A directory for the HTML file containing the p-value results
`pathplot` | A directory for the plots
`filename` | The name of the file where the results will be displayed in format HTML, if NULL no file is created
`typeImage` | The type of image file where each plot is saved
`caption` | The title of the HTML table
`cutoffDir` | The direction to be used with the cutoff: `"inf"` for "<=" and `"sup"` for ">="
`keepVar` | The variable labels to be considered, i.e a subset of the variables of icaSet available in `varLabels(icaSet)`.

### Details

If argument `onlySign` is TRUE, then only links to plots that are significant according to the given threshold are provided.

When `res2` is not missing, the values contained in `res2` are pasted to the values contained in res in the output array. `nameres` and `nameres2` are used such as every element in the ouput array contains two indexed values: `nameres`=x, `nameres2`=y.

### Value

Returns a data.frame of dimensions 'components x variables' containing the p-values of the non-parametric tests (Wilcoxon or Kruskal-Wallis tests) wich test if the samples groups defined by each variable are differently distributed on the components

### Author(s)

Anne Biton

### See Also

`p.adjust`, `qualVarAnalysis`, `quantVarAnalysis`

[Package MineICA version 1.27.0 Index]