Following the psipred installation instruction I have installed blast+ executables on G:\ drive along with the impala utility from legacy blast (makemat and copymat binary files) in bin folder and configured the environment variable to the path they were installed on then I have installed and untarred psipred on the same drive.
When I came across converting the runpsipred script into python to work on windows 7 machine I was stuck in understanding the underlying functionality of each linux command in the script ... I spent a lot of time trying to grasp the idea of certain commands but I had no luck.
I wrote the following code but is not yet completed as I'm having errors, but my main problem is that my code is not seeing psipred executables although it's there along with appropriate database required:
import os import sys print(os.getcwd()) os.chdir('G:\\psipred\\') print(os.getcwd()) os.system('set dbname=`uniref90.fasta`') os.system('set ncbidir=`G:\blast-2.7.1+\bin`') os.system('set execdir=`G:\psipred\bin`') os.system('set datadir=`G:\psipred\data`') os.system('set basename=`test_seq`') os.system('set rootname=`test_seq`') os.system('set hostid=`hostid`') print(os.system('set hostid =`hostid`')) print(os.system('set tmproot=psitmp$$$hostid')) os.system('copy -f test_seq.fasta $tmproot.fasta') os.system('ncbidir/psiblast -b 0 -j 3 -h 0.001 -v 5000 -d dbname -i tmproot.fasta -C tmproot.chk tmproot.blast')
This gives the following errors:
C:\Users\Al-Hammad\Desktop\SQP-IRS G:\psipred 0 0 The system cannot find the file specified. 'ncbidir' is not recognized as an internal or external command, operable program or batch file.
but when I do this:
import os import sys os.system('blastdbcmd -db uniref90 -entry nm_000122 -outfmt "%f" -out test_query.txt') os.system('blastn -query test_query.txt -db uniref90 -out output.txt') print ("Done !!")
things works perfectly which means blast+ executables are there and working !!
Can you please give me hints on how to convert this linux commands into cmd for windows ?! I'm not familiar with linux at all and really need to get this working on my machine? and how can I direct my python script to see psipred bin and data folders globally without having to modify installation environment variable ?!
I would be so grateful for any help.