Browse code

fixed checkpoints

Tom Sherman authored on 09/08/2018 16:44:08
Showing 4 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: CoGAPS
2
-Version: 3.3.7
2
+Version: 3.3.8
3 3
 Date: 2018-04-24
4 4
 Title: Coordinated Gene Activity in Pattern Sets
5 5
 Author: Thomas Sherman, Wai-shing Lee, Conor Kelton, Ondrej Maxian, Jacob Carey,
... ...
@@ -1,4 +1,4 @@
1
-# CoGAPS Version: 3.3.7
1
+# CoGAPS Version: 3.3.8
2 2
 
3 3
 [![Bioc](https://bioconductor.org/images/logo_bioconductor.gif)](https://bioconductor.org/packages/CoGAPS)
4 4
 [![downloads](https://bioconductor.org/shields/downloads/CancerInSilico.svg)](https://bioconductor.org/packages/CoGAPS)
... ...
@@ -122,6 +122,8 @@ void GapsRunner::runOnePhase()
122 122
 {
123 123
     for (; mCurrentIteration < mMaxIterations; ++mCurrentIteration)
124 124
     {
125
+        createCheckpoint();
126
+
125 127
         #ifdef __GAPS_R_BUILD__
126 128
         Rcpp::checkUserInterrupt();
127 129
         #endif
... ...
@@ -145,7 +147,6 @@ void GapsRunner::runOnePhase()
145 147
         }
146 148
 
147 149
         displayStatus();
148
-        createCheckpoint();
149 150
     }
150 151
 }
151 152
 
... ...
@@ -244,12 +245,10 @@ void GapsRunner::createCheckpoint()
244 245
     
245 246
         // create checkpoint file
246 247
         Archive ar(mCheckpointOutFile, ARCHIVE_WRITE);
247
-        
248 248
         gaps::random::save(ar);
249 249
         ar << mNumPatterns << mSeed << mASampler << mPSampler << mStatistics
250 250
             << mFixedMatrix << mMaxIterations << mPhase << mCurrentIteration
251 251
             << mNumUpdatesA << mNumUpdatesP;
252
-
253 252
         ar.close();
254 253
 
255 254
         // delete backup file
... ...
@@ -9,5 +9,4 @@ test_that("Checkpoint System",
9 9
 
10 10
     expect_true(all.equal(run1@featureLoadings, run2@featureLoadings))
11 11
     expect_true(all.equal(run1@sampleFactors, run2@sampleFactors))
12
-
13 12
 })
14 13
\ No newline at end of file