3131import static org .junit .Assert .assertEquals ;
3232import static org .junit .Assert .assertTrue ;
3333import static ubic .gemma .persistence .service .expression .bioAssayData .RandomExpressionDataMatrixUtils .randomExpressionMatrix ;
34+ import static ubic .gemma .persistence .service .expression .bioAssayData .RandomExpressionDataMatrixUtils .setSeed ;
3435
3536public class ProcessedExpressionDataVectorCreationHelperServiceTest extends BaseIntegrationTest {
3637
@@ -51,6 +52,7 @@ public class ProcessedExpressionDataVectorCreationHelperServiceTest extends Base
5152
5253 @ Test
5354 public void testCreateProcessedDataVectors () throws QuantitationTypeDetectionException , QuantitationTypeConversionException {
55+ setSeed ( 123L );
5456 double [][] matrix = randomExpressionMatrix ( NUM_PROBES , 4 , new LogNormalDistribution ( 9 , 1 ) );
5557 ExpressionExperiment ee = getTestExpressionExperimentForRawExpressionMatrix ( matrix , ScaleType .LINEAR , false );
5658 assertThat ( ee .getProcessedExpressionDataVectors () ).isEmpty ();
@@ -73,6 +75,7 @@ public void testCreateProcessedDataVectors() throws QuantitationTypeDetectionExc
7375
7476 @ Test
7577 public void testCreateProcessedDataVectorsFromLog2Data () throws QuantitationTypeDetectionException , QuantitationTypeConversionException {
78+ setSeed ( 123L );
7679 double [][] matrix = randomExpressionMatrix ( NUM_PROBES , 4 , new NormalDistribution ( 15 , 1 ) );
7780 ExpressionExperiment ee = getTestExpressionExperimentForRawExpressionMatrix ( matrix , ScaleType .LOG2 , false );
7881 assertThat ( ee .getProcessedExpressionDataVectors () ).isEmpty ();
@@ -95,6 +98,7 @@ public void testCreateProcessedDataVectorsFromLog2RatiometricData() throws Quant
9598
9699 @ Test
97100 public void testThaw () throws QuantitationTypeDetectionException , QuantitationTypeConversionException {
101+ setSeed ( 123L );
98102 double [][] matrix = randomExpressionMatrix ( NUM_PROBES , 8 , new NormalDistribution ( 0 , 1 ) );
99103 ExpressionExperiment ee = getTestExpressionExperimentForRawExpressionMatrix ( matrix , ScaleType .LOG2 , true );
100104 assertThat ( ee .getRawExpressionDataVectors () ).hasSize ( NUM_PROBES );
0 commit comments