+ update makefiles to fetch automatically valid Python includes and libs
[qpalma.git] / qpalma / qpalma_main.py
index afc32d1..daf1975 100644 (file)
@@ -138,8 +138,8 @@ class QPalma:
          print string
 
 
-   def init_training(self,dataset_fn,training_keys,settings,set_name):
-      full_working_path = jp(settings['training_dir'],run_name)
+   def init_training(self,dataset_fn,settings,set_name):
+      full_working_path = jp(settings['training_dir'],set_name)
 
       #assert not os.path.exists(full_working_path)
       if not os.path.exists(full_working_path):
@@ -263,6 +263,7 @@ class QPalma:
 
             dna_calc = dna_calc.replace('-','')
 
+
             #print 'right before computeSpliceWeights exampleIdx %d' % exampleIdx
             # Calculate the weights
             trueWeightDon, trueWeightAcc, trueWeightIntron =\
@@ -297,9 +298,9 @@ class QPalma:
 
             ps = h.convert2SWIG()
 
-            newSpliceAlign, newEstAlign, newWeightMatch, newDPScores,\
-            newQualityPlifsFeatures, unneeded1, unneeded2 =\
+            newSpliceAlign, newEstAlign, newWeightMatch, newDPScores, newQualityPlifsFeatures, unused1, unused2 =\
             performAlignment(dna,read,quality,mmatrix,donor,acceptor,ps,qualityPlifs,num_path[exampleIdx],False,settings)
+
             mm_len = settings['matchmatrixRows']*settings['matchmatrixCols']
 
             # check for correct reshaping !!
@@ -375,11 +376,7 @@ class QPalma:
 
                if False:
                   self.plog("Is considered as: %d\n" % true_map[1])
-
-                  #result_len = currentAlignment.getResultLength()
-
                   dna_array,est_array = currentAlignment.getAlignmentArraysNew()
-
                   _newSpliceAlign = newSpliceAlign[0].flatten().tolist()[0]
                   _newEstAlign = newEstAlign[0].flatten().tolist()[0]
 
@@ -397,6 +394,7 @@ class QPalma:
 
             # call solver every nth example / added constraint
             #if exampleIdx != 0 and exampleIdx % numConstPerRound == 0:
+            if True:
                objValue,w,self.slacks = solver.solve()
                solver_call_ctr += 1