IndexError: list index out of range exception on Linux but not Mac
Closed this issue · 9 comments
Hello,
I am getting the error message: IndexError: list index out of range when I try to run mykrobe predict on our linux environment. When I run it on my Mac Book Pro it works fine. The error message is below:
Any ideas about why this is happening? Thanks in advance!
mykrobe predict SRR5486866 tb --seq ./SRR5486866_1.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
Traceback (most recent call last):
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/bin/mykrobe", line 11, in
sys.exit(main())
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykrobe/mykrobe_predictor.py", line 125, in main
args.func(parser, args)
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykrobe/mykrobe_predictor.py", line 34, in run_subtool
run(parser, args)
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykrobe/cmds/amr.py", line 134, in run
cp.run()
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykatlas/typing/typer/genotyper.py", line 74, in run
self._parse_covgs()
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykatlas/typing/typer/genotyper.py", line 128, in _parse_covgs
row)
File "/sysapps/cluster/software/Anaconda/2.3.0Linux-x86_64/envs/mykrobeenv2/lib/python2.7/site-packages/mykatlas/typing/typer/genotyper.py", line 118, in _parse_summary_covgs_row
return row[0], int(row[2]), int(row[3]), 100 * float(row[4]), int(row[5])
IndexError: list index out of range
What precise version of predictor are you using - did you get it from github? Do you have a commit number? How did you install , and has it worked for you before?
Hi,
We did get if from github. For the linux version: typing mykrobe --version gives : mykrobe v0.5.6-0-gbd7923a-dirty
The same command on my Mac Book Pro gives: mykrobe v0.5.1-0-g04fef92 I see that they are different. I have been using the version on my Mac Book but we have never tried using it on our linux cluster before.
I didn't do the install on the linux cluster so I will find out the details and respond. Thanks,
Michael
@harrismia Could you upload the output of pip freeze
when run within your virtualenv ? This looks like the version of mykatlas
is incompatible with the version of mykrobe
.
It looks like the local install of mccortex seems to fail with anaconda venvs. You might need to reinstall mccortex.
git clone --recursive https://github.com/iqbal-lab/Mykrobe-predictor.git
cd Mykrobe-predictor
cd mccortex
make
export PATH=$(pwd)/bin:$PATH
cd ..
The version should read:
mccortex31 --version
mccortex=v0.0.3-482-g22410ea
Looks like Mykrobe-predictor should be using the McCortex vcfgeno
command instead of geno
.
So, I have a branch of mccortex where geno is a valid command that should work with Mykrobe predictor.
https://github.com/phelimb/mccortex/tree/genotype
I'm not 100% sure what's causing this error but it seems to be a version clash between mccortex, or mykaltlas.
You have the correct mykatlas but the mccortex version should be v0.0.3-481-gbbe4edf-dirty
Which you can get manually by running
git clone -b genotype https://github.com/phelimb/mccortex
When I compile https://github.com/phelimb/mccortex/tree/genotype, I get the same version number mccortex=v0.0.3-482-g22410ea, not v0.0.3-481-gbbe4edf-dirty