plotPosSamplesInComp | R Documentation |
This function plots the positions of several groups of
samples across all the components of an
icaSet
object.
plotPosSamplesInComp(samplesByGroup, labGroups = NULL,
icaSet, keepComp = indComp(icaSet), file = NULL,
breaks = 20, colAll = "grey74", colSel = "red",
titlesup = "", resClus,
funClus = c("Mclust", "kmeans"), ...)
samplesByGroup |
A list whose elements are vector of
sample names, these sample names must be available in
|
labGroups |
A vector of group names, will be used to
add names to |
icaSet |
An object of class
|
keepComp |
A subset of components available in
|
file |
A pdf file |
breaks |
The number of breaks to be used in the histograms |
colSel |
The colour of the histogram of the group of interest, default is "red" |
colAll |
The colour of the global histogram, default is "grey74" |
resClus |
A list containing the outputs of function
|
funClus |
Specifies the clustering method used,
either |
titlesup |
Additional title for the histograms |
... |
Additional parameters for function
|
For each subgroup of samples this function plots their positions within the histogram of the global sample contributions.
The values of interest are the sample contributions
across the components, i.e across the columns
A(icaSet)
.
If argument resClus
is not missing, the
association between the clusters and the sub-groups of
samples is tested using a chi-square test. The p-values
of these tests are available in the title of each plot.
NULL
Anne Biton
hist
,
IcaSet
## Not run:
## load an example of IcaSet
data(icaSetCarbayo)
## selection of sample groups according to annotations STAGE
samplesByGroup <- lapply(split(pData(icaSetCarbayo),pData(icaSetCarbayo)[c("STAGE")]), rownames)
# select groups including at least 2 samples
samplesByGroup <- samplesByGroup[which(unlist(lapply(samplesByGroup,length))>1)]
## clustering of samples according to A using Mclust imposing two Gaussian
resClus <- clusterSamplesByComp(icaSet=icaSetCarbayo,funClus="Mclust", nbClus=2, clusterOn="A")
## Plot positions of the groups in 5th component
pdf(file="stageOnIC5.pdf", height = 8.267717, width = 29.7/2.54, paper = 'a4r', title="stageOnIC5")
plotPosSamplesInComp(samplesByGroup=samplesByGroup, icaSet=icaSetCarbayo, funClus="Mclust",
resClus = resClus, keepComp=5)
dev.off()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.