ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/osprai/osprai/trunk/sphinx/tutorial01.rst
(Generate patch)
# Line 1 | Line 1
1   .. Osprai tutorial #1
2     Chris Lausted 110202
3  
4 < =================
4 >    
5   OSPRAI Tutorial 1
6   =================
7  
# Line 10 | Line 10
10  
11   Analysis begins with viewing data generated by a biosensor instrument such as a Biacore or Plexera.
12   Launch a python interpreter such as the standard interpreter or IPython and navigate to the directory containing the OSPRAI code and example data files.
13 < Enter the following commands to load and view an example data file.
14 <
15 < .. parsed-literal::
13 > Enter the following commands to load and view an example data file::
14  
15     >>> from osprai_one import *
16     >>> ba1 = readicmtxt("example-icm.txt")
# Line 37 | Line 35
35   An arbitrary list of ROIs can be specified by clicking the "Choose..." button.
36   The window must be closed in order to continue the execution of Osparai commands
37  
38 +
39   Calibration and background subtraction
40   --------------------------------------
41  
42   Data produced by a biosensing instrument can be reported as angle shift, reflectance, wavelength shift, resonance units (RU), or other units.
43   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.
44   The example file used here is uncalibrated and unreferenced.  
45 < Enter the following commands for calibration and referencing.
47 <
48 < .. parsed-literal::
45 > Enter the following commands for calibration and referencing::
46  
47     >>> ba2 = calibrate(ba1, ba1, 2850, 3120, 1333000, 1334000)
48     >>> linegraph(ba2, "Calibrated SPR Data")
# Line 56 | Line 53
53    
54   .. image:: ./images/figure03b.png
55  
56 < .. parsed-literal::
56 > ::
57  
58     >>> dualgraph(ba2, ba3, "Unreferenced and Referenced SPR Data")
59    
# Line 64 | Line 61
61  
62   Function ``calibrate()`` uses the data in ``ba1`` to calibrate the data in ``ba1`` and place it in a new object ``ba2``.
63   The two-point calibration uses the time points (t1,t2) where the refractive indices (n1,n2) are known.
64 < In this case, we use t1=2850s with n1=1333000 <i>&#181</i>RIU, and t2=3120 with n2=1334000.
64 > In this case, we use t1=2850s with n1=1333000 |uRIU|, and t2=3120 with n2=1334000.
65   Function ``bgset()`` is used to specify one ROI as the reference for all ROIs in the ba object.
66   In this case, ROI number 16 is used.
67   No data is affected by this step.
# Line 74 | Line 71
71   Function ``dualgraph()`` displays both dotted and continuous sensorgrams.
72   This feature is useful for comparing two related Biosensor_array objects of the same size.
73  
74 +
75   Data simulation
76   ---------------
77  
78   Now we will create some simulated sensorgrams using a simple 1:1 interaction model.
79 < ...the model is a reference to a function...
80 < ...the parameters are provided as a list of lists...
81 <
84 < .. parsed-literal::
79 > *(the model is a reference to a function)*
80 > *(the parameters are provided as a list of lists)*
81 > ::
82  
83     >>> reset
84     >>> from osprai_one import *
# Line 126 | Line 123
123   Osprai uses a modified version of the Levenberg-Marquardt least-squares algorithm (LMA) for fitting parameters.
124   The function ``mcmla()`` provides LMA fitting on multiple curves with constrained parameters.
125   The use of constraints can improve speed and eliminate nonsense solutions such as negative values for binding kinetic rate parameters.
126 < In this example, we constrain the ``rmax`` parameter to deliberately produce incorrect ``kon`` and ``koff`` parameter results.
130 <
131 < .. parsed-literal::
126 > In this example, we constrain the ``rmax`` parameter to deliberately produce incorrect ``kon`` and ``koff`` parameter results::
127  
128     >>> ba2 = deepcopy(ba1)
129     >>> ba2.roi[0].params['rmax'] = {'value':10.0, 'min':1.0, 'max':80.0, 'fixed':'float'}
# Line 201 | Line 196
196   Functions are provided to read and write several Biacore and Plexera file formats.
197   Optionally, microarray annotations can be added to the SPR data from GAL or Key files.
198   These annotations are saved when data files are written, if the file format provides support.
199 < Examples are given below.
205 <
206 < .. parsed-literal::
199 > Examples are given below::
200  
201     >>> ba = readbiosensor("example-biosensor.txt")
202     This Biosensor file has 9 datapoints for 2 ROIs.
# Line 217 | Line 210
210     >>> writebiosensor(ba, "testwritebiosensor.txt")
211  
212  
220
213   Online help
214   -----------
215   The Python ``help()`` function can be used at any time to display the online documentation for all Osprai functions and classes.
# Line 226 | Line 218
218  
219     >>> import osprai_one
220     >>> help(osprai_one)
229  
221     Help on module osprai_one:
222  
223 <   **NAME**
223 >   NAME
224        osprai_one
225      
226 <   **FILE**
227 <      *( ...many pages of documentation follow... )*
226 >   FILE
227 >      ( ...many pages of documentation follow... )
228  
229     >>> help(linegraph)
239
230     Help on function linegraph in module vu_module:
231 <
232 <   **linegraph**(baLine, title='')
233 <    Graph data of baLine using lines.
234 <
235 <
236 <
231 >  
232 >   linegraph(baLine, title='')
233 >        Display signal vs time using continuous lines.
234 >        
235 >        :param baLine: Object containing the data.
236 >        :type baLine: ba_class
237 >        :param title: Title to place above the graph.
238 >        :type title: str
239 >        :returns: nothing
240 >
241 >
242 > .. End of tutorial.
243 >
244 > .. Define a Greek character code that will trim off a trailing space.
245 > .. |mu|  unicode:: U+003BC .. GREEK SMALL LETTER MU :rtrim:
246 > .. Another useful definition.
247 > .. |uRIU| unicode:: U+003BC RIU .. Micro-refractive index units.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines