@@ -125,7 +125,7 @@ def extract_ints(item):
125
125
def test_h12_calibration (fixture , api : AnophelesH12Analysis ):
126
126
# Set up test parameters.
127
127
all_sample_sets = api .sample_sets ()["sample_set" ].to_list ()
128
- window_sizes = rng .integers (100 , 500 , size = random . randint (2 , 5 )).tolist ()
128
+ window_sizes = rng .integers (100 , 500 , size = rng . integers (2 , 5 )).tolist ()
129
129
# Convert window_sizes to a flattened list of integers
130
130
window_sizes = sorted (set (ensure_int_list (window_sizes )))
131
131
h12_params = dict (
@@ -194,7 +194,7 @@ def test_h12_gwss_with_default_analysis(fixture, api: AnophelesH12Analysis):
194
194
h12_params = dict (
195
195
contig = random .choice (api .contigs ),
196
196
sample_sets = [random .choice (all_sample_sets )],
197
- window_size = random . randint (100 , 500 ),
197
+ window_size = rng . integers (100 , 500 ),
198
198
min_cohort_size = 5 ,
199
199
)
200
200
@@ -208,7 +208,7 @@ def test_h12_gwss_with_analysis(fixture, api: AnophelesH12Analysis):
208
208
all_sample_sets = api .sample_sets ()["sample_set" ].to_list ()
209
209
sample_sets = [random .choice (all_sample_sets )]
210
210
contig = random .choice (api .contigs )
211
- window_size = random . randint (100 , 500 )
211
+ window_size = rng . integers (100 , 500 )
212
212
213
213
for analysis in api .phasing_analysis_ids :
214
214
# Check if any samples available for the given phasing analysis.
@@ -262,7 +262,7 @@ def test_h12_gwss_multi_with_default_analysis(fixture, api: AnophelesH12Analysis
262
262
h12_params = dict (
263
263
contig = random .choice (api .contigs ),
264
264
sample_sets = all_sample_sets ,
265
- window_size = random . randint (100 , 500 ),
265
+ window_size = rng . integers (100 , 500 ),
266
266
min_cohort_size = 1 ,
267
267
cohorts = {"cohort1" : cohort1_query , "cohort2" : cohort2_query },
268
268
)
@@ -283,8 +283,8 @@ def test_h12_gwss_multi_with_window_size_dict(fixture, api: AnophelesH12Analysis
283
283
contig = random .choice (api .contigs ),
284
284
sample_sets = all_sample_sets ,
285
285
window_size = {
286
- "cohort1" : random . randint (100 , 500 ),
287
- "cohort2" : random . randint (100 , 500 ),
286
+ "cohort1" : rng . integers (100 , 500 ),
287
+ "cohort2" : rng . integers (100 , 500 ),
288
288
},
289
289
min_cohort_size = 1 ,
290
290
cohorts = {"cohort1" : cohort1_query , "cohort2" : cohort2_query },
@@ -335,7 +335,7 @@ def test_h12_gwss_multi_with_analysis(fixture, api: AnophelesH12Analysis):
335
335
analysis = analysis ,
336
336
contig = contig ,
337
337
sample_sets = all_sample_sets ,
338
- window_size = random . randint (100 , 500 ),
338
+ window_size = rng . integers (100 , 500 ),
339
339
min_cohort_size = min (n1 , n2 ),
340
340
cohorts = {"cohort1" : cohort1_query , "cohort2" : cohort2_query },
341
341
)
0 commit comments