@@ -390,6 +390,32 @@ function test_averageHighthroughputExperimentsAndCalcErrors(~)
390390 assertEqual(0 , dists .prediction );
391391 end
392392
393+ function test_calcAvgSumSquaredLogRatioReproducible(~)
394+ import edu .stanford .covert .cell .sim .util .CachedSimulationObjectUtil ;
395+ import edu .stanford .covert .cell .sim .util .DreamScoring ;
396+
397+ sim = CachedSimulationObjectUtil .load();
398+ refParameterVals = sim .getAllParameters();
399+
400+ met = sim .process(' Metabolism' );
401+ rxnId = met.reactionWholeCellModelIDs{1 };
402+ kinetics.(rxnId ).for = 1 ;
403+ sim .applyMetabolicReactionKinetics(kinetics );
404+ sim .applyRnaHalfLives(struct(' TU_001' , 1 ));
405+ sim .applyRnaPolTuBindingProbs(struct(' TU_290' , 1e-3 ));
406+ paramVals = sim .getAllParameters();
407+
408+ distsA = DreamScoring .calcAvgSumSquaredLogRatio(...
409+ DreamScoring .getParameterVector(paramVals ), ...
410+ DreamScoring .getParameterVector(refParameterVals ));
411+
412+ distsB = DreamScoring .calcAvgSumSquaredLogRatio(...
413+ DreamScoring .getParameterVector(paramVals ), ...
414+ DreamScoring .getParameterVector(refParameterVals ));
415+
416+ assertEqual(distsA , distsB )
417+ end
418+
393419 function test_calcParameterAndPredictionScoring(~)
394420 refParameterValsPath = ' output/1_1.parameters.mat' ;
395421 refAvgValsPath = ' output/1_1.predictions.mat' ;
0 commit comments