+ update makefiles to fetch automatically valid Python includes and libs
[qpalma.git] / qpalma / gridtools.py
index 57f4da3..6aeb856 100644 (file)
@@ -188,8 +188,6 @@ class AlignmentTask(ClusterTask):
 
       num_splits = self.settings['num_splits']
 
-      jp = os.path.join
-
       dataset_fn           = self.settings['prediction_dataset_fn']
       prediction_keys_fn   = self.settings['prediction_dataset_keys_fn']
 
@@ -246,16 +244,11 @@ class TrainingTask(ClusterTask):
 
       """
 
-      jp = os.path.join
-
       dataset_fn     = self.settings['training_dataset_fn']
-      training_keys  = cPickle.load(open(self.settings['training_dataset_keys_fn']))
-
-      print 'Found %d keys for training.' % len(training_keys)
 
       set_name = 'training_set'
 
-      current_job = KybJob(gridtools.AlignmentTaskStarter,[self.settings,dataset_fn,training_keys,set_name])
+      current_job = KybJob(gridtools.TrainingTaskStarter,[dataset_fn,self.settings,set_name])
       current_job.h_vmem = '2.0G'
       current_job.express = 'True'
 
@@ -270,11 +263,11 @@ class TrainingTask(ClusterTask):
       pass
 
 
-def TrainingTaskStarter(settings,dataset_fn,training_keys,set_name):
+def TrainingTaskStarter(dataset_fn,settings,set_name):
    accessWrapper = DataAccessWrapper(settings)
    seqInfo = SeqSpliceInfo(accessWrapper,settings['allowed_fragments'])
    qp = QPalma(seqInfo)
-   qp.init_training(dataset_fn,training_keys,settings,set_name)
+   qp.init_training(dataset_fn,settings,set_name)
    return 'finished prediction of set %s.' % set_name