+ minor changes
[qpalma.git] / python / Configuration.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import numpy.matlib
5
6 fixedParam = numpy.matlib.mat([[ 0.62870709], [ 0.7012026 ], [ 0.60236784],
7 [ 0.51316259], [ 0.20220814], [ 0.70324863], [ 0.37218684], [ 0.82178927],
8 [ 0.60394866], [ 0.70371272], [ 0.07548074], [ 0.63412803], [ 0.97442266],
9 [ 0.13216791], [ 0.71041168], [ 0.2093887 ], [ 0.35227344], [ 0.3405142 ],
10 [ 0.69677236], [ 0.41673747], [ 0.564245 ], [ 0.37613432], [ 0.88805642],
11 [ 0.88691608], [ 0.69476752], [ 0.81659504], [ 0.17801859], [ 0.71048235],
12 [ 0.08188783], [ 0.54884803], [ 0.84039558], [ 0.6982093 ], [ 0.41686176],
13 [ 0.38568873], [ 0.29401347], [ 0.12704074], [ 0.30640858], [ 0.89578031],
14 [ 0.84621571], [ 0.11783439], [ 0.0944695 ], [ 0.34081575], [ 0.44157643],
15 [ 0.77847185], [ 0.04283567], [ 0.45107823], [ 0.89789891], [ 0.41045519],
16 [ 0.49073531], [ 0.29727627], [ 0.94711483], [ 0.24898204], [ 0.26181212],
17 [ 0.71760957], [ 0.60326883], [ 0.80887576], [ 0.09448718], [ 0.88064525],
18 [ 0.84317654], [ 0.48893703], [ 0.24847021], [ 0.84203596], [ 0.34104156],
19 [ 0.75604701], [ 0.91703057], [ 0.69325475], [ 0.61276969], [ 0.16335226],
20 [ 0.4684374 ], [ 0.16553371], [ 0.79594434], [ 0.6440283 ], [ 0.80922237],
21 [ 0.5349296 ], [ 0.31924316], [ 0.10960695], [ 0.40151062], [ 0.50473641],
22 [ 0.14812671], [ 0.73523169], [ 0.35141625], [ 0.80364238], [ 0.02128181],
23 [ 0.0061226 ], [ 0.34541924], [ 0.07694485], [ 0.05551339], [ 0.23087636],
24 [ 0.87016395], [ 0.31682377], [ 0.27375113], [ 0.72226332], [ 0.62914149],
25 [ 0.59236012], [ 0.2070238 ], [ 0.52390942], [ 0.11894098], [ 0.55725917],
26 [ 0.72706009], [ 0.087196 ], [ 0.04745082], [ 0.95636492], [ 0.31524576],
27 [ 0.79685218], [ 0.80386771], [ 0.70942604], [ 0.82869417], [ 0.26906569],
28 [ 0.51848039], [ 0.64169354], [ 0.07114973], [ 0.39249454], [ 0.07002803],
29 [ 0.94667567], [ 0.02252752], [ 0.01039039], [ 0.5721312 ], [ 0.06065969],
30 [ 0.69422476], [ 0.4310939 ], [ 0.03069099], [ 0.35969779], [ 0.18047331],
31 [ 0.4177651 ], [ 0.01360547], [ 0.29069319]])
32
33 ###########################################################
34 #
35 # The parameters for the QPalma algorithm
36 #
37 #
38
39 C = 1.0
40
41 # 'normal' means work like Palma 'using_quality_scores' means work like Palma
42 # plus using sequencing quality scores
43
44 #mode = 'normal'
45 mode = 'using_quality_scores'
46
47 # Here we specify the total number of parameters.
48
49
50 # When using quality scores our scoring function is defined as
51 #
52 # f: S x R x S -> R
53 #
54 # as opposed to a usage without quality scores when we only have
55 #
56 # f: S x S -> R
57 #
58 numDonSuppPoints = 30
59 numAccSuppPoints = 30
60 numLengthSuppPoints = 30
61 numQualSuppPoints = 10
62
63 if mode == 'normal':
64 sizeMMatrix = 36
65 numQualPlifs = 0
66 elif mode == 'using_quality_scores':
67 sizeMMatrix = 36
68 numQualPlifs = 5*5
69 else:
70 assert False, 'Wrong operation mode specified'
71
72 totalQualSuppPoints = numQualPlifs*numQualSuppPoints
73
74 numFeatures = numDonSuppPoints + numAccSuppPoints\
75 + numLengthSuppPoints + sizeMMatrix + totalQualSuppPoints
76
77 iter_steps = 2
78 remove_duplicate_scores = False
79 print_matrix = False
80 anzpath = 2