Entering edit mode
4.0 years ago
shalinikaushik1293
▴
10
Hello, I am running my python program on two systems.
- Ubuntu 18.04.4 LTS (62.6 GiB, 64 bit)
- CentOS kernel Linux 2.6.32-504.16.2.el6.x86_64 GNOME2.28.2
I am running the python code given below:
import os
import shutil
from multiprocessing import Pool as ThreadPool
import multiprocessing as mp
import time
filepath = "/media/kakarot/ppi/unmodelled_fasta_1"
args = []
for filename in os.listdir("/media/kakarot/ppi/unmodelled_fasta_1"):
args.append(filename)
def protein(filename):
print(filename, ' started')
start = time.time()
current_file = filename
file_split=current_file.split('.')
print (filename)
path = "/media/kakarot/ppi/genthreader/"+ filename
# if not(os.path.isdir(path)):
# os.mkdir("/media/kakarot/ppi/genthreader/"+ filename)
############ for running psipred#################
# if not (os.path.isfile ('/media/kakarot/ppi/psipred/'+filename)):
os.system("csh /media/kakarot/ppi/psipred/runpsipred /media/kakarot/ppi/unmodelled_fasta_1/"+filename)
end = time.time()
print(filename, ' ended')
print('Time taken for ', filename,' : ', end-start)
def parallel(arguments):
pool = ThreadPool(mp.cpu_count())
pool.map(protein, arguments)
pool.close()
pool.join()
parallel(args)
print('finished')
The prebuilt runpsipred
script contains:
#!/bin/tcsh
# This is a simple script which will carry out all of the basic steps
# required to make a PSIPRED prediction. Note that it assumes that the
# following programs are in the appropriate directories:
# blastpgp - PSIBLAST executable (from NCBI toolkit)
# makemat - IMPALA utility (from NCBI toolkit)
# psipred - PSIPRED V4 program
# psipass2 - PSIPRED V4 program
# NOTE: Script modified to be more cluster friendly (DTJ April 2008)
# The name of the BLAST data bank
set dbname = /media/kakarot/ppi/genthreader/uniref_test_db/uniref100.fasta
# Where the NCBI programs have been installed
# NOTE: ensure you omit any trailing / from this setting or some terminals
# may seg fault
set ncbidir = /media/kakarot/ppi/ncbi/blast-2.2.26/bin
# Where the PSIPRED V4 programs have been installed
set execdir = /media/kakarot/ppi/psipred/bin
# Where the PSIPRED V4 data files have been installed
set datadir = /media/kakarot/ppi/psipred/data
set basename = $1:r
set rootname = $basename:t
# Generate a "unique" temporary filename root
set hostid = `hostid`
set tmproot = psitmp$$$hostid
\cp -f $1 $tmproot.fasta
echo "Running PSI-BLAST with sequence" $1 "..."
$ncbidir/blastpgp -b 0 -j 3 -h 0.001 -v 5000 -d $dbname -i $tmproot.fasta -C $tmproot.chk >& $tmproot.blast
if ($status != 0) then
tail $tmproot.blast
echo "FATAL: Error whilst running blastpgp - script terminated!"
exit $status
endif
echo "Predicting secondary structure..."
echo $tmproot.chk > $tmproot.pn
echo $tmproot.fasta > $tmproot.sn
$ncbidir/makemat -P $tmproot
if ($status != 0) then
echo "FATAL: Error whilst running makemat - script terminated!"
exit $status
endif
echo Pass1 ...
$execdir/psipred $tmproot.mtx $datadir/weights.dat $datadir/weights.dat2 $datadir/weights.dat3 > $rootname.ss
if ($status != 0) then
echo "FATAL: Error whilst running psipred - script terminated!"
exit $status
endif
echo Pass2 ...
$execdir/psipass2 $datadir/weights_p2.dat 1 1.0 1.0 $rootname.ss2 $rootname.ss > $rootname.horiz
if ($status != 0) then
echo "FATAL: Error whilst running psipass2 - script terminated!"
exit $status
endif
# Remove temporary files
echo Cleaning up ...
#\rm -f $tmproot.* error.log
echo "Final output files:" $rootname.ss2 $rootname.horiz
echo "Finished."
I am using psipred 4.0 version
.
The results produced in psipred folder (where runpsipred script is) in Ubuntu 18.04.4 LTS are
.mtx , .chk , .fasta, .sn, .pn, .
aux, .blast, .horiz, .ss2 and .ss files
while in CentOS system, the files created are only .horiz, .ss and .ss2 files
.
while I am required .chk and .mtx file for further process. Can anyone please help me with this? I will appreciate the help.