@@ -87,25 +87,18 @@ public static void setUp() throws IOException {
8787 ida_min_file = copyToPrimaryDir ("SimID_303404574_0__Min.ida" );
8888 ida_std_file = copyToPrimaryDir ("SimID_303404574_0__Std.ida" );
8989
90-
91-
92-
93- // ida_0_File = File.createTempFile("SimID_284673710_0_", ".ida");
90+ // ida_1_File = File.createTempFile("SimID_284673710_0_", ".ida");
9491// Resources.asByteSource(Resources.getResource("cbit/vcell/simdata/SimID_284673710_0_.ida"))
95- // .copyTo(com.google.common.io.Files.asByteSink(ida_0_File ));
92+ // .copyTo(com.google.common.io.Files.asByteSink(ida_1_File ));
9693
9794 }
9895
9996 @ AfterAll
10097 public static void tearDown () {
10198
10299 deleteRecursively (primaryDir );
103- // ida_0_File.delete();
104100// ida_1_File.delete();
105- // ida_2_File.delete();
106- // if (inputStream != null) {
107- // inputStream.close();
108- }
101+ }
109102
110103
111104 @ Test
@@ -136,55 +129,28 @@ public void testReadData() throws IOException, DataAccessException, CacheExcepti
136129 ODESimData odeSimDataAvg = lbrs .getOdeSimDataAvg ();
137130 assertNotNull (odeSimDataAvg , "Avg ODE data should be loaded" );
138131 assertTrue (odeSimDataAvg .getMathName ().contains (simID ), "Avg ODE data mathName should contain the simulation ID" );
139-
140132 // --- Minimal structural checks ---
141133 assertTrue (odeSimDataAvg .getDataColumnCount () > 0 , "Avg ODE data should have at least one column" );
142134 assertTrue (odeSimDataAvg .getRowCount () > 0 , "Avg ODE data should have at least one row" );
143135
136+ // Cluster Counts data loaded
137+ ODESimData odeSimDataClusterCounts = lbrs .getOdeSimDataClusterCounts ();
138+ assertNotNull (odeSimDataClusterCounts , "Cluster Counts ODE data should be loaded" );
139+ assertTrue (odeSimDataClusterCounts .getMathName ().contains (simID ), "Cluster Counts ODE data mathName should contain the simulation ID" );
140+ // --- Minimal structural checks ---
141+ assertTrue (odeSimDataClusterCounts .getDataColumnCount () > 0 , "Cluster Counts ODE data should have at least one column" );
142+ assertTrue (odeSimDataClusterCounts .getRowCount () > 0 , "Cluster Counts ODE data should have at least one row" );
143+
144144 }
145145
146146// @Test
147- // @Disabled("Deprecated: postprocessing moved to solver")
148147// public void testRead() throws IOException {
149148//
150- // // read the input data (3 .IDA files)
151- // ODESolverResultSet osrs_0 = getOdeSolverResultSet(ida_0_File);
149+ // // read the input data
152150// ODESolverResultSet osrs_1 = getOdeSolverResultSet(ida_1_File);
153- // ODESolverResultSet osrs_2 = getOdeSolverResultSet(ida_2_File);
154- //
155- // Map<Integer, ODESolverResultSet> odeSolverResultSetMap = new LinkedHashMap<>();
156- // odeSolverResultSetMap.put(0, osrs_0);
157- // odeSolverResultSetMap.put(1, osrs_1);
158- // odeSolverResultSetMap.put(2, osrs_2);
159- //
160- // LangevinPostProcessorInput lppInput = new LangevinPostProcessorInput(null, null);
161- // lppInput.setFailed(false);
162- // lppInput.setOdeSolverResultSetMap(odeSolverResultSetMap);
163- //
164- // // compute primary statistics
165- // // note: LangevinPostProcessor is deprecated, but this test is kept for it contains some reusable code
166- // LangevinPostProcessor lpp = new LangevinPostProcessor();
167- // LangevinPostProcessorOutput lppOutput = lpp.postProcessLangevinResults(lppInput);
168- //
169- // assertFalse(lppOutput.isFailed(), "expected to not fail");
170- // assertTrue(lppOutput.isMultiTrial(), "expected to be multi-trial");
171- //
172- // // get some timepoint for some variable
173- // String name = osrs_0.getColumnDescriptions()[7].getName();
174- // double anAverage = lppOutput.getAveragesResultSet().getRow(10)[7]; // TOTAL_MT0__Site1__state0
175- // double aStd = lppOutput.getStdResultSet().getRow(10)[7];
176- // double aMin = lppOutput.getMinResultSet().getRow(10)[7];
177- // double aMax = lppOutput.getMaxResultSet().getRow(10)[7];
178- //
179- // // compare to what's expected
180- // assertTrue("TOTAL_MT0__Site1__state0".contentEquals(name), "expecting column name 'TOTAL_MT0__Site1__state0', found: '" + name + "'");
181- // assertTrue(anAverage == 21.0 ? true : false, "expecting 21.0, found " + anAverage);
182- // assertTrue(aStd == 0.816496580927726 ? true : false, "expecting 0.816496580927726, found " + aStd);
183- // assertTrue(aMin == 20.0 ? true : false, "expecting 20.0, found " + aMin);
184- // assertTrue(aMax == 22.0 ? true : false, "expecting 22.0, found " + aMax);
151+ // assertNotNull(osrs_1, "Failed to read IDA file: " + ida_1_File.getAbsolutePath());
185152// }
186153
187-
188154 private static void deleteRecursively (File file ) {
189155 if (file == null || !file .exists ()) {
190156 return ;
@@ -206,7 +172,7 @@ private static File copyToPrimaryDir(String resourceName) throws IOException {
206172 return out ;
207173 }
208174
209-
175+ // also see ODESimData.readIDADataFile()
210176 private static ODESolverResultSet getOdeSolverResultSet (File idaFile ) throws IOException {
211177 ODESolverResultSet odeSolverResultSet = new ODESolverResultSet ();
212178 FileInputStream inputStream = null ;
0 commit comments