Browse code

Adds MineICA, SomatiCA and lpNet to the repos.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MineICA@73179 bc3139a8-67e5-0310-9ffc-ced21a209358

Marc Carlson authored on 05/02/2013 22:15:53
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,86 @@
1
+\name{clusterSamplesByComp}
2
+\alias{clusterSamplesByComp}
3
+\title{Cluster samples from an IcaSet}
4
+\usage{
5
+  clusterSamplesByComp(icaSet, params,
6
+    funClus = c("Mclust", "kmeans", "pam", "pamk", "hclust", "agnes"),
7
+    filename, clusterOn = c("A", "S"),
8
+    level = c("genes", "features"), nbClus,
9
+    metric = "euclidean", method = "ward", ...)
10
+}
11
+\arguments{
12
+  \item{icaSet}{An \code{IcaSet} object}
13
+
14
+  \item{params}{A \code{MineICAParams} object}
15
+
16
+  \item{funClus}{The function to be used for clustering,
17
+  must be one of
18
+  \code{c("Mclust","kmeans","pam","pamk","hclust","agnes")}}
19
+
20
+  \item{filename}{A file name to write the results of the
21
+  clustering in}
22
+
23
+  \item{clusterOn}{Specifies the matrix used to apply
24
+  clustering: \describe{ \item{\code{"A"}:}{the clustering
25
+  is performed in one dimension, on the vector of sample
26
+  contributions,} \item{"S":}{the clustering is performed
27
+  on the original data restricted to the contributing
28
+  individuals.}}}
29
+
30
+  \item{level}{The level of projections to be used when
31
+  \code{clusterOn="S"}, either \code{"features"} or
32
+  \code{"genes"}.}
33
+
34
+  \item{nbClus}{The number of clusters to be computed,
35
+  either a single number or a numeric vector whose length
36
+  equals the number of components. If missing (only allowed
37
+  if \code{funClus} is one of \code{c("Mclust","pamk")})}
38
+
39
+  \item{metric}{Metric used in \code{pam} and
40
+  \code{hclust}, default is \code{"euclidean"}}
41
+
42
+  \item{method}{Method of hierarchical clustering, used in
43
+  \code{hclust} and \code{agnes}}
44
+
45
+  \item{...}{Additional parameters required by the
46
+  clustering function \code{funClus}.res <-
47
+  clusterSamplesByComp(icaSet=icaSetCarbayo, params=params,
48
+  funClus="kmeans",}
49
+}
50
+\value{
51
+  A list consisting of three elements
52
+  \describe{\item{clus:}{a list specifying the sample
53
+  clustering for each component,}\item{resClus:}{the
54
+  complete output of the clustering
55
+  function,}\item{funClus:}{the function used to perform
56
+  the clustering.}}. When \code{clusterOn="S"}, if some
57
+  components were not used because no contributing elements
58
+  is selected using the cutoff, the icaSet with the
59
+  corresponding component deleted is also returned.
60
+}
61
+\description{
62
+  This function allows to cluster samples according to the
63
+  results of an ICA decomposition. One clustering is run
64
+  independently for each component.
65
+}
66
+\examples{
67
+data(icaSetCarbayo)
68
+params <- buildMineICAParams(resPath="carbayo/", selCutoff=4)
69
+
70
+## cluster samples according to their contributions
71
+# using Mclust without a number of clusters
72
+res <- clusterSamplesByComp(icaSet=icaSetCarbayo, params=params, funClus="Mclust",
73
+                            clusterOn="A", filename="clusA")
74
+
75
+# using kmeans
76
+res <- clusterSamplesByComp(icaSet=icaSetCarbayo, params=params, funClus="kmeans",
77
+                            clusterOn="A", nbClus=2, filename="clusA")
78
+}
79
+\author{
80
+  Anne Biton
81
+}
82
+\seealso{
83
+  \code{Mclust}, \code{kmeans}, \code{pam}, \code{pamk},
84
+  \code{hclust}, \code{agnes}, \code{cutree}
85
+}
86
+