Hi,
I am very new to command line and I was trying to install a program called IS mapper on my server. There are instructions on how to pip install the program on the server but when I m trying to do so an error message comes up. I am sorry if this is a very silly request but I cant seems to find a solution myself.
Thank you in advance,
Maria
Well, I talked ahead of myself. The program was installed correctly but when i tried to test it with the recommended files an error came up again. I m sorry for taking up your time.
Here it is:
ismap --reads ERR225612_1.fastq.gz --queries IS_mapper/test/inputs/ISSsu3.fasta --typingRef IS_mapper/test/inputs/S_suis_P17.gbk --log --runtype typing --output S_suis
I actually tested the install for ISMapper earlier and there’s a bug in the part of the script that does the detection of which samtools version you’re running. I’ll submit a pull request with the author, but to fix this quickly, you can patch the code yourself.
You need to edit the file IS_Mapper/scripts/ismap.py, which you can find in the directory that you cloned from github.
Find the following lines:
if len(version_string) == 0:
print("Could not find Samtools")
raise IOError
if len(re.findall('1\.[0-9]\.[0-9]', version_string)):
version_id=re.findall('1\.[0-9]\.[0-9]{1,2}', version_string)[0]
print("Found samtools version {}".format(version_id))
self.version=1
else:
version_id=re.findall('0\.[0-9]\.[0-9]{1,2}', version_string)[0]
print("Found samtools version {}".format(version_id))
self.version=0
Replace them with:
if len(version_string) == 0:
print("Could not find Samtools")
raise IOError
if len(re.findall('\s1\.[0-9]', version_string)):
version_id=re.findall('1\.[0-9]', version_string)[0]
print("Found samtools version {}".format(version_id.lstrip(" ")))
self.version=1
elif len(re.findall('\s1\.[0-9]\.[0-9]', version_string)):
version_id=re.findall('1\.[0-9]\.[0-9]{1,2}', version_string)[0]
print("Found samtools version {}".format(version_id.lstrip(" ")))
self.version=1
else:
version_id=re.findall('\s0\.[0-9]\.[0-9]{1,2}', version_string)[0]
print("Found samtools version {}".format(version_id.lstrip(" ")))
self.version=0
Then, make sure you are in the directory that contains the cloned repo and reinstall ISMapper with pip: