jodyphelan / TBProfiler

Profiling tool for Mycobacterium tuberculosis to detect ressistance and strain type from WGS data
GNU General Public License v3.0
102 stars 42 forks source link

tb_profiler docker version 5.0.1; update_tbdb produces "No such file or directory: 'variables.json'" Error #320

Open robertwhbaldwin opened 5 months ago

robertwhbaldwin commented 5 months ago

Running this image: staphb/tbprofiler latest 128a49b25724

which is the latest version 5.0.1

(base) root@5cdf3e69e18c:/home/robertbaldwin/tb_test/TB/calc_depth_bowtie_M.tb# tb-profiler update_tbdb --match_ref /home/robertbaldwin/tb_test/TB/calc_depth_bowtie_M.tb/sequence.fasta [08:59:17] ERROR Traceback (most recent call last): utils.py:391 File "/opt/conda/bin/tb-profiler", line 562, in
args.func(args)
File "/opt/conda/bin/tb-profiler", line 205, in main_create_db
pp.create_db(args,extra_files=extra_files)
File "/opt/conda/lib/python3.10/site-packages/pathogenprofiler/db.py", line 382, in create_db
variables = json.load(open("variables.json"))
FileNotFoundError: [Errno 2] No such file or directory: 'variables.json'
Cleaning up after failed run

Traceback (most recent call last): File "/opt/conda/bin/tb-profiler", line 562, in args.func(args) File "/opt/conda/bin/tb-profiler", line 183, in main_update_tbdb pp.run_cmd(f"tb-profiler create_db --prefix {args.prefix} {tmp} --load") File "/opt/conda/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 392, in run_cmd raise ValueError("Command Failed:\n%s\nstderr:\n%s" % (cmd,result.stderr.decode())) ValueError: Command Failed: /bin/bash -c set -o pipefail; tb-profiler create_db --prefix tbdb --match_ref /home/robertbaldwin/tb_test/TB/calc_depth_bowtie_M.tb/sequence.fasta --load stderr: Traceback (most recent call last): File "/opt/conda/bin/tb-profiler", line 562, in args.func(args) File "/opt/conda/bin/tb-profiler", line 205, in main_create_db pp.create_db(args,extra_files=extra_files) File "/opt/conda/lib/python3.10/site-packages/pathogenprofiler/db.py", line 382, in create_db variables = json.load(open("variables.json"))
FileNotFoundError: [Errno 2] No such file or directory: 'variables.json' Cleaning up after failed run

jodyphelan commented 5 months ago

Hi @robertwhbaldwin

It seems to work ok for me here. It looks like the variables.json file is missing from the tbdb repo it has downloaded. Can you check this by running ls tbdb/ and send me the output?

robertwhbaldwin commented 5 months ago

(base) robertbaldwin@system76-pc:~/tb_test/TB/calc_depth_bowtie_M.tb$ cd tbdb (base) robertbaldwin@system76-pc:~/tb_test/TB/calc_depth_bowtie_M.tb/tbdb$ ls tbdb.errlog.txt

There's nothing in the folder other than the error log