@@ -199,15 +199,6 @@ def dump_samples(samples, output_file):
199
199
"is greater than this, randomly subsample."
200
200
),
201
201
)
202
- @click .option (
203
- "--excluded_samples_dir" ,
204
- default = None ,
205
- type = click .Path (file_okay = False , dir_okay = True ),
206
- help = (
207
- "Directory containing pickled files of excluded samples. "
208
- "By default, it is set to output_prefx."
209
- ),
210
- )
211
202
@click .option ("--num-threads" , default = 0 , type = int , help = "Number of match threads" )
212
203
@click .option ("--random-seed" , default = 42 , type = int , help = "Random seed for subsampling" )
213
204
@click .option ("-p" , "--precision" , default = None , type = int , help = "Match precision" )
@@ -225,7 +216,6 @@ def daily_extend(
225
216
num_past_days ,
226
217
max_submission_delay ,
227
218
max_daily_samples ,
228
- excluded_samples_dir ,
229
219
num_threads ,
230
220
random_seed ,
231
221
precision ,
@@ -238,21 +228,23 @@ def daily_extend(
238
228
"""
239
229
setup_logging (verbose , log_file )
240
230
rng = random .Random (random_seed )
231
+
232
+ match_db_path = f"{ output_prefix } match.db"
241
233
if base is None :
242
234
base_ts = inference .initial_ts ()
235
+ match_db = inference .MatchDb .initialise (match_db_path )
243
236
else :
244
237
base_ts = tskit .load (base )
245
238
246
- if excluded_samples_dir is None :
247
- excluded_samples_dir = output_prefix
248
-
249
239
with contextlib .ExitStack () as exit_stack :
250
240
alignment_store = exit_stack .enter_context (sc2ts .AlignmentStore (alignments ))
251
241
metadata_db = exit_stack .enter_context (sc2ts .MetadataDb (metadata ))
242
+ match_db = exit_stack .enter_context (inference .MatchDb (match_db_path ))
252
243
ts_iter = inference .daily_extend (
253
244
alignment_store = alignment_store ,
254
245
metadata_db = metadata_db ,
255
246
base_ts = base_ts ,
247
+ match_db = match_db ,
256
248
num_mismatches = num_mismatches ,
257
249
max_hmm_cost = max_hmm_cost ,
258
250
min_group_size = min_group_size ,
@@ -263,13 +255,10 @@ def daily_extend(
263
255
precision = precision ,
264
256
num_threads = num_threads ,
265
257
show_progress = not no_progress ,
266
- excluded_sample_dir = excluded_samples_dir ,
267
258
)
268
- for ts , excluded_samples , date in ts_iter :
259
+ for ts , date in ts_iter :
269
260
output_ts = output_prefix + date + ".ts"
270
261
add_provenance (ts , output_ts )
271
- output_excluded_samples = output_prefix + date + ".excluded_samples.pickle"
272
- dump_samples (excluded_samples , output_excluded_samples )
273
262
274
263
275
264
@click .command ()
0 commit comments