ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/help/osprai-doc.html
(Generate patch)
# Line 20 | Line 20
20   </h2>
21  
22   <h3>
23 < 1. Software installation
23 > Software installation
24   </h3>
25   OSPRAI is written in Python so as to run on all popular platforms, including Linux, Windows, and Macintosh.
26   Install Python 2.4 (or newer) and the following libraries: python-tk, matplotlib, and scipy.
# Line 37 | Line 37
37  
38  
39   <h3>
40 < 2. Viewing data from an SPR file
40 > Viewing data from an SPR file
41   </h3>
42   Analysis begins with viewing data generated by a biosensor instrument such as a Biacore or Plexera.
43   Launch a python interpreter such as the standard interpreter or IPython and navigate to the directory containing the OSPRAI code and example data files.
44   Enter the following commands to load and view an example data file.
45  
46   <pre>
47 < >>> from osprai_one import *
48 < >>> ba1 = readicmtxt("example-icm.txt")
49 < <em>This ICM files has 6034 datapoints for 25 ROIs.</em>
50 < >>> linegraph(ba1)
47 > <code>from osprai_one import *
48 > <code>ba1 = readicmtxt("example-icm.txt")
49 > <kbd>This ICM files has 6034 datapoints for 25 ROIs.</kbd>
50 > <code>linegraph(ba1)
51   <img src="figure02.png">
52   </pre>
53  
# Line 68 | Line 68
68   The window must be closed in order to continue the execution of Osparai commands
69  
70   <h3>
71 < 3. Calibration and background subtraction
71 > Calibration and background subtraction
72   </h3>
73   Data produced by a biosensing instrument can be reported as angle shift, reflectance, wavelength shift, resonance units (RU), or other units.
74   This data can come from a single surface or channel, in which case the bulk refractive index changes of the samples and washes can be seen, or it may be the difference between two surfaces or channels.
# Line 76 | Line 76
76   Enter the following commands for calibration and referencing.
77  
78   <pre>
79 < >>> ba2 = calibrate(ba1, ba1, 2850, 3120, 1333000, 1334000)
80 < >>> linegraph(ba2, "Calibrated SPR Data")
79 > <code>ba2 = calibrate(ba1, ba1, 2850, 3120, 1333000, 1334000)
80 > <code>linegraph(ba2, "Calibrated SPR Data")
81   <img src="figure03a.png">
82 < >>> bgset(ba2, 16)
83 < >>> ba3 = bgsubt(ba2)
84 < >>> dotgraph(ba3, "Referenced SPR Data")
82 > <code>bgset(ba2, 16)
83 > <code>ba3 = bgsubt(ba2)
84 > <code>dotgraph(ba3, "Referenced SPR Data")
85   <img src="figure03b.png">
86 < >>> dualgraph(ba2, ba3, "Unreferenced and Referenced SPR Data")
86 > <code>dualgraph(ba2, ba3, "Unreferenced and Referenced SPR Data")
87   <img src="figure03c.png">
88   </pre>
89  
# Line 98 | Line 98
98   Function <samp>dotgraph()</samp> provides a slightly different display, with dotted data points instead of continuous lines.
99   Function <samp>dualgraph()</samp> displays both dotted and continuous sensorgrams.
100   This feature is useful for comparing two related Biosensor_array objects of the same size.
101
101  
102   <h3>
103 < 4. Data simulation
103 > Data simulation
104   </h3>
105   Now we will create some simulated sensorgrams using a simple 1:1 interaction model.
106   ...the model is a reference to a function...
107   ...the parameters are provided as a list of lists...
108  
109   <pre>
110 < >>> reset
111 < >>> from osprai_one import *
112 < >>> dpar = {}
113 < >>> dpar['t1'] = dict(value=30.0, min=30.0, max=30.0, fixed='fixed')
114 < >>> dpar['rmax'] = dict(value=100.0, min=1.0, max=1000.0, fixed='fixed')
115 < >>> dpar['conc'] = dict(value=1e-5, min=1e-12, max=1e1, fixed='fixed')
116 < >>> dpar['cofa'] = dict(value=1.0, min=1e-10, max=1e10, fixed='fixed')
117 < >>> dpar['kon'] = dict(value=2e4, min=1e1, max=1e10, fixed='fixed')
118 < >>> dpar['t2'] = dict(value=150.0, min=150.0, max=150.0, fixed='fixed')
119 < >>> dpar['koff'] = dict(value=1e-2, min=1e-5, max=1e-1, fixed='fixed')
120 < >>> dpar['t3'] = dict(value=270.0, min=270.0, max=270.0, fixed='fixed')
121 < >>> dpar
122 < <em>{'cofa': {'fixed': 'fixed', 'max': 10000000000.0, 'min': 1e-010, 'value
110 > <code>reset
111 > <code>from osprai_one import *
112 > <code>dpar = {}
113 > <code>dpar['t1'] = dict(value=30.0, min=30.0, max=30.0, fixed='fixed')
114 > <code>dpar['rmax'] = dict(value=100.0, min=1.0, max=1000.0, fixed='fixed')
115 > <code>dpar['conc'] = dict(value=1e-5, min=1e-12, max=1e1, fixed='fixed')
116 > <code>dpar['cofa'] = dict(value=1.0, min=1e-10, max=1e10, fixed='fixed')
117 > <code>dpar['kon'] = dict(value=2e4, min=1e1, max=1e10, fixed='fixed')
118 > <code>dpar['t2'] = dict(value=150.0, min=150.0, max=150.0, fixed='fixed')
119 > <code>dpar['koff'] = dict(value=1e-2, min=1e-5, max=1e-1, fixed='fixed')
120 > <code>dpar['t3'] = dict(value=270.0, min=270.0, max=270.0, fixed='fixed')
121 > <code>print dpar
122 > <kbd>{'cofa': {'fixed': 'fixed', 'max': 10000000000.0, 'min': 1e-010, 'value
123   'conc': {'fixed': 'fixed','max': 10.0,'min': 1.0e-012,'value': 1.0e-005},
124   'koff': {'fixed': 'fixed','max': 0.1,'min': 1.0e-005,'value': 0.01},
125   'kon': {'fixed': 'fixed','max': 10000000000.0,'min': 10.0,'value': 20000.0},
126   'rmax': {'fixed': 'fixed', 'max': 1000.0, 'min': 1.0, 'value': 100.0},
127   't1': {'fixed': 'fixed', 'max': 30.0, 'min': 30.0, 'value': 30.0},
128   't2': {'fixed': 'fixed', 'max': 150.0, 'min': 150.0, 'value': 150.0},
129 < 't3': {'fixed': 'fixed', 'max': 270.0, 'min': 270.0, 'value': 270.0}}</em>
129 > 't3': {'fixed': 'fixed', 'max': 270.0, 'min': 270.0, 'value': 270.0}}</kbd>
130  
131 < >>> ba1 = BiosensorArray(3,300)
132 < >>> for roi in ba1.roi:
133 < >>>     roi.time = arange(300, dtype=float)  ## Samples every 1 second.
134 < >>>     roi.value = zeros(300, dtype=float) + 20  ## Baseline signal is 20 units.
135 < >>>     roi.params = deepcopy(dpar)
136 < >>>     roi.model = simple1to1
137 < >>> ba1.roi[0].params['cofa']['value'] = 1.0 / 27
138 < >>> ba1.roi[1].params['cofa']['value'] = 1.0 / 9
139 < >>> ba1.roi[2].params['cofa']['value'] = 1.0 / 3
140 < >>> for roi in ba1.roi:
141 < >>>     roi.value = roi.model(roi.time, roi.value, roi.params)
142 < >>> dotgraph(ba1, "Simulation")
131 > <code>ba1 = BiosensorArray(3,300)
132 > <code>for roi in ba1.roi:
133 > <code>    roi.time = arange(300, dtype=float)  ## Samples every 1 second.
134 > <code>    roi.value = zeros(300, dtype=float) + 20  ## Baseline signal is 20 units.
135 > <code>    roi.params = deepcopy(dpar)
136 > <code>    roi.model = simple1to1
137 > <code>ba1.roi[0].params['cofa']['value'] = 1.0 / 27
138 > <code>ba1.roi[1].params['cofa']['value'] = 1.0 / 9
139 > <code>ba1.roi[2].params['cofa']['value'] = 1.0 / 3
140 > <code>for roi in ba1.roi:
141 > <code>    roi.value = roi.model(roi.time, roi.value, roi.params)
142 > <code>dotgraph(ba1, "Simulation")
143   <img src="figure04.png">
144   </pre>
145  
146  
147   <h3>
148 < 5. Curve-fitting
148 > Curve-fitting
149   </h3>
150   Osprai uses a modified version of the Levenberg-Marquardt least-squares algorithm (LMA) for fitting parameters.
151   The function <samp>mcmla()</samp> provides LMA fitting on multiple curves with constrained parameters.
# Line 154 | Line 153
153   In this example, we constrain the <var>rmax</var> parameter to deliberately produce incorrect <var>kon</var> and <var>koff</var> parameter results.
154  
155   <pre>    
156 < >>> ba2 = deepcopy(ba1)
157 < >>> ba2.roi[0].params['rmax'] = {'value':10.0, 'min':1.0, 'max':80.0, 'fixed':'float'}
158 < >>> ba2.roi[0].params['kon']['fixed'] = 'float'
159 < >>> ba2.roi[0].params['koff']['fixed'] = 'float'
160 < >>> ba2.roi[1].params['rmax']['fixed'] = 0
161 < >>> ba2.roi[1].params['kon']['fixed'] = 0
162 < >>> ba2.roi[1].params['koff']['fixed'] = 0
163 < >>> ba2.roi[2].params['rmax']['fixed'] = 0
164 < >>> ba2.roi[2].params['kon']['fixed'] = 0
165 < >>> ba2.roi[2].params['koff']['fixed'] = 0
166 < >>> mclma(ba2.roi)
167 < <em>0 koff 0.0100 kon 20000.0000 rmax 10.0000 1 2 ssq 1477505.8
156 > <code>ba2 = deepcopy(ba1)
157 > <code>ba2.roi[0].params['rmax'] = {'value':10.0, 'min':1.0, 'max':80.0, 'fixed':'float'}
158 > <code>ba2.roi[0].params['kon']['fixed'] = 'float'
159 > <code>ba2.roi[0].params['koff']['fixed'] = 'float'
160 > <code>ba2.roi[1].params['rmax']['fixed'] = 0
161 > <code>ba2.roi[1].params['kon']['fixed'] = 0
162 > <code>ba2.roi[1].params['koff']['fixed'] = 0
163 > <code>ba2.roi[2].params['rmax']['fixed'] = 0
164 > <code>ba2.roi[2].params['kon']['fixed'] = 0
165 > <code>ba2.roi[2].params['koff']['fixed'] = 0
166 > <code>mclma(ba2.roi)
167 > <kbd>0 koff 0.0100 kon 20000.0000 rmax 10.0000 1 2 ssq 1477505.8
168   0 koff 0.0100 kon 20000.0000 rmax 10.0000 1 2 ssq 1477505.8
169   0 koff 0.0100 kon 20000.0000 rmax 10.0000 1 2 ssq 1477505.8
170   0 koff 0.0100 kon 20000.0000 rmax 10.0000 1 2 ssq 1477505.8
# Line 195 | Line 194
194   0 koff 0.0081 kon 28199.1282 rmax 80.0000 1 2 ssq 22541.3
195   0 koff 0.0081 kon 28199.1335 rmax 80.0000 1 2 ssq 22541.3
196   0 koff 0.0081 kon 28199.1282 rmax 80.0000 1 2 ssq 22541.3
197 < 0 koff 0.0081 kon 28198.8747 rmax 80.0000 1 2 ssq 22541.3</em>
197 > 0 koff 0.0081 kon 28198.8747 rmax 80.0000 1 2 ssq 22541.3</kbd>
198  
199 < >>> for roi in ba2.roi:
200 < >>>     roi.value = roi.model(roi.time, roi.value, roi.params)
201 < >>> dualgraph(ba1, ba2, "Fitted Data with an incorrect rmax constraint")
199 > <code>for roi in ba2.roi:
200 > <code>    roi.value = roi.model(roi.time, roi.value, roi.params)
201 > <code>dualgraph(ba1, ba2, "Fitted Data with an incorrect rmax constraint")
202   <img src="figure05a.png">
203   </pre>
204  
# Line 251 | Line 250
250  
251  
252   <h3>
253 < 6. File format conversion
253 > File format conversion
254   </h3>
255   ...examples of formats...
256  
# Line 283 | Line 282
282   <hr>
283   <i>
284   Written by Christopher Lausted <br>
285 < 21 July 2010 <br>
285 > 30 July 2010 <br>
286   Institute for Systems Biology <br>
287 + <small style="color:Gray">Tested in Firefox 3.6.8</small>
288   </i>
289  
290   </html>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines