iqbal-lab / Mykrobe-predictor

Antibiotic resistance predictions in minutes on a laptop
Other
50 stars 19 forks source link

Failing to run Phelim/mykrobe_predictor #147

Closed kristyhoran closed 5 years ago

kristyhoran commented 6 years ago

I work for MDU, in Victoria Australia, with @tseemann and I'm trying to use mykrobe predictor to find amr in TB isolates. I had some issues in installation, and so decided to follow your instructions for using the docker container. I do not have the use of docker, so used singularity to pull the container. When I run the container

$ singularity exec mykrobe_predictor.simg
usage: mykrobe [-h] [--version] {predict,genotype} ...

optional arguments:
  -h, --help          show this help message and exit
  --version           mykrobe version

[sub-commands]:
  {predict,genotype}
    predict           predict the sample's antibiogram
    genotype          genotype a sample using a probe set

however, when try to actually run mykrobe predict

$ singularity exec mykrobe_predictor.simg mykrobe predict sampleID tb -1 path/to/reads.fastq.gz
INFO:root:Running AMR prediction with panels data/panels/tb-species-170421.fasta.gz, data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz
[14 Jun 2018 13:08:21-YIY][file_util.c:169] Fatal Error: Cannot write to file: /usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx [Permission denied]
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 173, in _run_cortex
    self._build_panel_binary_if_required()
  File "/usr/local/lib/python3.5/site-packages/mykatlas/cortex/mccortex.py", line 191, in _build_panel_binary_if_required
    subprocess.check_output(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', 'build', '-q', '-m 1GB', '-t', '1', '-k', '21', '-s', 'tb-species-170421-tb-walker-probe-set-feb-09-2017', '-1', '/usr/local/lib/python3.5/site-packages/mykrobe-0.5.6-py3.5.egg/mykrobe/data/panels/tb-species-170421.fasta.gz', '-1', '/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', '/usr/local/lib/python3.5/site-packages/mykatlas/atlas/data/skeletons/tb-species-170421-tb-walker-probe-set-feb-09-2017_21.ctx']' returned non-zero exit status 1

Can you please point me in the right direction? I appreciate any advice you can give. Regards Kristy Horan

iqbal-lab commented 6 years ago

Hi @kristyhoran , sorry for the delayed reply. Mykrobe is trying to write to the "skeleton directory" (sorry for weird jargon), but that’s in the mykrobe installation directory, which is in the container, which does not have write permission for the user.

We have rewritten Mykrobe-predictor and now have a new repository (not this one), which also has a singularity container without the problem you have above. We have been working on a very considerably improved mutation catalog also, which we are just validating on several thousand samples. I'm happy to give you access to that soon (within a few weeks, maybe sooner), but I want to finish the validation checks. Once those are done, the command-line tool and container will be ok for your use. Are you ok with that delay? I don't really see the point of investing much in this, as we're about to deprecate this repo and point people to the shiny new one. However, if you have some urgent thing you need to analyse now, of course we'll help

kristyhoran commented 6 years ago

Hi @iqbal-lab Thanks for your reply! That sounds fine, I would prefer to wait for the shiny new one. Please let me know when it is up. Thanks again. Cheers Kristy

iqbal-lab commented 6 years ago

Great, we'll be in touch @kristyhoran !

Phelimb commented 5 years ago

@kristyhoran sorry for the delay in getting in touch. There's a new repo available here: https://github.com/Mykrobe-tools/mykrobe.