got rid of all disembl parameters as they were pointless to change dues to the fact...
[jabaws.git] / binaries / src / disembl / DisEMBL.py
index f6187bf..d9618e2 100644 (file)
@@ -12,14 +12,13 @@ import os
 from os import system,popen3
 
 relpath = re.sub("/DisEMBL.py$","",argv[0])
-cwd = re.sub("/$","", os.getcwd())
-newpath =cwd+"/"+relpath+"/biopython-1.50"
+# cwd = re.sub("/$","", os.getcwd())
+newpath = relpath + "/biopython-1.50"
 sys.path.append(newpath)
 
 from Bio import File
 from Bio import Fasta
 
-
 import fpformat
 import tempfile
 
@@ -131,25 +130,25 @@ def reportSlicesTXT(slices, sequence):
 
 def runDisEMBLpipeline():
     try:
-        smooth_frame = int(sys.argv[1])
-        peak_frame = int(sys.argv[2])
-        join_frame = int(sys.argv[3])
-        fold_coils = float(sys.argv[4])
-        fold_hotloops = float(sys.argv[5])
-        fold_rem465 = float(sys.argv[6])
-        #file = str(sys.argv[7])
+        smooth_frame = 8
+        peak_frame = 8
+        join_frame = 4
+        fold_coils = 1.2
+        fold_hotloops = 1.4
+        fold_rem465 = 1.2
+        mode = 'scores'
         try:
-            mode = sys.argv[7]
+            file = open(sys.argv[1],'r')
         except:
             mode = 'default'
     except:
-        print '\nDisEMBL.py smooth_frame peak_frame join_frame fold_coils fold_hotloops fold_rem465 sequence_file [mode]\n'
-        print 'A default run would be: ./DisEMBL.py 8 8 4 1.2 1.4 1.2  fasta_file'
+        print '\nDisEMBL.py sequence_file \n'
+        print 'A default run would be: ./DisEMBL.py fasta_file'
         print 'Mode: "default"(nothing) or "scores" which will give scores per residue in TAB seperated format'
         raise SystemExit
-    db = sys.stdin
+    #db = sys.stdin
     parser = Fasta.RecordParser()
-    iterator = Fasta.Iterator(db,parser)
+    iterator = Fasta.Iterator(file,parser)
     while 1:
         try:
             cur_record = iterator.next()
@@ -178,6 +177,7 @@ def runDisEMBLpipeline():
                 raise SystemExit
         except AttributeError:
             break
+    file.close()
     return
 
 runDisEMBLpipeline()