File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,11 @@ def __init__(self, subparser):
9292 action = "store_true" ,
9393 help = "Enable abundance tracking of hashes across rank selection." ,
9494 )
95+ p .add_argument (
96+ "--skip-missing-lineages" ,
97+ action = "store_true" ,
98+ help = "Skip empty lineages to write the DB without them"
99+ )
95100 sourmash_utils .add_standard_minhash_args (p )
96101
97102 def main (self , args ):
@@ -239,11 +244,14 @@ def pangenome_createdb_main(args):
239244 break
240245
241246 if lineage_tup is None :
242- print (f"cannot find ident { ident } in the provided taxonomy ifle ." )
247+ print (f"cannot find ident { ident } in the provided taxonomy file ." )
243248 print (f"The three closest matches to { ident } are:" )
244249 for k in get_close_matches (ident , taxdb ):
245250 print (f"* '{ k } '" )
246- sys .exit (- 1 )
251+ if not getattr (args , "skip_missing_lineages" , False ):
252+ sys .exit (- 1 )
253+ else :
254+ continue
247255
248256 lineage_tup = tax_utils .RankLineageInfo (lineage = lineage_tup )
249257 lineage_pair = lineage_tup .lineage_at_rank (args .rank )
You can’t perform that action at this time.
0 commit comments