+ using new parsers now
[qpalma.git] / scripts / predictAll.sh
1 #!/bin/bash
2
3 instance_ctr=1
4
5 for instance in `ls -1 run*.pickle`
6 do
7 instance_dir=${instance/\.pickle/}
8
9 rt="/fml/ag-raetsch/home/fabio/tmp/QPalma"
10 newest_param=`ls -t ${rt}/${instance_dir}/param_* | head -n1`
11 echo $newest_param
12
13 script=predictAll_${instance_ctr}.py
14
15 echo "from qpalma_main import QPalma" >> $script
16 echo "import sys" >> $script
17 echo "from cPickle import *" >> $script
18 echo "import io_pickle" >> $script
19 echo "dataset = io_pickle.load('/fml/ag-raetsch/home/fabio/svn/projects/QPalma/scripts/dataset_20k')" >> $script
20
21 echo "ma=load(open('${instance}'))" >> $script
22 echo "ma.run['dataset_filename'] = dataset" >> $script
23
24 #echo "ma.run['training_begin'] = 0" >> $script
25 #echo "ma.run['training_end'] = 100" >> $script
26
27 echo "ma.run['prediction_begin'] = 0" >> $script
28 echo "ma.run['prediction_end'] = 20000" >> $script
29
30 echo "ma.run['min_intron_len'] = 20" >> $script
31 echo "ma.run['max_intron_len'] = 2000" >> $script
32 echo "ma.run['min_svm_score'] = 0.0 " >> $script
33 echo "ma.run['max_svm_score'] = 1.0" >> $script
34 echo "ma.run['min_qual'] = -5" >> $script
35 echo "ma.run['max_qual'] = 40" >> $script
36 echo "qpalma1 = QPalma(ma.run)" >> $script
37 echo "qpalma1.evaluate('${newest_param}',dataset)" >> $script
38
39 script_startup=${script}_startup
40
41 echo "source ~/.bashrc" >> $script_startup
42 echo "export ILOG_LICENSE_FILE=/fml/ag-raetsch/share/software/ilog/ilm/access2.ilm" >> $script_startup
43 echo "python $script" >> $script_startup
44
45
46 echo python $script_startup | qsub -l h_vmem=3.0G -cwd -j y -N inst_${instance}.log
47
48 instance_ctr=$((instance_ctr+1))
49 done