@@ -213,6 +213,27 @@ def initialise(ts, match_db, additional_problematic_sites, verbose, log_file):
213
213
inference .MatchDb .initialise (match_db )
214
214
215
215
216
+ @click .command ()
217
+ @click .argument ("metadata" , type = click .Path (exists = True , dir_okay = False ))
218
+ @click .option ("--counts/--no-counts" , default = False )
219
+ @click .option ("-v" , "--verbose" , count = True )
220
+ @click .option ("-l" , "--log-file" , default = None , type = click .Path (dir_okay = False ))
221
+ def list_dates (metadata , counts , verbose , log_file ):
222
+ """
223
+ List the dates included in specified metadataDB
224
+ """
225
+ setup_logging (verbose , log_file )
226
+ with sc2ts .MetadataDb (metadata ) as metadata_db :
227
+ counter = metadata_db .date_sample_counts ()
228
+ if counts :
229
+ for k , v in counter .items ():
230
+ print (k , v , sep = "\t " )
231
+
232
+ else :
233
+ for k in counter :
234
+ print (k )
235
+
236
+
216
237
@click .command ()
217
238
@click .argument ("alignments" , type = click .Path (exists = True , dir_okay = False ))
218
239
@click .argument ("metadata" , type = click .Path (exists = True , dir_okay = False ))
@@ -509,6 +530,7 @@ def cli():
509
530
cli .add_command (export_metadata )
510
531
511
532
cli .add_command (initialise )
533
+ cli .add_command (list_dates )
512
534
cli .add_command (daily_extend )
513
535
cli .add_command (validate )
514
536
cli .add_command (annotate_recombinants )
0 commit comments