Mykrobe-tools / mykrobe

Antibiotic resistance prediction in minutes
MIT License
105 stars 27 forks source link

Mykrobe installed via docker throws mccortex error #65

Closed flashton2003 closed 5 years ago

flashton2003 commented 5 years ago

Hello,

I'm trying to run mykrobe installed via docker, following these instructions. I realise that's the old mykrobe repo, is phelimb/mykrobe-predictor still the correct docker to pull?

When I run e.g. sudo docker run -it --rm -v /home/ubuntu/tb_volume/oucru_robot/9998-17107_S14:/data phelimb/mykrobe_predictor mykrobe predict 9998 tb -1 /data/9999-17108_S15_1.fastq.gz /data/9999-17108_S15_2.fastq.gz I get the following error.

DEBUG:mykatlas.cortex.mccortex:running mccortex31 geno -q -t 1 -m 1GB -k 21 -o /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.covgs -I /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx -s 9998-21 -1 /data/9999-17108_S15_1.fastq.gz -1 /data/9999-17108_S15_2.fastq.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-species-170421.fasta.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.ctx
[11 Sep 2019 04:33:17-NAB][async_read_io.c:43] Fatal Error: Cannot open -1 file: /data/9999-17108_S15_1.fastq.gz
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/mykatlas/cortex/mccortex.py", line 210, in _run_coverage_if_required
    subprocess.check_output(self.coverages_cmd)
  File "/usr/local/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/usr/local/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['mccortex31', 'geno', '-q', '-t', '1', '-m 1GB', '-k', '21', '-o', '/tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.covgs', '-I', '/usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx', '-s', '9998-21', '-1', '/data/9999-17108_S15_1.fastq.gz', '-1', '/data/9999-17108_S15_2.fastq.gz', '-c', '/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-species-170421.fasta.gz', '-c', '/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz', '/tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.ctx']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/mykrobe", line 11, in <module>
    load_entry_point('mykrobe==0.5.6', 'console_scripts', 'mykrobe')()
  File "/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/mykrobe_predictor.py", line 125, in main
    args.func(parser, args)
  File "/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/mykrobe_predictor.py", line 34, in run_subtool
    run(parser, args)
  File "/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/cmds/amr.py", line 134, in run
    cp.run()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/typing/typer/genotyper.py", line 73, in run
    self._run_cortex()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/typing/typer/genotyper.py", line 90, in _run_cortex
    self.mc_cortex_runner.run()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/cortex/mccortex.py", line 161, in run
    self._run_cortex()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/cortex/mccortex.py", line 175, in _run_cortex
    self._run_coverage_if_required()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/cortex/mccortex.py", line 213, in _run_coverage_if_required
    "mccortex31 raised an error. Is it on PATH? check by running `mccortex31 geno`. The command that through the error was `%s`  " % subprocess.list2cmdline(self.coverages_cmd))
ValueError: mccortex31 raised an error. Is it on PATH? check by running `mccortex31 geno`. The command that through the error was `mccortex31 geno -q -t 1 "-m 1GB" -k 21 -o /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.covgs -I /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx -s 9998-21 -1 /data/9999-17108_S15_1.fastq.gz -1 /data/9999-17108_S15_2.fastq.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-species-170421.fasta.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.ctx` 

Then, when I run this command to get more information on the error

sudo docker run -it --rm phelimb/mykrobe_predictor mccortex31 geno -q -t 1 "-m 1GB" -k 21 -o /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.covgs -I /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx -s 9998-21 -1 /data/9999-17108_S15_1.fastq.gz -1 /data/9999-17108_S15_2.fastq.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-species-170421.fasta.gz -c /usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz /tmp//9998-21_tb-species-170421-tb-walker-probe-set-feb-09-2017.ctx

I get this output

[11 Sep 2019 04:37:15-veB][graph_file_reader.c:288] Warn: Couldn't get file size: /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx [11 Sep 2019 04:37:15-veB][file_util.c:192] Fatal Error: Cannot open file: /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx [No such file or directory]

Any thoughts?

Thanks,

Phil

mbhall88 commented 5 years ago

Hey Phil,

I don't think that docker image has been updated in a while. If you want to use a container I would suggest using the biocontainers one that is built from the conda recipe.

I will keep this open as a reminder to update the docs.

flashton2003 commented 5 years ago

Thanks Michael! It works well.