iqbal-lab/Mykrobe-predictor

mykrobe predictor error

Closed this issue · 2 comments

I installed mykrobe and when I try to do AMR predict, I am facing some problem.

ubuntu@vsrinivasan:~/mtb_genome$ mykrobe predict SRR648517 tb -1 SRR648517.fastq.gz
INFO:root:Running AMR prediction with panels data/panels/tb-species-160330.fasta.gz, data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz
[18 May 2017 09:37:12-zEM][file_util.c:169] Fatal Error: Cannot write to file: /usr/local/lib/python3.4/dist-packages/mykatlas/atlas/data/skeletons/tb-species-160330-tb-walker-probe-set-feb-09-2017_21.ctx [Permission denied]
Traceback (most recent call last):
File "/usr/local/bin/mykrobe", line 11, in
load_entry_point('mykrobe==0.5.1', 'console_scripts', 'mykrobe')()
File "/usr/local/lib/python3.4/dist-packages/mykrobe/mykrobe_predictor.py", line 125, in main
args.func(parser, args)
File "/usr/local/lib/python3.4/dist-packages/mykrobe/mykrobe_predictor.py", line 34, in run_subtool
run(parser, args)
File "/usr/local/lib/python3.4/dist-packages/mykrobe/cmds/amr.py", line 134, in run
cp.run()
File "/usr/local/lib/python3.4/dist-packages/mykatlas/typing/typer/genotyper.py", line 73, in run
self._run_cortex()
File "/usr/local/lib/python3.4/dist-packages/mykatlas/typing/typer/genotyper.py", line 90, in _run_cortex
self.mc_cortex_runner.run()
File "/usr/local/lib/python3.4/dist-packages/mykatlas/cortex/mccortex.py", line 161, in run
self._run_cortex()
File "/usr/local/lib/python3.4/dist-packages/mykatlas/cortex/mccortex.py", line 173, in _run_cortex
self._build_panel_binary_if_required()
File "/usr/local/lib/python3.4/dist-packages/mykatlas/cortex/mccortex.py", line 191, in _build_panel_binary_if_required
subprocess.check_output(cmd)
File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['mccortex31', 'build', '-q', '-m 1GB', '-t', '1', '-k', '21', '-s', 'tb-species-160330-tb-walker-probe-set-feb-09-2017', '-1', '/usr/local/lib/python3.4/dist-packages/mykrobe/data/panels/tb-species-160330.fasta.gz', '-1', '/usr/local/lib/python3.4/dist-packages/mykrobe/data/panels/tb-walker-probe-set-feb-09-2017.fasta.gz', '/usr/local/lib/python3.4/dist-packages/mykatlas/atlas/data/skeletons/tb-species-160330-tb-walker-probe-set-feb-09-2017_21.ctx']' returned non-zero exit status 1

Kindly let me know where is the problem.

I've just realised this issue has been open and ignored! Apologies to vsrinivasanoucru
We will look into this . This seems significant:

Fatal Error: Cannot write to file: /usr/local/lib/python3.4/dist-packages/mykatlas/atlas/data/skeletons/tb-species-160330-tb-walker-probe-set-feb-09-2017_21.ctx [Permission denied]

Have you installed it somewhere where it/you dont have write access?

Hi I have solved the problem with the help of Phel

"It looks like you installed mykrobe using sudo so you'll also need to run it with sudoe.

e.g. sudo mykrobe predict SRR648517 tb -1 SRR648517.fastq.gz".

Thanks and regards