Skip to content

Commit

Permalink
folder path
Browse files Browse the repository at this point in the history
  • Loading branch information
tongzhouxu committed Mar 21, 2024
1 parent 0e4b990 commit 52f8901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mashpit/mashpit.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def commandToArgs(commandline):
subparser_update.set_defaults(func=update.update)

# "query" subcommand
subparser_query.add_argument(dest="sample", type=str, help="file path of the query sample")
subparser_query.add_argument(dest="database", type=str, help="path for the database folder")
subparser_query.add_argument(dest="sample", type=str, help="file path to the query sample")
subparser_query.add_argument(dest="database", type=str, help="path to the database folder")
subparser_query.add_argument("--number", type=int, help="number of isolates in the query output, default is 200",default=200)
subparser_query.add_argument("--threshold", type=float, help="minimum jaccard similarity for mashtree, default is 0.85",default=0.85)
subparser_query.add_argument("--annotation", type=str, help="mashtree tip annoatation, default is none")
Expand Down
5 changes: 3 additions & 2 deletions mashpit/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ def query(args):
if not os.path.exists(db_folder):
logging.error('Database path not found.')
exit(1)
sql_path = os.path.join(db_folder,f'{args.database}.db')
sig_path = os.path.join(db_folder, f'{args.database}.sig')
folder_name = os.path.basename(db_folder)
sql_path = os.path.join(db_folder,f'{folder_name}.db')
sig_path = os.path.join(db_folder, f'{folder_name}.sig')
if not (os.path.exists(sql_path) and os.path.exists(sig_path)):
logging.error('Database incomplete.')
exit(1)
Expand Down

0 comments on commit 52f8901

Please sign in to comment.