... | ... |
@@ -4,12 +4,24 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
|
8 |
- messages = TRUE, outputFrequency = 1000, uncertainty = NULL, |
|
9 |
- checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
|
10 |
- checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
|
11 |
- workerID = 1, asynchronousUpdates = TRUE, nSnapshots = 0, |
|
12 |
- snapshotPhase = "sampling", ...) |
|
7 |
+CoGAPS( |
|
8 |
+ data, |
|
9 |
+ params = new("CogapsParams"), |
|
10 |
+ nThreads = 1, |
|
11 |
+ messages = TRUE, |
|
12 |
+ outputFrequency = 1000, |
|
13 |
+ uncertainty = NULL, |
|
14 |
+ checkpointOutFile = "gaps_checkpoint.out", |
|
15 |
+ checkpointInterval = 0, |
|
16 |
+ checkpointInFile = NULL, |
|
17 |
+ transposeData = FALSE, |
|
18 |
+ BPPARAM = NULL, |
|
19 |
+ workerID = 1, |
|
20 |
+ asynchronousUpdates = TRUE, |
|
21 |
+ nSnapshots = 0, |
|
22 |
+ snapshotPhase = "sampling", |
|
23 |
+ ... |
|
24 |
+) |
|
13 | 25 |
} |
14 | 26 |
\arguments{ |
15 | 27 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -47,6 +47,12 @@ CoGAPS) but only when the user is manually calling CoGAPS in parallel} |
47 | 47 |
|
48 | 48 |
\item{asynchronousUpdates}{enable asynchronous updating which allows for multi-threaded runs} |
49 | 49 |
|
50 |
+\item{nSnapshots}{how many snapshots to take in each phase, setting this to 0 disables |
|
51 |
+snapshots} |
|
52 |
+ |
|
53 |
+\item{snapshotPhase}{which phase to take snapsjots in e.g. "equilibration", "sampling", |
|
54 |
+"all"} |
|
55 |
+ |
|
50 | 56 |
\item{...}{allows for overwriting parameters in params} |
51 | 57 |
} |
52 | 58 |
\value{ |
... | ... |
@@ -5,7 +5,7 @@ |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 |
- messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
|
8 |
+ messages = TRUE, outputFrequency = 1000, uncertainty = NULL, |
|
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 | 11 |
workerID = 1, asynchronousUpdates = TRUE, nSnapshots = 0, |
... | ... |
@@ -8,7 +8,8 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 |
- workerID = 1, asynchronousUpdates = TRUE, ...) |
|
11 |
+ workerID = 1, asynchronousUpdates = TRUE, nSnapshots = 0, |
|
12 |
+ snapshotPhase = "sampling", ...) |
|
12 | 13 |
} |
13 | 14 |
\arguments{ |
14 | 15 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -5,7 +5,7 @@ |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 |
- messages = TRUE, outputFrequency = 2500, uncertainty = NULL, |
|
8 |
+ messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
|
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 | 11 |
workerID = 1, asynchronousUpdates = TRUE, ...) |
... | ... |
@@ -44,6 +44,8 @@ only worker 1 prints output and each worker outputs when it finishes, this |
44 | 44 |
is not neccesary when using the default parallel methods (i.e. distributed |
45 | 45 |
CoGAPS) but only when the user is manually calling CoGAPS in parallel} |
46 | 46 |
|
47 |
+\item{asynchronousUpdates}{enable asynchronous updating which allows for multi-threaded runs} |
|
48 |
+ |
|
47 | 49 |
\item{...}{allows for overwriting parameters in params} |
48 | 50 |
} |
49 | 51 |
\value{ |
... | ... |
@@ -8,7 +8,7 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 2500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 |
- workerID = 1, ...) |
|
11 |
+ workerID = 1, asynchronousUpdates = TRUE, ...) |
|
12 | 12 |
} |
13 | 13 |
\arguments{ |
14 | 14 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -5,8 +5,8 @@ |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 |
- messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
|
9 |
- checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
|
8 |
+ messages = TRUE, outputFrequency = 2500, uncertainty = NULL, |
|
9 |
+ checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 0, |
|
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 | 11 |
workerID = 1, ...) |
12 | 12 |
} |
... | ... |
@@ -7,11 +7,8 @@ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 |
- checkpointInFile = NULL, transposeData = FALSE, |
|
11 |
- subsetIndices = NULL, subsetDim = 0, BPPARAM = NULL, |
|
12 |
- geneNames = NULL, sampleNames = NULL, fixedPatterns = NULL, |
|
13 |
- whichMatrixFixed = "N", takePumpSamples = FALSE, |
|
14 |
- outputToFile = NULL, workerID = 1, ...) |
|
10 |
+ checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
|
11 |
+ workerID = 1, ...) |
|
15 | 12 |
} |
16 | 13 |
\arguments{ |
17 | 14 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -40,28 +37,8 @@ contained in this file} |
40 | 37 |
for data that is stored as samples x genes since CoGAPS requires data to be |
41 | 38 |
genes x samples} |
42 | 39 |
|
43 |
-\item{subsetIndices}{set of indices to use from the data} |
|
44 |
- |
|
45 |
-\item{subsetDim}{which dimension (1=rows, 2=cols) to subset} |
|
46 |
- |
|
47 | 40 |
\item{BPPARAM}{BiocParallel backend} |
48 | 41 |
|
49 |
-\item{geneNames}{vector of names of genes in data} |
|
50 |
- |
|
51 |
-\item{sampleNames}{vector of names of samples in data} |
|
52 |
- |
|
53 |
-\item{fixedPatterns}{fix either 'A' or 'P' matrix to these values, in the |
|
54 |
-context of distributed CoGAPS (GWCoGAPS/scCoGAPS), the first phase is |
|
55 |
-skipped and fixedPatterns is used for all sets - allowing manual pattern |
|
56 |
-matching, as well as fixed runs of standard CoGAPS} |
|
57 |
- |
|
58 |
-\item{whichMatrixFixed}{either 'A' or 'P', indicating which matrix is fixed} |
|
59 |
- |
|
60 |
-\item{takePumpSamples}{whether or not to take PUMP samples} |
|
61 |
- |
|
62 |
-\item{outputToFile}{name of a file to save the output to, will create 4 files |
|
63 |
-of the form "filename_nPatterns_[Amean, Asd, Pmean, Psd].extension"} |
|
64 |
- |
|
65 | 42 |
\item{workerID}{if calling CoGAPS in parallel the worker ID can be specified, |
66 | 43 |
only worker 1 prints output and each worker outputs when it finishes, this |
67 | 44 |
is not neccesary when using the default parallel methods (i.e. distributed |
... | ... |
@@ -84,14 +84,14 @@ SingleCellExperiment. The supported file types are csv, tsv, and mtx. |
84 | 84 |
\examples{ |
85 | 85 |
# Running from R object |
86 | 86 |
data(GIST) |
87 |
-resultA <- CoGAPS(GIST.data_frame, nIterations=100) |
|
87 |
+resultA <- CoGAPS(GIST.data_frame, nIterations=25) |
|
88 | 88 |
|
89 | 89 |
# Running from file name |
90 | 90 |
gist_path <- system.file("extdata/GIST.mtx", package="CoGAPS") |
91 |
-resultB <- CoGAPS(gist_path, nIterations=100) |
|
91 |
+resultB <- CoGAPS(gist_path, nIterations=25) |
|
92 | 92 |
|
93 | 93 |
# Setting Parameters |
94 | 94 |
params <- new("CogapsParams") |
95 |
-params <- setParam(params, "nPatterns", 5) |
|
96 |
-resultC <- CoGAPS(GIST.data_frame, params, nIterations=100) |
|
95 |
+params <- setParam(params, "nPatterns", 3) |
|
96 |
+resultC <- CoGAPS(GIST.data_frame, params, nIterations=25) |
|
97 | 97 |
} |
... | ... |
@@ -10,7 +10,8 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, |
11 | 11 |
subsetIndices = NULL, subsetDim = 0, BPPARAM = NULL, |
12 | 12 |
geneNames = NULL, sampleNames = NULL, fixedPatterns = NULL, |
13 |
- whichMatrixFixed = "N", outputToFile = NULL, workerID = 1, ...) |
|
13 |
+ whichMatrixFixed = "N", takePumpSamples = FALSE, |
|
14 |
+ outputToFile = NULL, workerID = 1, ...) |
|
14 | 15 |
} |
15 | 16 |
\arguments{ |
16 | 17 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -49,10 +50,15 @@ genes x samples} |
49 | 50 |
|
50 | 51 |
\item{sampleNames}{vector of names of samples in data} |
51 | 52 |
|
52 |
-\item{fixedPatterns}{fix either 'A' or 'P' matrix to these values} |
|
53 |
+\item{fixedPatterns}{fix either 'A' or 'P' matrix to these values, in the |
|
54 |
+context of distributed CoGAPS (GWCoGAPS/scCoGAPS), the first phase is |
|
55 |
+skipped and fixedPatterns is used for all sets - allowing manual pattern |
|
56 |
+matching, as well as fixed runs of standard CoGAPS} |
|
53 | 57 |
|
54 | 58 |
\item{whichMatrixFixed}{either 'A' or 'P', indicating which matrix is fixed} |
55 | 59 |
|
60 |
+\item{takePumpSamples}{whether or not to take PUMP samples} |
|
61 |
+ |
|
56 | 62 |
\item{outputToFile}{name of a file to save the output to, will create 4 files |
57 | 63 |
of the form "filename_nPatterns_[Amean, Asd, Pmean, Psd].extension"} |
58 | 64 |
|
... | ... |
@@ -7,9 +7,10 @@ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 |
- checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
|
11 |
- geneNames = NULL, sampleNames = NULL, matchedPatterns = NULL, |
|
12 |
- outputToFile = NULL, ...) |
|
10 |
+ checkpointInFile = NULL, transposeData = FALSE, |
|
11 |
+ subsetIndices = NULL, subsetDim = 0, BPPARAM = NULL, |
|
12 |
+ geneNames = NULL, sampleNames = NULL, fixedPatterns = NULL, |
|
13 |
+ whichMatrixFixed = "N", outputToFile = NULL, workerID = 1, ...) |
|
13 | 14 |
} |
14 | 15 |
\arguments{ |
15 | 16 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -38,17 +39,28 @@ contained in this file} |
38 | 39 |
for data that is stored as samples x genes since CoGAPS requires data to be |
39 | 40 |
genes x samples} |
40 | 41 |
|
42 |
+\item{subsetIndices}{set of indices to use from the data} |
|
43 |
+ |
|
44 |
+\item{subsetDim}{which dimension (1=rows, 2=cols) to subset} |
|
45 |
+ |
|
41 | 46 |
\item{BPPARAM}{BiocParallel backend} |
42 | 47 |
|
43 | 48 |
\item{geneNames}{vector of names of genes in data} |
44 | 49 |
|
45 | 50 |
\item{sampleNames}{vector of names of samples in data} |
46 | 51 |
|
47 |
-\item{matchedPatterns}{manually matched patterns for distributed CoGAPS} |
|
52 |
+\item{fixedPatterns}{fix either 'A' or 'P' matrix to these values} |
|
53 |
+ |
|
54 |
+\item{whichMatrixFixed}{either 'A' or 'P', indicating which matrix is fixed} |
|
48 | 55 |
|
49 | 56 |
\item{outputToFile}{name of a file to save the output to, will create 4 files |
50 | 57 |
of the form "filename_nPatterns_[Amean, Asd, Pmean, Psd].extension"} |
51 | 58 |
|
59 |
+\item{workerID}{if calling CoGAPS in parallel the worker ID can be specified, |
|
60 |
+only worker 1 prints output and each worker outputs when it finishes, this |
|
61 |
+is not neccesary when using the default parallel methods (i.e. distributed |
|
62 |
+CoGAPS) but only when the user is manually calling CoGAPS in parallel} |
|
63 |
+ |
|
52 | 64 |
\item{...}{allows for overwriting parameters in params} |
53 | 65 |
} |
54 | 66 |
\value{ |
... | ... |
@@ -66,14 +66,14 @@ SingleCellExperiment. The supported file types are csv, tsv, and mtx. |
66 | 66 |
\examples{ |
67 | 67 |
# Running from R object |
68 | 68 |
data(GIST) |
69 |
-resultA <- CoGAPS(GIST.data_frame, nIterations=250) |
|
69 |
+resultA <- CoGAPS(GIST.data_frame, nIterations=100) |
|
70 | 70 |
|
71 | 71 |
# Running from file name |
72 | 72 |
gist_path <- system.file("extdata/GIST.mtx", package="CoGAPS") |
73 |
-resultB <- CoGAPS(gist_path, nIterations=250) |
|
73 |
+resultB <- CoGAPS(gist_path, nIterations=100) |
|
74 | 74 |
|
75 | 75 |
# Setting Parameters |
76 | 76 |
params <- new("CogapsParams") |
77 | 77 |
params <- setParam(params, "nPatterns", 5) |
78 |
-resultC <- CoGAPS(GIST.data_frame, params, nIterations=250) |
|
78 |
+resultC <- CoGAPS(GIST.data_frame, params, nIterations=100) |
|
79 | 79 |
} |
... | ... |
@@ -66,14 +66,14 @@ SingleCellExperiment. The supported file types are csv, tsv, and mtx. |
66 | 66 |
\examples{ |
67 | 67 |
# Running from R object |
68 | 68 |
data(GIST) |
69 |
-resultA <- CoGAPS(GIST.data_frame) |
|
69 |
+resultA <- CoGAPS(GIST.data_frame, nIterations=250) |
|
70 | 70 |
|
71 | 71 |
# Running from file name |
72 | 72 |
gist_path <- system.file("extdata/GIST.mtx", package="CoGAPS") |
73 |
-resultB <- CoGAPS(gist_path) |
|
73 |
+resultB <- CoGAPS(gist_path, nIterations=250) |
|
74 | 74 |
|
75 | 75 |
# Setting Parameters |
76 | 76 |
params <- new("CogapsParams") |
77 | 77 |
params <- setParam(params, "nPatterns", 5) |
78 |
-resultC <- CoGAPS(GIST.data_frame, params) |
|
78 |
+resultC <- CoGAPS(GIST.data_frame, params, nIterations=250) |
|
79 | 79 |
} |
... | ... |
@@ -8,7 +8,8 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 |
- ...) |
|
11 |
+ geneNames = NULL, sampleNames = NULL, matchedPatterns = NULL, |
|
12 |
+ outputToFile = NULL, ...) |
|
12 | 13 |
} |
13 | 14 |
\arguments{ |
14 | 15 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -39,6 +40,15 @@ genes x samples} |
39 | 40 |
|
40 | 41 |
\item{BPPARAM}{BiocParallel backend} |
41 | 42 |
|
43 |
+\item{geneNames}{vector of names of genes in data} |
|
44 |
+ |
|
45 |
+\item{sampleNames}{vector of names of samples in data} |
|
46 |
+ |
|
47 |
+\item{matchedPatterns}{manually matched patterns for distributed CoGAPS} |
|
48 |
+ |
|
49 |
+\item{outputToFile}{name of a file to save the output to, will create 4 files |
|
50 |
+of the form "filename_nPatterns_[Amean, Asd, Pmean, Psd].extension"} |
|
51 |
+ |
|
42 | 52 |
\item{...}{allows for overwriting parameters in params} |
43 | 53 |
} |
44 | 54 |
\value{ |
... | ... |
@@ -8,7 +8,7 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 |
- saveUnmatchedPatterns = FALSE, ...) |
|
11 |
+ ...) |
|
12 | 12 |
} |
13 | 13 |
\arguments{ |
14 | 14 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -39,9 +39,6 @@ genes x samples} |
39 | 39 |
|
40 | 40 |
\item{BPPARAM}{BiocParallel backend} |
41 | 41 |
|
42 |
-\item{saveUnmatchedPatterns}{when running distributed cogaps, save the |
|
43 |
-intermediate result from each subset of the data} |
|
44 |
- |
|
45 | 42 |
\item{...}{allows for overwriting parameters in params} |
46 | 43 |
} |
47 | 44 |
\value{ |
... | ... |
@@ -8,7 +8,7 @@ CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
11 |
- ...) |
|
11 |
+ saveUnmatchedPatterns = FALSE, ...) |
|
12 | 12 |
} |
13 | 13 |
\arguments{ |
14 | 14 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -39,6 +39,9 @@ genes x samples} |
39 | 39 |
|
40 | 40 |
\item{BPPARAM}{BiocParallel backend} |
41 | 41 |
|
42 |
+\item{saveUnmatchedPatterns}{when running distributed cogaps, save the |
|
43 |
+intermediate result from each subset of the data} |
|
44 |
+ |
|
42 | 45 |
\item{...}{allows for overwriting parameters in params} |
43 | 46 |
} |
44 | 47 |
\value{ |
... | ... |
@@ -7,7 +7,8 @@ |
7 | 7 |
CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 |
- checkpointInFile = NULL, transposeData = FALSE, ...) |
|
10 |
+ checkpointInFile = NULL, transposeData = FALSE, BPPARAM = NULL, |
|
11 |
+ ...) |
|
11 | 12 |
} |
12 | 13 |
\arguments{ |
13 | 14 |
\item{data}{File name or R object (see details for supported types)} |
... | ... |
@@ -36,6 +37,8 @@ contained in this file} |
36 | 37 |
for data that is stored as samples x genes since CoGAPS requires data to be |
37 | 38 |
genes x samples} |
38 | 39 |
|
40 |
+\item{BPPARAM}{BiocParallel backend} |
|
41 |
+ |
|
39 | 42 |
\item{...}{allows for overwriting parameters in params} |
40 | 43 |
} |
41 | 44 |
\value{ |
... | ... |
@@ -53,14 +56,14 @@ SingleCellExperiment. The supported file types are csv, tsv, and mtx. |
53 | 56 |
\examples{ |
54 | 57 |
# Running from R object |
55 | 58 |
data(GIST) |
56 |
-resultA <- CoGAPS(GIST.D) |
|
59 |
+resultA <- CoGAPS(GIST.data_frame) |
|
57 | 60 |
|
58 | 61 |
# Running from file name |
59 | 62 |
gist_path <- system.file("extdata/GIST.mtx", package="CoGAPS") |
60 | 63 |
resultB <- CoGAPS(gist_path) |
61 | 64 |
|
62 |
-Setting Parameters |
|
65 |
+# Setting Parameters |
|
63 | 66 |
params <- new("CogapsParams") |
64 | 67 |
params <- setParam(params, "nPatterns", 5) |
65 |
-resultC <- CoGAPS(GIST.D, params) |
|
68 |
+resultC <- CoGAPS(GIST.data_frame, params) |
|
66 | 69 |
} |
... | ... |
@@ -4,7 +4,7 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(data, params = new("CogapsParams"), nThreads = NULL, |
|
7 |
+CoGAPS(data, params = new("CogapsParams"), nThreads = 1, |
|
8 | 8 |
messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
9 | 9 |
checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
10 | 10 |
checkpointInFile = NULL, transposeData = FALSE, ...) |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,66 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/CoGAPS.R |
|
3 |
+\name{CoGAPS} |
|
4 |
+\alias{CoGAPS} |
|
5 |
+\title{CoGAPS Matrix Factorization Algorithm} |
|
6 |
+\usage{ |
|
7 |
+CoGAPS(data, params = new("CogapsParams"), nThreads = NULL, |
|
8 |
+ messages = TRUE, outputFrequency = 500, uncertainty = NULL, |
|
9 |
+ checkpointOutFile = "gaps_checkpoint.out", checkpointInterval = 1000, |
|
10 |
+ checkpointInFile = NULL, transposeData = FALSE, ...) |
|
11 |
+} |
|
12 |
+\arguments{ |
|
13 |
+\item{data}{File name or R object (see details for supported types)} |
|
14 |
+ |
|
15 |
+\item{params}{CogapsParams object} |
|
16 |
+ |
|
17 |
+\item{nThreads}{maximum number of threads to run on} |
|
18 |
+ |
|
19 |
+\item{messages}{T/F for displaying output} |
|
20 |
+ |
|
21 |
+\item{outputFrequency}{number of iterations between each output (set to 0 to |
|
22 |
+disable status updates, other output is controlled by @code messages)} |
|
23 |
+ |
|
24 |
+\item{uncertainty}{uncertainty matrix - either a matrix or a supported |
|
25 |
+file type} |
|
26 |
+ |
|
27 |
+\item{checkpointOutFile}{name of the checkpoint file to create} |
|
28 |
+ |
|
29 |
+\item{checkpointInterval}{number of iterations between each checkpoint (set |
|
30 |
+to 0 to disable checkpoints)} |
|
31 |
+ |
|
32 |
+\item{checkpointInFile}{if this is provided, CoGAPS runs from the checkpoint |
|
33 |
+contained in this file} |
|
34 |
+ |
|
35 |
+\item{transposeData}{T/F for transposing data while reading it in - useful |
|
36 |
+for data that is stored as samples x genes since CoGAPS requires data to be |
|
37 |
+genes x samples} |
|
38 |
+ |
|
39 |
+\item{...}{allows for overwriting parameters in params} |
|
40 |
+} |
|
41 |
+\value{ |
|
42 |
+CogapsResult object |
|
43 |
+} |
|
44 |
+\description{ |
|
45 |
+calls the C++ MCMC code and performs Bayesian |
|
46 |
+matrix factorization returning the two matrices that reconstruct |
|
47 |
+the data matrix |
|
48 |
+} |
|
49 |
+\details{ |
|
50 |
+The supported R types are: matrix, data.frame, SummarizedExperiment, |
|
51 |
+SingleCellExperiment. The supported file types are csv, tsv, and mtx. |
|
52 |
+} |
|
53 |
+\examples{ |
|
54 |
+# Running from R object |
|
55 |
+data(GIST) |
|
56 |
+resultA <- CoGAPS(GIST.D) |
|
57 |
+ |
|
58 |
+# Running from file name |
|
59 |
+gist_path <- system.file("extdata/GIST.mtx", package="CoGAPS") |
|
60 |
+resultB <- CoGAPS(gist_path) |
|
61 |
+ |
|
62 |
+Setting Parameters |
|
63 |
+params <- new("CogapsParams") |
|
64 |
+params <- setParam(params, "nPatterns", 5) |
|
65 |
+resultC <- CoGAPS(GIST.D, params) |
|
66 |
+} |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,70 +0,0 @@ |
1 |
-% Generated by roxygen2: do not edit by hand |
|
2 |
-% Please edit documentation in R/CoGAPS.R |
|
3 |
-\name{CoGAPS} |
|
4 |
-\alias{CoGAPS} |
|
5 |
-\title{CoGAPS Matrix Factorization Algorithm} |
|
6 |
-\usage{ |
|
7 |
-CoGAPS(D, S, nFactor = 7, nIter = 1000, nOutputs = 250, alphaA = 0.01, |
|
8 |
- alphaP = 0.01, maxGibbmassA = 100, maxGibbmassP = 100, seed = NA, |
|
9 |
- messages = TRUE, singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
10 |
- fixedPatterns = matrix(0), checkpointInterval = 0, |
|
11 |
- checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
|
12 |
-} |
|
13 |
-\arguments{ |
|
14 |
-\item{D}{data matrix} |
|
15 |
- |
|
16 |
-\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
17 |
- |
|
18 |
-\item{nFactor}{number of patterns (basis vectors, metagenes), which must be |
|
19 |
-greater than or equal to the number of rows of FP} |
|
20 |
- |
|
21 |
-\item{nOutputs}{how often to print status into R by iterations} |
|
22 |
- |
|
23 |
-\item{alphaA}{sparsity parameter for A domain} |
|
24 |
- |
|
25 |
-\item{alphaP}{sparsity parameter for P domain} |
|
26 |
- |
|
27 |
-\item{maxGibbmassA}{limit truncated normal to max size} |
|
28 |
- |
|
29 |
-\item{maxGibbmassP}{limit truncated normal to max size} |
|
30 |
- |
|
31 |
-\item{seed}{a positive seed is used as-is, while any negative seed tells |
|
32 |
-the algorithm to pick a seed based on the current time} |
|
33 |
- |
|
34 |
-\item{messages}{display progress messages} |
|
35 |
- |
|
36 |
-\item{singleCellRNASeq}{indicates if the data is single cell RNA-seq data} |
|
37 |
- |
|
38 |
-\item{whichMatrixFixed}{character to indicate whether A or P matric contains |
|
39 |
-the fixed patterns} |
|
40 |
- |
|
41 |
-\item{fixedPatterns}{matrix of fixed values in either A or P matrix} |
|
42 |
- |
|
43 |
-\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
|
44 |
- |
|
45 |
-\item{checkpointFile}{name of the checkpoint file} |
|
46 |
- |
|
47 |
-\item{nCores}{number of cpu cores to run in parallel over} |
|
48 |
- |
|
49 |
-\item{...}{keeps backwards compatibility with arguments from older versions} |
|
50 |
- |
|
51 |
-\item{nEquil}{number of iterations for burn-in} |
|
52 |
- |
|
53 |
-\item{nSample}{number of iterations for sampling} |
|
54 |
-} |
|
55 |
-\value{ |
|
56 |
-list with A and P matrix estimates |
|
57 |
-} |
|
58 |
-\description{ |
|
59 |
-CoGAPS Matrix Factorization Algorithm |
|
60 |
-} |
|
61 |
-\details{ |
|
62 |
-calls the C++ MCMC code and performs Bayesian |
|
63 |
-matrix factorization returning the two matrices that reconstruct |
|
64 |
-the data matrix |
|
65 |
-} |
|
66 |
-\examples{ |
|
67 |
-data(SimpSim) |
|
68 |
-result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250) |
|
69 |
-} |
|
70 |
- |
... | ... |
@@ -4,10 +4,9 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
|
8 |
- nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, |
|
9 |
- maxGibbmassP = 100, seed = NA, messages = TRUE, |
|
10 |
- singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
7 |
+CoGAPS(D, S, nFactor = 7, nIter = 1000, nOutputs = 250, alphaA = 0.01, |
|
8 |
+ alphaP = 0.01, maxGibbmassA = 100, maxGibbmassP = 100, seed = NA, |
|
9 |
+ messages = TRUE, singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
11 | 10 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 | 11 |
checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
13 | 12 |
} |
... | ... |
@@ -19,10 +18,6 @@ CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
19 | 18 |
\item{nFactor}{number of patterns (basis vectors, metagenes), which must be |
20 | 19 |
greater than or equal to the number of rows of FP} |
21 | 20 |
|
22 |
-\item{nEquil}{number of iterations for burn-in} |
|
23 |
- |
|
24 |
-\item{nSample}{number of iterations for sampling} |
|
25 |
- |
|
26 | 21 |
\item{nOutputs}{how often to print status into R by iterations} |
27 | 22 |
|
28 | 23 |
\item{alphaA}{sparsity parameter for A domain} |
... | ... |
@@ -52,6 +47,10 @@ the fixed patterns} |
52 | 47 |
\item{nCores}{number of cpu cores to run in parallel over} |
53 | 48 |
|
54 | 49 |
\item{...}{keeps backwards compatibility with arguments from older versions} |
50 |
+ |
|
51 |
+\item{nEquil}{number of iterations for burn-in} |
|
52 |
+ |
|
53 |
+\item{nSample}{number of iterations for sampling} |
|
55 | 54 |
} |
56 | 55 |
\value{ |
57 | 56 |
list with A and P matrix estimates |
... | ... |
@@ -5,19 +5,11 @@ |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 | 7 |
CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
8 |
-<<<<<<< HEAD |
|
9 | 8 |
nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, |
10 | 9 |
maxGibbmassP = 100, seed = NA, messages = TRUE, |
11 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
12 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
13 | 12 |
checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
14 |
-======= |
|
15 |
- alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, maxGibbmassP = 100, |
|
16 |
- seed = -1, messages = TRUE, singleCellRNASeq = FALSE, |
|
17 |
- whichMatrixFixed = "N", fixedPatterns = matrix(0), |
|
18 |
- checkpointInterval = 0, checkpointFile = "gaps_checkpoint.out", |
|
19 |
- nCores = 1, ...) |
|
20 |
->>>>>>> develop |
|
21 | 13 |
} |
22 | 14 |
\arguments{ |
23 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -6,7 +6,7 @@ |
6 | 6 |
\usage{ |
7 | 7 |
CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
8 | 8 |
nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, |
9 |
- maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
9 |
+ maxGibbmassP = 100, seed = NA, messages = TRUE, |
|
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 | 12 |
checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
... | ... |
@@ -4,9 +4,9 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
|
8 |
- nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
|
9 |
- maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
7 |
+CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
|
8 |
+ nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, |
|
9 |
+ maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 | 12 |
checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
... | ... |
@@ -4,12 +4,12 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
|
8 |
- nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
|
9 |
- maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
10 |
- singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
11 |
- fixedPatterns = matrix(0), checkpointInterval = 0, |
|
12 |
- checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
|
7 |
+CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000, |
|
8 |
+ alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, maxGibbmassP = 100, |
|
9 |
+ seed = -1, messages = TRUE, singleCellRNASeq = FALSE, |
|
10 |
+ whichMatrixFixed = "N", fixedPatterns = matrix(0), |
|
11 |
+ checkpointInterval = 0, checkpointFile = "gaps_checkpoint.out", |
|
12 |
+ nCores = 1, ...) |
|
13 | 13 |
} |
14 | 14 |
\arguments{ |
15 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -25,8 +25,6 @@ greater than or equal to the number of rows of FP} |
25 | 25 |
|
26 | 26 |
\item{nOutputs}{how often to print status into R by iterations} |
27 | 27 |
|
28 |
-\item{nSnapshots}{the number of individual samples to capture} |
|
29 |
- |
|
30 | 28 |
\item{alphaA}{sparsity parameter for A domain} |
31 | 29 |
|
32 | 30 |
\item{alphaP}{sparsity parameter for P domain} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,71 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/CoGAPS.R |
|
3 |
+\name{CoGAPS} |
|
4 |
+\alias{CoGAPS} |
|
5 |
+\title{CoGAPS Matrix Factorization Algorithm} |
|
6 |
+\usage{ |
|
7 |
+CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
|
8 |
+ nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
|
9 |
+ maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
10 |
+ singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
11 |
+ fixedPatterns = matrix(0), checkpointInterval = 0, |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
|
13 |
+} |
|
14 |
+\arguments{ |
|
15 |
+\item{D}{data matrix} |
|
16 |
+ |
|
17 |
+\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
18 |
+ |
|
19 |
+\item{nFactor}{number of patterns (basis vectors, metagenes), which must be |
|
20 |
+greater than or equal to the number of rows of FP} |
|
21 |
+ |
|
22 |
+\item{nEquil}{number of iterations for burn-in} |
|
23 |
+ |
|
24 |
+\item{nSample}{number of iterations for sampling} |
|
25 |
+ |
|
26 |
+\item{nOutputs}{how often to print status into R by iterations} |
|
27 |
+ |
|
28 |
+\item{nSnapshots}{the number of individual samples to capture} |
|
29 |
+ |
|
30 |
+\item{alphaA}{sparsity parameter for A domain} |
|
31 |
+ |
|
32 |
+\item{alphaP}{sparsity parameter for P domain} |
|
33 |
+ |
|
34 |
+\item{maxGibbmassA}{limit truncated normal to max size} |
|
35 |
+ |
|
36 |
+\item{maxGibbmassP}{limit truncated normal to max size} |
|
37 |
+ |
|
38 |
+\item{seed}{a positive seed is used as-is, while any negative seed tells |
|
39 |
+the algorithm to pick a seed based on the current time} |
|
40 |
+ |
|
41 |
+\item{messages}{display progress messages} |
|
42 |
+ |
|
43 |
+\item{singleCellRNASeq}{indicates if the data is single cell RNA-seq data} |
|
44 |
+ |
|
45 |
+\item{whichMatrixFixed}{character to indicate whether A or P matric contains |
|
46 |
+the fixed patterns} |
|
47 |
+ |
|
48 |
+\item{fixedPatterns}{matrix of fixed values in either A or P matrix} |
|
49 |
+ |
|
50 |
+\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
|
51 |
+ |
|
52 |
+\item{checkpointFile}{name of the checkpoint file} |
|
53 |
+ |
|
54 |
+\item{...}{keeps backwards compatibility with arguments from older versions} |
|
55 |
+} |
|
56 |
+\value{ |
|
57 |
+list with A and P matrix estimates |
|
58 |
+} |
|
59 |
+\description{ |
|
60 |
+CoGAPS Matrix Factorization Algorithm |
|
61 |
+} |
|
62 |
+\details{ |
|
63 |
+calls the C++ MCMC code and performs Bayesian |
|
64 |
+matrix factorization returning the two matrices that reconstruct |
|
65 |
+the data matrix |
|
66 |
+} |
|
67 |
+\examples{ |
|
68 |
+data(SimpSim) |
|
69 |
+result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250) |
|
70 |
+} |
|
71 |
+ |
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,71 +0,0 @@ |
1 |
-% Generated by roxygen2: do not edit by hand |
|
2 |
-% Please edit documentation in R/CoGAPS.R |
|
3 |
-\name{CoGAPS} |
|
4 |
-\alias{CoGAPS} |
|
5 |
-\title{CoGAPS Matrix Factorization Algorithm} |
|
6 |
-\usage{ |
|
7 |
-CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
|
8 |
- nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
|
9 |
- maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
10 |
- singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
11 |
- fixedPatterns = matrix(0), checkpointInterval = 0, |
|
12 |
- checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
|
13 |
-} |
|
14 |
-\arguments{ |
|
15 |
-\item{D}{data matrix} |
|
16 |
- |
|
17 |
-\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
18 |
- |
|
19 |
-\item{nFactor}{number of patterns (basis vectors, metagenes), which must be |
|
20 |
-greater than or equal to the number of rows of FP} |
|
21 |
- |
|
22 |
-\item{nEquil}{number of iterations for burn-in} |
|
23 |
- |
|
24 |
-\item{nSample}{number of iterations for sampling} |
|
25 |
- |
|
26 |
-\item{nOutputs}{how often to print status into R by iterations} |
|
27 |
- |
|
28 |
-\item{nSnapshots}{the number of individual samples to capture} |
|
29 |
- |
|
30 |
-\item{alphaA}{sparsity parameter for A domain} |
|
31 |
- |
|
32 |
-\item{alphaP}{sparsity parameter for P domain} |
|
33 |
- |
|
34 |
-\item{maxGibbmassA}{limit truncated normal to max size} |
|
35 |
- |
|
36 |
-\item{maxGibbmassP}{limit truncated normal to max size} |
|
37 |
- |
|
38 |
-\item{seed}{a positive seed is used as-is, while any negative seed tells |
|
39 |
-the algorithm to pick a seed based on the current time} |
|
40 |
- |
|
41 |
-\item{messages}{display progress messages} |
|
42 |
- |
|
43 |
-\item{singleCellRNASeq}{indicates if the data is single cell RNA-seq data} |
|
44 |
- |
|
45 |
-\item{whichMatrixFixed}{character to indicate whether A or P matric contains |
|
46 |
-the fixed patterns} |
|
47 |
- |
|
48 |
-\item{fixedPatterns}{matrix of fixed values in either A or P matrix} |
|
49 |
- |
|
50 |
-\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
|
51 |
- |
|
52 |
-\item{checkpointFile}{name of the checkpoint file} |
|
53 |
- |
|
54 |
-\item{...}{keeps backwards compatibility with arguments from older versions} |
|
55 |
-} |
|
56 |
-\value{ |
|
57 |
-list with A and P matrix estimates |
|
58 |
-} |
|
59 |
-\description{ |
|
60 |
-CoGAPS Matrix Factorization Algorithm |
|
61 |
-} |
|
62 |
-\details{ |
|
63 |
-calls the C++ MCMC code and performs Bayesian |
|
64 |
-matrix factorization returning the two matrices that reconstruct |
|
65 |
-the data matrix |
|
66 |
-} |
|
67 |
-\examples{ |
|
68 |
-data(SimpSim) |
|
69 |
-result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250) |
|
70 |
-} |
|
71 |
- |
... | ... |
@@ -9,7 +9,7 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
9 | 9 |
maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 |
- checkpointFile = "gaps_checkpoint.out", ...) |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", nCores = 1, ...) |
|
13 | 13 |
} |
14 | 14 |
\arguments{ |
15 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -9,8 +9,7 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
9 | 9 |
maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 |
- checkpointFile = "gaps_checkpoint.out", pumpThreshold = "unique", |
|
13 |
- nPumpSamples = 0, ...) |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", ...) |
|
14 | 13 |
} |
15 | 14 |
\arguments{ |
16 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -52,10 +51,6 @@ the fixed patterns} |
52 | 51 |
|
53 | 52 |
\item{checkpointFile}{name of the checkpoint file} |
54 | 53 |
|
55 |
-\item{pumpThreshold}{type of threshold for pump statistic} |
|
56 |
- |
|
57 |
-\item{nPumpSamples}{number of samples used in pump statistic} |
|
58 |
- |
|
59 | 54 |
\item{...}{keeps backwards compatibility with arguments from older versions} |
60 | 55 |
} |
61 | 56 |
\value{ |
... | ... |
@@ -73,3 +68,4 @@ the data matrix |
73 | 68 |
data(SimpSim) |
74 | 69 |
result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250) |
75 | 70 |
} |
71 |
+ |
... | ... |
@@ -10,7 +10,7 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 | 12 |
checkpointFile = "gaps_checkpoint.out", pumpThreshold = "unique", |
13 |
- nPumpSamples = 100, ...) |
|
13 |
+ nPumpSamples = 0, ...) |
|
14 | 14 |
} |
15 | 15 |
\arguments{ |
16 | 16 |
\item{D}{data matrix} |
... | ... |
@@ -52,6 +52,10 @@ the fixed patterns} |
52 | 52 |
|
53 | 53 |
\item{checkpointFile}{name of the checkpoint file} |
54 | 54 |
|
55 |
+\item{pumpThreshold}{type of threshold for pump statistic} |
|
56 |
+ |
|
57 |
+\item{nPumpSamples}{number of samples used in pump statistic} |
|
58 |
+ |
|
55 | 59 |
\item{...}{keeps backwards compatibility with arguments from older versions} |
56 | 60 |
} |
57 | 61 |
\value{ |
... | ... |
@@ -9,7 +9,8 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
9 | 9 |
maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 |
- checkpointFile = "gaps_checkpoint.out", pumpThreshold = "unique", ...) |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", pumpThreshold = "unique", |
|
13 |
+ nPumpSamples = 100, ...) |
|
13 | 14 |
} |
14 | 15 |
\arguments{ |
15 | 16 |
\item{D}{data matrix} |
... | ... |
@@ -9,7 +9,7 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
9 | 9 |
maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 | 11 |
fixedPatterns = matrix(0), checkpointInterval = 0, |
12 |
- checkpointFile = "gaps_checkpoint.out", ...) |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", pumpThreshold = "unique", ...) |
|
13 | 13 |
} |
14 | 14 |
\arguments{ |
15 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -8,7 +8,8 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
8 | 8 |
nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
9 | 9 |
maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
10 | 10 |
singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
11 |
- fixedPatterns = matrix(0), checkpointInterval = 0, ...) |
|
11 |
+ fixedPatterns = matrix(0), checkpointInterval = 0, |
|
12 |
+ checkpointFile = "gaps_checkpoint.out", ...) |
|
12 | 13 |
} |
13 | 14 |
\arguments{ |
14 | 15 |
\item{D}{data matrix} |
... | ... |
@@ -48,6 +49,8 @@ the fixed patterns} |
48 | 49 |
|
49 | 50 |
\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
50 | 51 |
|
52 |
+\item{checkpointFile}{name of the checkpoint file} |
|
53 |
+ |
|
51 | 54 |
\item{...}{keeps backwards compatibility with arguments from older versions} |
52 | 55 |
} |
53 | 56 |
\value{ |
... | ... |
@@ -58,7 +58,11 @@ CoGAPS Matrix Factorization Algorithm |
58 | 58 |
} |
59 | 59 |
\details{ |
60 | 60 |
calls the C++ MCMC code and performs Bayesian |
61 |
- matrix factorization returning the two matrices that reconstruct |
|
62 |
- the data matrix |
|
61 |
+matrix factorization returning the two matrices that reconstruct |
|
62 |
+the data matrix |
|
63 |
+} |
|
64 |
+\examples{ |
|
65 |
+data(SimpSim) |
|
66 |
+result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250) |
|
63 | 67 |
} |
64 | 68 |
|
... | ... |
@@ -47,6 +47,8 @@ the fixed patterns} |
47 | 47 |
\item{fixedPatterns}{matrix of fixed values in either A or P matrix} |
48 | 48 |
|
49 | 49 |
\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
50 |
+ |
|
51 |
+\item{...}{keeps backwards compatibility with arguments from older versions} |
|
50 | 52 |
} |
51 | 53 |
\value{ |
52 | 54 |
list with A and P matrix estimates |
... | ... |
@@ -14,6 +14,39 @@ CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
14 | 14 |
\item{D}{data matrix} |
15 | 15 |
|
16 | 16 |
\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
17 |
+ |
|
18 |
+\item{nFactor}{number of patterns (basis vectors, metagenes), which must be |
|
19 |
+greater than or equal to the number of rows of FP} |
|
20 |
+ |
|
21 |
+\item{nEquil}{number of iterations for burn-in} |
|
22 |
+ |
|
23 |
+\item{nSample}{number of iterations for sampling} |
|
24 |
+ |
|
25 |
+\item{nOutputs}{how often to print status into R by iterations} |
|
26 |
+ |
|
27 |
+\item{nSnapshots}{the number of individual samples to capture} |
|
28 |
+ |
|
29 |
+\item{alphaA}{sparsity parameter for A domain} |
|
30 |
+ |
|
31 |
+\item{alphaP}{sparsity parameter for P domain} |
|
32 |
+ |
|
33 |
+\item{maxGibbmassA}{limit truncated normal to max size} |
|
34 |
+ |
|
35 |
+\item{maxGibbmassP}{limit truncated normal to max size} |
|
36 |
+ |
|
37 |
+\item{seed}{a positive seed is used as-is, while any negative seed tells |
|
38 |
+the algorithm to pick a seed based on the current time} |
|
39 |
+ |
|
40 |
+\item{messages}{display progress messages} |
|
41 |
+ |
|
42 |
+\item{singleCellRNASeq}{indicates if the data is single cell RNA-seq data} |
|
43 |
+ |
|
44 |
+\item{whichMatrixFixed}{character to indicate whether A or P matric contains |
|
45 |
+the fixed patterns} |
|
46 |
+ |
|
47 |
+\item{fixedPatterns}{matrix of fixed values in either A or P matrix} |
|
48 |
+ |
|
49 |
+\item{checkpointInterval}{time (in seconds) between creating a checkpoint} |
|
17 | 50 |
} |
18 | 51 |
\value{ |
19 | 52 |
list with A and P matrix estimates |
... | ... |
@@ -23,7 +56,7 @@ CoGAPS Matrix Factorization Algorithm |
23 | 56 |
} |
24 | 57 |
\details{ |
25 | 58 |
calls the C++ MCMC code and performs Bayesian |
26 |
-matrix factorization returning the two matrices that reconstruct |
|
27 |
-the data matrix |
|
59 |
+ matrix factorization returning the two matrices that reconstruct |
|
60 |
+ the data matrix |
|
28 | 61 |
} |
29 | 62 |
|
... | ... |
@@ -4,7 +4,11 @@ |
4 | 4 |
\alias{CoGAPS} |
5 | 5 |
\title{CoGAPS Matrix Factorization Algorithm} |
6 | 6 |
\usage{ |
7 |
-CoGAPS(D, S, ...) |
|
7 |
+CoGAPS(D, S, nFactor = 7, nEquil = 1000, nSample = 1000, |
|
8 |
+ nOutputs = 1000, nSnapshots = 0, alphaA = 0.01, alphaP = 0.01, |
|
9 |
+ maxGibbmassA = 100, maxGibbmassP = 100, seed = -1, messages = TRUE, |
|
10 |
+ singleCellRNASeq = FALSE, whichMatrixFixed = "N", |
|
11 |
+ fixedPatterns = matrix(0), checkpointInterval = 0, ...) |
|
8 | 12 |
} |
9 | 13 |
\arguments{ |
10 | 14 |
\item{D}{data matrix} |
... | ... |
@@ -2,75 +2,24 @@ |
2 | 2 |
% Please edit documentation in R/CoGAPS.R |
3 | 3 |
\name{CoGAPS} |
4 | 4 |
\alias{CoGAPS} |
5 |
-\title{\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
6 |
-matrix factorization returning the two matrices that reconstruct |
|
7 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
8 |
-activity with nPerm set to 500} |
|
5 |
+\title{CoGAPS Matrix Factorization Algorithm} |
|
9 | 6 |
\usage{ |
10 |
-CoGAPS(data, unc, ABins = data.frame(), PBins = data.frame(), GStoGenes, |
|
11 |
- nFactor = 7, simulation_id = "simulation", nEquil = 1000, |
|
12 |
- nSample = 1000, nOutR = 1000, output_atomic = FALSE, |
|
13 |
- fixedBinProbs = FALSE, fixedDomain = "N", sampleSnapshots = TRUE, |
|
14 |
- numSnapshots = 100, plot = TRUE, nPerm = 500, alphaA = 0.01, |
|
15 |
- nMaxA = 1e+05, max_gibbmass_paraA = 100, alphaP = 0.01, nMaxP = 1e+05, |
|
16 |
- max_gibbmass_paraP = 100) |
|
7 |
+CoGAPS(D, S, ...) |
|
17 | 8 |
} |
18 | 9 |
\arguments{ |
19 |
-\item{data}{data matrix} |
|
20 |
- |
|
21 |
-\item{unc}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
22 |
- |
|
23 |
-\item{ABins}{a matrix of same size as A which gives relative |
|
24 |
-probability of that element being non-zero} |
|
25 |
- |
|
26 |
-\item{PBins}{a matrix of same size as P which gives relative |
|
27 |
-probability of that element being non-zero} |
|
28 |
- |
|
29 |
-\item{GStoGenes}{data.frame or list with gene sets} |
|
30 |
- |
|
31 |
-\item{nFactor}{number of patterns (basis vectors, metagenes)} |
|
32 |
- |
|
33 |
-\item{simulation_id}{name to attach to atoms files if created} |
|
34 |
- |
|
35 |
-\item{nEquil}{number of iterations for burn-in} |
|
36 |
- |
|
37 |
-\item{nSample}{number of iterations for sampling} |
|
38 |
- |
|
39 |
-\item{nOutR}{how often to print status into R by iterations} |
|
40 |
- |
|
41 |
-\item{output_atomic}{whether to write atom files (large)} |
|
42 |
- |
|
43 |
-\item{fixedBinProbs}{Boolean for using relative probabilities |
|
44 |
-given in Abins and Pbins} |
|
10 |
+\item{D}{data matrix} |
|
45 | 11 |
|
46 |
-\item{fixedDomain}{character to indicate whether A or P is |
|
47 |
-domain for relative probabilities} |
|
48 |
- |
|
49 |
-\item{sampleSnapshots}{Boolean to indicate whether to capture |
|
50 |
-individual samples from Markov chain during sampling} |
|
51 |
- |
|
52 |
-\item{numSnapshots}{the number of individual samples to capture} |
|
53 |
- |
|
54 |
-\item{plot}{Boolean to indicate whether to produce output graphics} |
|
55 |
- |
|
56 |
-\item{nPerm}{number of permutations in gene set test} |
|
57 |
- |
|
58 |
-\item{alphaA}{sparsity parameter for A domain} |
|
59 |
- |
|
60 |
-\item{nMaxA}{PRESENTLY UNUSED, future = limit number of atoms} |
|
61 |
- |
|
62 |
-\item{max_gibbmass_paraA}{limit truncated normal to max size} |
|
63 |
- |
|
64 |
-\item{alphaP}{sparsity parameter for P domain} |
|
65 |
- |
|
66 |
-\item{nMaxP}{PRESENTLY UNUSED, future = limit number of atoms} |
|
67 |
- |
|
68 |
-\item{max_gibbmass_paraP}{limit truncated normal to max size} |
|
12 |
+\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
13 |
+} |
|
14 |
+\value{ |
|
15 |
+list with A and P matrix estimates |
|
69 | 16 |
} |
70 | 17 |
\description{ |
71 |
-\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
18 |
+CoGAPS Matrix Factorization Algorithm |
|
19 |
+} |
|
20 |
+\details{ |
|
21 |
+calls the C++ MCMC code and performs Bayesian |
|
72 | 22 |
matrix factorization returning the two matrices that reconstruct |
73 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
74 |
-activity with nPerm set to 500 |
|
23 |
+the data matrix |
|
75 | 24 |
} |
76 | 25 |
|
Now package.R populates CoGAPS-package.Rd, instead of CoGAPS.Rd, which
was causing an error due to the same alias (CoGAPS-package) being in
two different Rd files. The old CoGAPS.Rd file (mostly generated by
Rcpp?) is overwritten by Roygen but the resulting file is mostly
unchanged (a few formatting differences).
... | ... |
@@ -1,9 +1,7 @@ |
1 | 1 |
% Generated by roxygen2: do not edit by hand |
2 |
-% Please edit documentation in R/CoGAPS.R, R/package.R |
|
3 |
-\docType{package} |
|
2 |
+% Please edit documentation in R/CoGAPS.R |
|
4 | 3 |
\name{CoGAPS} |
5 | 4 |
\alias{CoGAPS} |
6 |
-\alias{CoGAPS-package} |
|
7 | 5 |
\title{\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
8 | 6 |
matrix factorization returning the two matrices that reconstruct |
9 | 7 |
the data matrix and then calls calcCoGAPSStat to estimate gene set |
... | ... |
@@ -74,7 +72,5 @@ individual samples from Markov chain during sampling} |
74 | 72 |
matrix factorization returning the two matrices that reconstruct |
75 | 73 |
the data matrix and then calls calcCoGAPSStat to estimate gene set |
76 | 74 |
activity with nPerm set to 500 |
77 |
- |
|
78 |
-Coordinated Gene Activity in Pattern Sets |
|
79 | 75 |
} |
80 | 76 |
|
... | ... |
@@ -1,119 +1,80 @@ |
1 |
-% Generated by roxygen2 (4.1.1): do not edit by hand |
|
2 |
-% Please edit documentation in R/CoGAPS.R |
|
3 |
-\name{CoGAPS} |
|
4 |
-\alias{CoGAPS} |
|
5 |
-\title{\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
6 |
-matrix factorization returning the two matrices that reconstruct |
|
7 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
8 |
-activity with nPerm set to 500} |
|
9 |
-\usage{ |
|
10 |
-CoGAPS(data, unc, ABins = data.frame(), PBins = data.frame(), GStoGenes, |
|
11 |
- nFactor = 7, simulation_id = "simulation", nEquil = 1000, |
|
12 |
- nSample = 1000, nOutR = 1000, output_atomic = FALSE, |
|
13 |
- fixedBinProbs = FALSE, fixedDomain = "N", sampleSnapshots = TRUE, |
|
14 |
- numSnapshots = 100, plot = TRUE, nPerm = 500, alphaA = 0.01, |
|
15 |
- nMaxA = 1e+05, max_gibbmass_paraA = 100, alphaP = 0.01, nMaxP = 1e+05, |
|
16 |
- max_gibbmass_paraP = 100) |
|
17 |
-} |
|
18 |
-\arguments{ |
|
19 |
-\item{data}{data matrix} |
|
20 |
- |
|
21 |
-\item{unc}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
22 |
- |
|
23 |
-\item{ABins}{a matrix of same size as A which gives relative |
|
24 |
-probability of that element being non-zero} |
|
25 |
- |
|
26 |
-\item{PBins}{a matrix of same size as P which gives relative |
|
27 |
-probability of that element being non-zero} |
|
28 |
- |
|
29 |
-\item{GStoGenes}{data.frame or list with gene sets} |
|
30 |
- |
|
31 |
-\item{nFactor}{number of patterns (basis vectors, metagenes)} |
|
32 |
- |
|
33 |
-\item{simulation_id}{name to attach to atoms files if created} |
|
34 |
- |
|
35 |
-\item{nEquil}{number of iterations for burn-in} |
|
36 |
- |
|
37 |
-\item{nSample}{number of iterations for sampling} |
|
38 |
- |
|
39 |
-\item{nOutR}{how often to print status into R by iterations} |
|
40 |
- |
|
41 |
-\item{output_atomic}{whether to write atom files (large)} |
|
42 |
- |
|
43 |
-\item{fixedBinProbs}{Boolean for using relative probabilities |
|
44 |
-given in Abins and Pbins} |
|
45 |
- |
|
46 |
-\item{fixedDomain}{character to indicate whether A or P is |
|
47 |
-domain for relative probabilities} |
|
48 |
- |
|
49 |
-\item{sampleSnapshots}{Boolean to indicate whether to capture |
|
50 |
-individual samples from Markov chain during sampling} |
|
51 |
- |
|
52 |
-\item{numSnapshots}{the number of individual samples to capture} |
|
53 |
- |
|
54 |
-\item{plot}{Boolean to indicate whether to produce output graphics} |
|
55 |
- |
|
56 |
-\item{nPerm}{number of permutations in gene set test} |
|
57 |
- |
|
58 |
-\item{alphaA}{sparsity parameter for A domain} |
|
59 |
- |
|
60 |
-\item{nMaxA}{PRESENTLY UNUSED, future = limit number of atoms} |
|
61 |
- |
|
62 |
-\item{max_gibbmass_paraA}{limit truncated normal to max size} |
|
63 |
- |
|
64 |
-\item{alphaP}{sparsity parameter for P domain} |
|
65 |
- |
|
66 |
-\item{nMaxP}{PRESENTLY UNUSED, future = limit number of atoms} |
|
67 |
- |
|
68 |
-\item{max_gibbmass_paraP}{limit truncated normal to max size} |
|
69 |
-} |
|
70 |
-\description{ |
|
71 |
-\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
72 |
-matrix factorization returning the two matrices that reconstruct |
|
73 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
74 |
-activity with nPerm set to 500 |
|
75 |
-} |
|
76 |
- |
|
77 |
- |
|
78 |
-\details{ |
|
79 |
- CoGAPS first decomposes the data matrix using GAPS, \eqn{{\bf{D}}}, into a basis of underlying patterns and then determines the gene set activity in each of these patterns. |
|
80 |
- |
|
81 |
- The GAPS decomposition is achieved by finding amplitude and pattern matrices (\eqn{{\bf{A}}} and \eqn{{\bf{P}}}, respectively) for which \deqn{{\bf{D}} = {\bf{A}}{\bf{P}} + \Sigma,} where \eqn{\Sigma} is the matrix of uncertainties given by unc. The matrices \eqn{\bf{A}} and \eqn{\bf{P}} are assumed to have the atomic prior described in Sibisi and Skilling (1997) and are found with MCMC sampling. |
|
82 |
- |
|
83 |
-Then, the patterns identified in the columns of \eqn{\bf{P}} are linked to activity in each of the gene sets specified in GStoGenes using a novel z-score based statistic developed in Ochs et al. (2009). Specifically, the z-score for pattern \eqn{p} and gene set \eqn{G_{i}} containing $G$ total genes is given by \deqn{Z_{i,p} = \frac{1}{G} \sum_{g in \mathcal{G_{i}}} {\frac{{\bf{A}_{gp}}}{Asd_{gp}}},} |
|
84 |
-where \eqn{g} indexes the genes in the set and \eqn{Asd_{gp}} is the standard deviation of \eqn{{\bf{A}}_{gp}} obtained from MCMC sampling. CoGAPS then uses the specified \code{nPerm} random sample tests to compute a consistent p value estimate from that z score. Note that the data from Ochs et al. (2009) are provided with this package in GIST_TS_20084.RData and TFGSList.RData are also provided with this package for further validation.} |
|
85 |
- |
|
86 |
-\value{ |
|
87 |
- A list containing: |
|
88 |
- \item{meanChi2}{Value of \eqn{chi^2} for Amean and Pmean.} |
|
89 |
- \item{D}{Data matrix \eqn{{\bf{D}}} input to factorization.} |
|
90 |
- \item{Sigma}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
91 |
- \item{Amean}{Sampled mean value of the amplitude matrix \eqn{{\bf{A}}}.} |
|
92 |
- \item{Asd}{Sampled standard deviation of the amplitude matrix \eqn{{\bf{A}}}.} |
|
93 |
- \item{Pmean}{Sampled mean value of the amplitude matrix \eqn{{\bf{P}}}.} |
|
94 |
- \item{Psd}{Sampled standard deviation of the amplitude matrix \eqn{{\bf{P}}}.} |
|
95 |
- \item{GSUpreg}{p-values for upregulation of each gene set in each pattern.} |
|
96 |
- \item{GSDownreg}{p-values for downregulation of each gene set in each pattern.} |
|
97 |
- \item{GSActEst}{p-values for activity of each gene set in each pattern.} |
|
98 |
-} |
|
99 |
- |
|
100 |
-\examples{ |
|
101 |
-\dontrun{ |
|
102 |
-## Load data |
|
103 |
-nIter <- 5000 |
|
104 |
- |
|
105 |
-## Run GAPS matrix decomposition with gene set statistic |
|
106 |
-results <- CoGAPS(data=SimpSim.D, unc=SimpSim.S, |
|
107 |
- GStoGenes=GSets, |
|
108 |
- nFactor=3, |
|
109 |
- nEquil=nIter, nSample=nIter, |
|
110 |
- plot=FALSE) |
|
111 |
- |
|
112 |
- |
|
113 |
-## Plot the results |
|
114 |
-plotGAPS(results$Amean, results$Pmean, 'GSFigs') |
|
115 |
-} |
|
116 |
-} |
|
117 |
- |
|
118 |
-\seealso{\code{\link{gapsRun}},\code{\link{calcCoGAPSStat}}} |
|
119 |
-\keyword{misc} |
|
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/CoGAPS.R, R/package.R |
|
3 |
+\docType{package} |
|
4 |
+\name{CoGAPS} |
|
5 |
+\alias{CoGAPS} |
|
6 |
+\alias{CoGAPS-package} |
|
7 |
+\title{\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
8 |
+matrix factorization returning the two matrices that reconstruct |
|
9 |
+the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
10 |
+activity with nPerm set to 500} |
|
11 |
+\usage{ |
|
12 |
+CoGAPS(data, unc, ABins = data.frame(), PBins = data.frame(), GStoGenes, |
|
13 |
+ nFactor = 7, simulation_id = "simulation", nEquil = 1000, |
|
14 |
+ nSample = 1000, nOutR = 1000, output_atomic = FALSE, |
|
15 |
+ fixedBinProbs = FALSE, fixedDomain = "N", sampleSnapshots = TRUE, |
|
16 |
+ numSnapshots = 100, plot = TRUE, nPerm = 500, alphaA = 0.01, |
|
17 |
+ nMaxA = 1e+05, max_gibbmass_paraA = 100, alphaP = 0.01, nMaxP = 1e+05, |
|
18 |
+ max_gibbmass_paraP = 100) |
|
19 |
+} |
|
20 |
+\arguments{ |
|
21 |
+\item{data}{data matrix} |
|
22 |
+ |
|
23 |
+\item{unc}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
24 |
+ |
|
25 |
+\item{ABins}{a matrix of same size as A which gives relative |
|
26 |
+probability of that element being non-zero} |
|
27 |
+ |
|
28 |
+\item{PBins}{a matrix of same size as P which gives relative |
|
29 |
+probability of that element being non-zero} |
|
30 |
+ |
|
31 |
+\item{GStoGenes}{data.frame or list with gene sets} |
|
32 |
+ |
|
33 |
+\item{nFactor}{number of patterns (basis vectors, metagenes)} |
|
34 |
+ |
|
35 |
+\item{simulation_id}{name to attach to atoms files if created} |
|
36 |
+ |
|
37 |
+\item{nEquil}{number of iterations for burn-in} |
|
38 |
+ |
|
39 |
+\item{nSample}{number of iterations for sampling} |
|
40 |
+ |
|
41 |
+\item{nOutR}{how often to print status into R by iterations} |
|
42 |
+ |
|
43 |
+\item{output_atomic}{whether to write atom files (large)} |
|
44 |
+ |
|
45 |
+\item{fixedBinProbs}{Boolean for using relative probabilities |
|
46 |
+given in Abins and Pbins} |
|
47 |
+ |
|
48 |
+\item{fixedDomain}{character to indicate whether A or P is |
|
49 |
+domain for relative probabilities} |
|
50 |
+ |
|
51 |
+\item{sampleSnapshots}{Boolean to indicate whether to capture |
|
52 |
+individual samples from Markov chain during sampling} |
|
53 |
+ |
|
54 |
+\item{numSnapshots}{the number of individual samples to capture} |
|
55 |
+ |
|
56 |
+\item{plot}{Boolean to indicate whether to produce output graphics} |
|
57 |
+ |
|
58 |
+\item{nPerm}{number of permutations in gene set test} |
|
59 |
+ |
|
60 |
+\item{alphaA}{sparsity parameter for A domain} |
|
61 |
+ |
|
62 |
+\item{nMaxA}{PRESENTLY UNUSED, future = limit number of atoms} |
|
63 |
+ |
|
64 |
+\item{max_gibbmass_paraA}{limit truncated normal to max size} |
|
65 |
+ |
|
66 |
+\item{alphaP}{sparsity parameter for P domain} |
|
67 |
+ |
|
68 |
+\item{nMaxP}{PRESENTLY UNUSED, future = limit number of atoms} |
|
69 |
+ |
|
70 |
+\item{max_gibbmass_paraP}{limit truncated normal to max size} |
|
71 |
+} |
|
72 |
+\description{ |
|
73 |
+\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
74 |
+matrix factorization returning the two matrices that reconstruct |
|
75 |
+the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
76 |
+activity with nPerm set to 500 |
|
77 |
+ |
|
78 |
+Coordinated Gene Activity in Pattern Sets |
|
79 |
+} |
|
80 |
+ |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/CoGAPS@107512 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,108 +1,119 @@ |
1 |
-% Generated by roxygen2 (4.0.1): do not edit by hand |
|
2 |
-\name{CoGAPS} |
|
3 |
-\alias{CoGAPS} |
|
4 |
-\title{\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
5 |
-matrix factorization returning the two matrices that reconstruct |
|
6 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|
7 |
-activity with nPerm set to 500} |
|
8 |
-\usage{ |
|
9 |
-CoGAPS(data, unc, GStoGenes, nFactor = "7", nEquil = 1000, nSample = 1000, |
|
10 |
- nOutR = 1000, output_atomic = "false", simulation_id = "simulation", |
|
11 |
- plot = TRUE, nPerm = 500, alphaA = "0.01", nMaxA = "100000", |
|
12 |
- max_gibbmass_paraA = "100.0", lambdaA_scale_factor = "1.0", |
|
13 |
- alphaP = "0.01", nMaxP = "100000", max_gibbmass_paraP = "100.0", |
|
14 |
- lambdaP_scale_factor = "1.0") |
|
15 |
-} |
|
16 |
-\arguments{ |
|
17 |
-\item{data}{data matrix} |
|
18 |
- |
|
19 |
-\item{unc}{uncertainty matrix (std devs for chi-squared of Log Likelihood)} |
|
20 |
- |
|
21 |
-\item{GStoGenes}{data.frame or list with gene sets} |
|
22 |
- |
|
23 |
-\item{nFactor}{number of patterns (basis vectors, metagenes)} |
|
24 |
- |
|
25 |
-\item{simulation_id}{name to attach to atoms files if created} |
|
26 |
- |
|
27 |
-\item{plot}{logical to determine if plots produced} |
|
28 |
- |
|
29 |
-\item{nPerm}{number of permutations for gene set test} |
|
30 |
- |
|
31 |
-\item{nEquil}{number of iterations for burn-in} |
|
32 |
- |
|
33 |
-\item{nSample}{number of iterations for sampling} |
|
34 |
- |
|
35 |
-\item{nOutR}{how often to print status into R by iterations} |
|
36 |
- |
|
37 |
-\item{output_atomic}{whether to write atom files (large)} |
|
38 |
- |
|
39 |
-\item{alphaA}{sparsity parameter for A domain} |
|
40 |
- |
|
41 |
-\item{alphaP}{sparsity parameter for P domain} |
|
42 |
- |
|
43 |
-\item{max_gibbmass_paraA}{limit truncated normal to max size for A} |
|
44 |
- |
|
45 |
-\item{max_gibbmass_paraP}{limit truncated normal to max size for P} |
|
46 |
- |
|
47 |
-\item{nMaxA}{PRESENTLY UNUSED, future = limit number of atoms for A} |
|
48 |
- |
|
49 |
-\item{nMaxP}{PRESENTLY UNUSED, future = limit number of atoms for P} |
|
50 |
- |
|
51 |
-\item{lambdaA_scale_factor}{lambda factor in penalized likelihood for A} |
|
52 |
- |
|
53 |
-\item{lambdaP_scale_factor}{lambda factor in penalized likelihood for P} |
|
54 |
-} |
|
55 |
-\description{ |
|
56 |
-\code{CoGAPS} calls the C++ MCMC code through gapsRun and performs Bayesian |
|
57 |
-matrix factorization returning the two matrices that reconstruct |
|
58 |
-the data matrix and then calls calcCoGAPSStat to estimate gene set |
|