Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sourmash lca classify db error message isn't very friendly #387

Closed
taylorreiter opened this issue Jan 20, 2018 · 1 comment · Fixed by #390
Closed

sourmash lca classify db error message isn't very friendly #387

taylorreiter opened this issue Jan 20, 2018 · 1 comment · Fixed by #390

Comments

@taylorreiter
Copy link
Contributor

I recently ran sourmash lca classify with a corrupted database inside of a snakemake workflow, producing the following error message:

rule run_sourmash_LCA_sylv:
    input: inputs/genbank_lca/genbank-k31.lca.json, outputs/sylvestris/Olea_europaea_1kb_scaffolds-k31.fa.sig
    output: outputs/sourmash_lca/Olea_europaea_1kb_scaffolds-k31.lca.txt
    jobid: 1

Activating conda environment /home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7.
Traceback (most recent call last):k_lca/genbank-k31.lca.json
  File "/home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7/bin/sourmash", line 11, in <module>
    load_entry_point('sourmash', 'console_scripts', 'sourmash')()
  File "/home/ubuntu/olive_genome/dummy/src/sourmash/sourmash_lib/__main__.py", line 63, in main
    cmd(sys.argv[2:])
  File "/home/ubuntu/olive_genome/dummy/src/sourmash/sourmash_lib/lca/__main__.py", line 46, in main
    cmd(sysv_args[1:])
  File "/home/ubuntu/olive_genome/dummy/src/sourmash/sourmash_lib/lca/command_classify.py", line 111, in classify
    dblist, ksize, scaled = lca_utils.load_databases(args.db, args.scaled)
  File "/home/ubuntu/olive_genome/dummy/src/sourmash/sourmash_lib/lca/lca_utils.py", line 249, in load_databases
    lca_db.load(db_name)
  File "/home/ubuntu/olive_genome/dummy/src/sourmash/sourmash_lib/lca/lca_utils.py", line 139, in load
    load_d = json.load(fp)
  File "/home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Error in rule run_sourmash_LCA_sylv:
    jobid: 1
    output: outputs/sourmash_lca/Olea_europaea_1kb_scaffolds-k31.lca.txt

RuleException:
CalledProcessError in line 59 of /home/ubuntu/olive_genome/dummy/sourmashlca.snakefile:
Command 'source activate /home/ubuntu/olive_genome/dummy/.snakemake/conda/54f9bee7; set -euo pipefail;  
    sourmash lca classify --db inputs/genbank_lca/genbank-k31.lca.json --query outputs/sylvestris/Olea_europaea_1kb_scaffolds-k31.fa.sig -o outputs/sourmash_lca/Olea_europaea_1kb_scaffolds-k31.lca.txt ' returned non-zero exit status 1.
  File "/home/ubuntu/olive_genome/dummy/sourmashlca.snakefile", line 59, in __rule_run_sourmash_LCA_sylv
  File "/home/ubuntu/miniconda3/envs/snakemake/lib/python3.6/concurrent/futures/thread.py", line 55, in run

As @titus indicated, this is from a corrupted database. However, this error message wasn't very friendly. A more informative/friendly error message would be helpful!

@ctb
Copy link
Contributor

ctb commented Feb 19, 2018

Fixed in #390 aae3c49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants