... | ... |
@@ -19,7 +19,7 @@ |
19 | 19 |
\code{names(samplesByGroup)} is NULL.} |
20 | 20 |
|
21 | 21 |
\item{icaSet}{An object of class |
22 |
- \code{\link[MineICA:IcaSet-class]{IcaSet}}} |
|
22 |
+ \code{\link[MineICA:class-IcaSet]{IcaSet}}} |
|
23 | 23 |
|
24 | 24 |
\item{keepComp}{A subset of components available in |
25 | 25 |
\code{indComp(icaSet)}, if NULL (default) all components |
... | ... |
@@ -57,7 +57,7 @@ |
57 | 57 |
\description{ |
58 | 58 |
This function plots the positions of several groups of |
59 | 59 |
samples across all the components of an |
60 |
- \code{\link[MineICA:IcaSet-class]{icaSet}} object. |
|
60 |
+ \code{\link[MineICA:class-IcaSet]{icaSet}} object. |
|
61 | 61 |
} |
62 | 62 |
\details{ |
63 | 63 |
For each subgroup of samples this function plots their |
... | ... |
@@ -98,7 +98,7 @@ dev.off() |
98 | 98 |
} |
99 | 99 |
\seealso{ |
100 | 100 |
\code{\link{hist}}, |
101 |
- \code{\link[MineICA:IcaSet-class]{IcaSet}} |
|
101 |
+ \code{\link[MineICA:class-IcaSet]{IcaSet}} |
|
102 | 102 |
} |
103 | 103 |
\keyword{internal} |
104 | 104 |
|
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MineICA@73179 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,104 @@ |
1 |
+\name{plotPosSamplesInComp} |
|
2 |
+\alias{plotPosSamplesInComp} |
|
3 |
+\title{Histograms of sample subsets} |
|
4 |
+\usage{ |
|
5 |
+ plotPosSamplesInComp(samplesByGroup, labGroups = NULL, |
|
6 |
+ icaSet, keepComp = indComp(icaSet), file = NULL, |
|
7 |
+ breaks = 20, colAll = "grey74", colSel = "red", |
|
8 |
+ titlesup = "", resClus, |
|
9 |
+ funClus = c("Mclust", "kmeans"), ...) |
|
10 |
+} |
|
11 |
+\arguments{ |
|
12 |
+ \item{samplesByGroup}{A list whose elements are vector of |
|
13 |
+ sample names, these sample names must be available in |
|
14 |
+ \code{sampleNames(icaSet)}. The list should be indexed by |
|
15 |
+ the name of the corresponding groups.} |
|
16 |
+ |
|
17 |
+ \item{labGroups}{A vector of group names, will be used to |
|
18 |
+ add names to \code{sampleByGroup} if |
|
19 |
+ \code{names(samplesByGroup)} is NULL.} |
|
20 |
+ |
|
21 |
+ \item{icaSet}{An object of class |
|
22 |
+ \code{\link[MineICA:IcaSet-class]{IcaSet}}} |
|
23 |
+ |
|
24 |
+ \item{keepComp}{A subset of components available in |
|
25 |
+ \code{indComp(icaSet)}, if NULL (default) all components |
|
26 |
+ are used} |
|
27 |
+ |
|
28 |
+ \item{file}{A pdf file} |
|
29 |
+ |
|
30 |
+ \item{breaks}{The number of breaks to be used in the |
|
31 |
+ histograms} |
|
32 |
+ |
|
33 |
+ \item{colSel}{The colour of the histogram of the group of |
|
34 |
+ interest, default is "red"} |
|
35 |
+ |
|
36 |
+ \item{colAll}{The colour of the global histogram, default |
|
37 |
+ is "grey74"} |
|
38 |
+ |
|
39 |
+ \item{resClus}{A list containing the outputs of function |
|
40 |
+ \code{\link{clusterSamplesByComp}}, which consists of |
|
41 |
+ results of clustering applied to matrix A of argument |
|
42 |
+ \code{icaSet}.} |
|
43 |
+ |
|
44 |
+ \item{funClus}{Specifies the clustering method used, |
|
45 |
+ either \code{"Mclust"} or \code{"kmeans"}. If |
|
46 |
+ \code{resClus} is not missing, equals |
|
47 |
+ \code{resClus$funClus}.} |
|
48 |
+ |
|
49 |
+ \item{titlesup}{Additional title for the histograms} |
|
50 |
+ |
|
51 |
+ \item{...}{Additional parameters for function |
|
52 |
+ \code{\link{hist}}} |
|
53 |
+} |
|
54 |
+\value{ |
|
55 |
+ NULL |
|
56 |
+} |
|
57 |
+\description{ |
|
58 |
+ This function plots the positions of several groups of |
|
59 |
+ samples across all the components of an |
|
60 |
+ \code{\link[MineICA:IcaSet-class]{icaSet}} object. |
|
61 |
+} |
|
62 |
+\details{ |
|
63 |
+ For each subgroup of samples this function plots their |
|
64 |
+ positions within the histogram of the global sample |
|
65 |
+ contributions. |
|
66 |
+ |
|
67 |
+ The values of interest are the sample contributions |
|
68 |
+ across the components, i.e across the columns |
|
69 |
+ \code{A(icaSet)}. |
|
70 |
+ |
|
71 |
+ If argument \code{resClus} is not missing, the |
|
72 |
+ association between the clusters and the sub-groups of |
|
73 |
+ samples is tested using a chi-square test. The p-values |
|
74 |
+ of these tests are available in the title of each plot. |
|
75 |
+} |
|
76 |
+\examples{ |
|
77 |
+\dontrun{ |
|
78 |
+## load an example of IcaSet |
|
79 |
+data(icaSetCarbayo) |
|
80 |
+ |
|
81 |
+## selection of sample groups according to annotations STAGE |
|
82 |
+samplesByGroup <- lapply(split(pData(icaSetCarbayo),pData(icaSetCarbayo)[c("STAGE")]), rownames) |
|
83 |
+# select groups including at least 2 samples |
|
84 |
+samplesByGroup <- samplesByGroup[which(unlist(lapply(samplesByGroup,length))>1)] |
|
85 |
+ |
|
86 |
+## clustering of samples according to A using Mclust imposing two Gaussian |
|
87 |
+resClus <- clusterSamplesByComp(icaSet=icaSetCarbayo,funClus="Mclust", nbClus=2, clusterOn="A") |
|
88 |
+ |
|
89 |
+## Plot positions of the groups in 5th component |
|
90 |
+pdf(file="stageOnIC5.pdf", height = 8.267717, width = 29.7/2.54, paper = 'a4r', title="stageOnIC5") |
|
91 |
+plotPosSamplesInComp(samplesByGroup=samplesByGroup, icaSet=icaSetCarbayo, funClus="Mclust", |
|
92 |
+ resClus = resClus, keepComp=5) |
|
93 |
+dev.off() |
|
94 |
+} |
|
95 |
+} |
|
96 |
+\author{ |
|
97 |
+ Anne Biton |
|
98 |
+} |
|
99 |
+\seealso{ |
|
100 |
+ \code{\link{hist}}, |
|
101 |
+ \code{\link[MineICA:IcaSet-class]{IcaSet}} |
|
102 |
+} |
|
103 |
+\keyword{internal} |
|
104 |
+ |