diff --git a/cblaster/helpers.py b/cblaster/helpers.py index 95ae2ae..289a922 100644 --- a/cblaster/helpers.py +++ b/cblaster/helpers.py @@ -18,7 +18,10 @@ def find_sqlite_db(path): - sqlite_db = Path(path).with_suffix(".sqlite3") + sqlite_db = Path(path) + if sqlite_db.suffix == ".gz": + sqlite_db = sqlite_db.with_suffix("") + sqlite_db = sqlite_db.with_suffix(".sqlite3") if not sqlite_db.exists(): LOG.error("Could not find matching SQlite3 database, exiting") raise SystemExit diff --git a/cblaster/hmm_search.py b/cblaster/hmm_search.py index 4abbeea..3c14a77 100644 --- a/cblaster/hmm_search.py +++ b/cblaster/hmm_search.py @@ -158,7 +158,10 @@ def run_hmmsearch(fasta, query): check=True, ) except subprocess.CalledProcessError: - LOG.exception("hmmsearch failed!") + add_msg="" + if fasta.endswith("gz"): + add_msg = " Try running: \n gunzip {0} \nand then resubmit your cblaster command command, specifying:\n -db {1}.\n\n".format(fasta, fasta.replace(".gz","")) + LOG.exception("hmmsearch failed!"+add_msg) return output