Browse code

fix issues with parameters

Tom Sherman authored on 22/02/2019 16:32:51
Showing 1 changed files

... ...
@@ -59,7 +59,7 @@ distributedCogaps <- function(data, allParams, uncertainty)
59 59
         allParams$BPPARAM <- BiocParallel::MulticoreParam(workers=length(sets))
60 60
     
61 61
     initialResult <- NULL
62
-    if (is.null(allParams$fixedPatterns))
62
+    if (is.null(allParams$gaps@fixedPatterns))
63 63
     {
64 64
         # run Cogaps normally on each subset of the data
65 65
         gapsCat(allParams, "Running Across Subsets...\n\n")
... ...
@@ -80,13 +80,13 @@ distributedCogaps <- function(data, allParams, uncertainty)
80 80
     }
81 81
     else
82 82
     {
83
-        matchedPatterns <- list(consensus=allParams$fixedPatterns)
83
+        matchedPatterns <- list(consensus=allParams$gaps@fixedPatterns)
84 84
     }
85 85
 
86 86
     # set fixed matrix
87 87
     allParams$gaps@nPatterns <- ncol(matchedPatterns$consensus)
88
-    allParams$fixedPatterns <- matchedPatterns$consensus
89
-    allParams$whichMatrixFixed <- ifelse(allParams$gaps@distributed
88
+    allParams$gaps@fixedPatterns <- matchedPatterns$consensus
89
+    allParams$gaps@whichMatrixFixed <- ifelse(allParams$gaps@distributed
90 90
         == "genome-wide", "P", "A")
91 91
         
92 92
     # run final phase with fixed matrix