1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 """
25 Settings
26 ========
27
28 This module provides global settings as fields. Throughout Biskit a
29 (environment-dependent) parameter such as, e.g., ssh_bin can be addressed as:
30
31 >>> import Biskit.settings as S
32 >>> bin = S.ssh_bin
33
34 However, since a user should not be required to hack python modules,
35 ssh_bin is not actually defined in settings.py. Instead, the value is
36 taken from C{~/.biskit/settings.cfg} -- which should have an entry
37 like C{ssh_bin=/bin/ssh # comment}. If this entry (or the config file)
38 is not found, settings.py uses the default value from
39 C{biskit/external/defaults/settings.cfg}.
40
41 If missing, the user configuration file C{~/.biskit/settings.cfg} is
42 created automatically during the startup of Biskit (i.e. for any
43 import). The auto-generated file only contains parameters for which
44 the default values don't seem to work (invalid paths or binaries).
45
46 See L{Biskit.SettingsManager}
47
48 Summary for Biskit users
49 ------------------------
50 If you want to change a biskit parameter, do so in C{~/.biskit/settings.cfg}
51
52 Summary for Biskit developpers
53 ------------------------------
54 If you want to create a new user-adjustable parameter, do so in
55 C{biskit/external/defaults/settings.cfg}.
56
57 Summary for all
58 ---------------
59 !Dont't touch C{settings.py}!
60 """
61 import Biskit as B
62 import Biskit.tools as T
63 import Biskit.SettingsManager as M
64
65 import user, sys
66
67 __CFG_DEFAULT = T.projectRoot() + '/external/defaults/settings.cfg'
68 __CFG_USER = user.home + '/.biskit/settings.cfg'
69
70 try:
71 m = M.SettingsManager(__CFG_DEFAULT, __CFG_USER, createmissing=True )
72
73 m.updateNamespace( locals() )
74
75 except Exception, why:
76 B.EHandler.fatal( 'Error importing Biskit settings')
77
78
79
80
81 python_bin = sys.executable
82 xterm_bin = T.absbinary('xterm')
83 projectRoot= T.projectRoot()
84
85 pymol_scripts = projectRoot + '/external/pymol/'
86
87
88
89
90
91
92
93
94 env = {}
95
96 blast_env = {'BLASTDB':'/home/Bis/raik/data/prog/blast/db',
97 'BLASTMA':'/home/Bis/johan/APPLICATIONS/blast'}
98
99 amber_env = {'AMBERHOME_8':'/Bis/shared/rh73/amber8_intel-7.1'}
100
101 env.update(blast_env)
102 env.update(amber_env)
103
104
105
106
107 del B, T, M, user, sys
108 del __CFG_DEFAULT, __CFG_USER, m
109