+ small script for plotting fraction of wrong reads for each possible overlap
[qpalma.git] / scripts / ModelSelection.py
1 #!/usr/bin/env python
2 # -*- coding:latin-1 -*-
3
4 import cPickle
5 import os
6 import os.path
7 import time
8
9 from qpalma_main import QPalma
10 import Experiment as Exp
11
12 class Model:
13
14 allInstances = []
15
16 def __init__(self):
17 pass
18
19 def createInstances(self):
20
21 allRuns = Exp.createRuns()
22
23 for currentRun in allRuns:
24
25 currentInstance = QPalma(currentRun)
26
27 #print 'instance created, starting to pickle configuration...'
28 name = currentRun['name']
29 instance_fn = 'run_%s.pickle'%name
30 fh = open(instance_fn,'w+')
31 cPickle.dump(currentInstance,fh)
32 fh.close()
33
34 self.allInstances.append(instance_fn)
35
36
37 def doSelection(self):
38 for instance in self.allInstances:
39 time.sleep(3)
40 #os.system('echo ./resurrect %d | qsub -l h_vmem=1.0G -cwd -j y -N \"model_%d.log\"'%(idx,idx))
41 os.system('echo "./resurrect %s >out_%s.log 2>err_%s.log &"'%(instance,instance,instance))
42
43
44 if __name__ == '__main__':
45 m = Model()
46 m.createInstances()
47 m.doSelection()