plotDensOneAnnotInAllComp | R Documentation |
Given a variable of the phenotype data (i.e vector of sample annotations), this function tests if the groups of samples formed by this variable are differently distributed on the components, in terms of contribution values. The distribution of the groups on the components are represented using density plots. It is possible to restrict the tests and the plots to a subset of samples and/or components.
plotDensOneAnnotInAllComp(icaSet, keepVar, path = NULL,
samples, keepComp, keepLev = NULL, colours = NULL,
legend.title = NULL, doPlot = TRUE, cutoff = 0.05,
onlySign = TRUE, resTests)
icaSet |
an object of class
|
keepVar |
a variable label, i.e the label of a
column of the pheno data of icaSet available in
( |
path |
the directory where the plots will be located |
samples |
a subset of sample names available in
|
keepComp |
a subset of components available in
|
keepLev |
the groups of interest, i.e the levels of
the annotation |
colours |
A vector of colours indexed by the
elements of |
legend.title |
title of the legend |
cutoff |
The threshold p-value for statistical significance |
doPlot |
if TRUE (default), the plots are drawn, else if FALSE only test results are returned |
onlySign |
if TRUE (default), only the significant results are plotted |
resTests |
a vector of p-values per component, if NULL (default) the p-values are calculated using Wilcoxon or Kruskal-Wallis test |
Wilcoxon or Kruskal-Wallis tests are applied depending on
the number of groups of interest from the considered
annotation (argument keepLev
). The plots are saved
in individual files (one file per component) in arg
'path' if specified or in the current directory if not
specificied. Ech individual file is nameb
'index-of-component_colAnnot.png.' Recall that the
sample-contribution values are contained in
A(icaSet)
, and the sample annotations in
pData(icaSet)
.
One png image is created by plot and located in
path
. Each image is named by
'index-of-component_keepVar.png'.
Returns a data.frame of dimensions 'components x 1' containing the results of the non-parametric tests (Wilcoxon or Kruskal-Wallis tests) that test if the groups of interest are differently distributed on the components
Anne Biton
wilcoxOrKruskalOnA
,
codewriteHtmlResTestsByAnnot,
codewilcox.test, codekruskal.test
## Not run:
## load an example of IcaSet
data(icaSetCarbayo)
## have a look at the sample annotations which are available
varLabels(icaSetCarbayo)
## with doPlot=TRUE trace the contributions of the samples according
## to their grade on the components
restests <- plotDensOneAnnotInAllComp(icaSet=icaSetCarbayo, keepVar="GRADE",
doPlot=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.