Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/functions_comp2annottests.R
This function tests if the groups of samples formed by
the variables are differently distributed on the
components, in terms of contribution value (i.e of values
in matrix A(icaSet)
). The distribution of the
samples on the components are represented using either
density plots of boxplots. It is possible to restrict the
tests and the plots to a subset of samples and/or
components.
1 2 3 4 5 6 7 8 9 | qualVarAnalysis(params, icaSet, keepVar,
keepComp = indComp(icaSet),
keepSamples = sampleNames(icaSet),
adjustBy = c("none", "component", "variable"),
method = "BH", doPlot = TRUE, typePlot = "density",
addPoints = FALSE, onlySign = TRUE,
cutoff = params["pvalCutoff"],
colours = annot2col(params), path = "qualVarAnalysis/",
filename = "qualVar", typeImage = "png")
|
params |
An object of class
|
icaSet |
An object of class
|
keepVar |
The variable labels to be considered, must
be a subset of |
keepComp |
A subset of components, must be included
in |
keepSamples |
A subset of samples, must be included
in |
adjustBy |
The way the p-values of the Wilcoxon and
Kruskal-Wallis tests should be corrected for multiple
testing: |
method |
The correction method, see
|
doPlot |
If TRUE (default), the plots are done, else only tests are performed. |
addPoints |
If TRUE, points are superimposed on the boxplot. |
typePlot |
The type of plot, either |
onlySign |
If TRUE (default), only the significant results are plotted. |
cutoff |
A threshold p-value for statistical significance. |
colours |
A vector of colours indexed by the
variable levels, if missing the colours are automatically
generated using |
path |
A directory _within resPath(params)_ where
the files containing the plots and the p-value results
will be located. Default is |
typeImage |
The type of image file to be used. |
filename |
The name of the HTML file containing the p-values of the tests, if NULL no file is created. |
This function writes an HTML file containing the results
of the tests as a an array of dimensions 'variables *
components' containing the p-values of the tests. 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. One image
is created by plot and located into the sub-directory
"plots/" of path
. Each image is named by
index-of-component_var.png. Wilcoxon or Kruskal-Wallis
tests are performed depending on the number of groups of
interest in the considered variable (argument
keepLev
).
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.
Anne Biton
, qualVarAnalysis
, p.adjust
,
link{writeHtmlResTestsByAnnot}
,
wilcox.test
, kruskal.test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## load an example of IcaSet
data(icaSetCarbayo)
## build MineICAParams object
params <- buildMineICAParams(resPath="carbayo/")
## Define the directory containing the results
dir <- paste(resPath(params), "comp2annot/", sep="")
## Run tests, make no adjustment of the p-values,
# for variable grade and components 1 and 2,
# and plot boxplots when 'doPlot=TRUE'.
qualVarAnalysis(params=params, icaSet=icaSetCarbayo, adjustBy="none", typePlot="boxplot",
keepVar="GRADE", keepComp=1:2, path=dir, doPlot=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.