3-state tutorial

Here is an example of a 3-state fit.  The data files are 3state.01.asc and 3state.02.asc  . The parameters used to synthesize the data are in 3state.true.par.  Please see the file tutorial.txt for an older but (relatively) more complete tutorial.  The aim for this tutorial is to read in the two denaturation curves and fit them globally to a three state denaturation model.  Characters that the user enters are in bold.  Program output/feedback is in regular font.  My added comments to this log file are in italics.

Some quick notes:

  • All Savuka commands consist of a two or three letter command followed by switches and/or input parameters.
  • The command switch (much like those in Unix) must be entered on the command line (contains the prompt "SA>")
  • The input parameters may be entered on the command line also.  If parameters are not given on the command line, the program will prompt the user for all parameters required by the command and optional switches.  In other words, if you are not sure what the input arguments are for a command you can simply hit return and expect to be prompted.  If you are unsure of which switch to use, consult the help manual.
  • The latest version of the help manual is online and may be accessed by entering help  or help command).
  • Savuka uses PGPLOT and GrWin (on Windows) for its graphic engine.  It can also handle X11 on Unix machines.  
protein 12% savuka
 

                  SAVUKA   Version 5.2.0
                    7/16/99  Irix/Linux

                 Copyright(C) 1991, 1996
          David G. Lambright and Osman Bilsel
 

  Enter:  "help"     to:   get info about commands
          "exit"           quit Savuka
          "clear -s"       re-dimension work space
          "!"              shell to system

  Questions?  E-mail osman@protein.chem.psu.edu

 MAX # OF BUFFERS=   256,  MAX # OF POINTS=  2048
SA> rea 3state.01.asc                                  # Read the data file 3state.01.asc.  Format is ASCII xy pairs. 
FIRST LINE TO READ = [  1 ]                            # The absence of an entry indicates that I accepted the default (1).
NUMBER OF LINES TO READ = [  2048 ]
STORE EVERY NTH LINE = [  1 ]
ROW VALUE ASSOCIATED WITH COLUMN = [  0.0000000E+00 ]  # The row-value is for multidimensional data (up to 5-dimensions).
SA> rea 3state.02.asc
FIRST LINE TO READ = [  1 ]
NUMBER OF LINES TO READ = [  2048 ]
STORE EVERY NTH LINE = [  1 ]
ROW VALUE ASSOCIATED WITH COLUMN = [  0.0000000E+00 ]
SA> dir                                   # The data is placed in buffers (similar to columns in a spreadsheet)
BUFFER  #POINTS ROW-VALUE            REMARKS
------  ------- ---------  --------------------------------
    1      50  0.0000E+00  3state.01.asc
    2      50  0.0000E+00  3state.02.asc
SA> pl      # define the active region (similar to selecting a block in a spreadsheet). 
FIRST BUFFER = [  1 ]
LAST BUFFER = [  2 ]
FIRST POINT = [  1 ]
LAST POINT = [  128 ] 50
 NOTE: USE "EXP" TO ACTIVATE PLOT LIMITS
SA> dr 1 2    # display the data graphically on the screen.  This command overlays all data on one plot.

SA> fun       # select a function to fit to the data.
 FUN> DEFINE A MODEL FUNCTION BY SELECTING ANY
 FUN> SEQUENCE OF THE FOLLOWING SUB-FUNCTIONS.

  Generic functions:
    CONSTANT (ADDITIVE) ........................1
    CONSTANT (MULTIPLICATIVE) .................30
    ZERO-TIME SHIFT ...........................26
    LINEAR ....................................27
    QUADRATIC .................................28
    EXPONENTIAL ................................2
    STRETCHED EXPONENTIAL ......................3
    GAUSSIAN ...................................4
    LORENTZIAN ................................40
    SIN  (A*sin(b*pi*x + d)  ..................80
    STERN-VOLMER (F/Fo) .......................55
  Exponentials convolved with Gaussians:
    CONSTANT W/ PULSE, t<to ....................5
    CONSTANT W/ PULSE, t>to ....................6
    EXPONENTIAL W/ PULSE .......................7
ENTER <CR> FOR MORE, "Q" TO QUIT DISPLAY:
  Kinetic models (w/o denaturant dependence):
    2A -> B -> C ...............................8
    2A -> 2B -> C ..............................9
    U <-> I <-> N .............................46
    U <-> I1 <-> I2 <-> N .....................24
    I1 <-> I2 <-> I3 <-> I4 <-> I5 ............44
    A + B -> C -> D  ..........................34
    A + B -> C -> D  with k-1 -> Kd ...........68
    2A -> B -> C  with k-1 -> Keq..............51
  Kinetic models (with denaturant dependence):
    2A -> B -> C ..............................10
    2U -> I -> N -> 2U ........................18
    2U <=> 2I <-> N <-> 2U ....................64
    2U <=> I <-> N <-> 2U .....................71
    2U -> 2I -> N -> 2U .......................19
    U <-> I <-> N .............................47
    U <-> I1 <-> I2 <-> N .....................25
    I1 <-> I2 <-> I3 <-> I4 <-> I5 ............45
ENTER <CR> FOR MORE, "Q" TO QUIT DISPLAY:
  Combined kinetic/equil models (w/ denat):
    U <-> I1 <-> I2* <-> I3 <-> N .............54
    U* <-> I1* <-> I2* <-> I3 <-> N ...........56
    U* <-> I1* <-> I2* <-> I3 <-> N (fix conc).70
    (U <-> I1)abc <-> N .......................66
    {U}abc <-> {I1}abc <-> N ..................67
    {U}abc <-> {I1}abc <-> {N}abc .............75
    {U}abc <-> {I1}abc <-> {N}abc .............77
    {U}abc <-> {I1}abc <-> {I2}abc <-> {N}abc..74
    {U}abcd <-> {I1}abcd <-> {I2}abcd<->{N}bc..84
    {U}abcd <-> {I1}abcd <-> {I2}abcd<->{N}ab..86
    {U}abcd <-> {I1}abcd <-> {I2}abcd<->{N}bc..91
    2U <-> N ..................................97
  Kinetic models (thermal):
    A -> B ....................................52
    2A -> B -> C ..............................83
  Kinetic models (denaturant + thermal):
    A -> B (Tanford denat binding).............53
    A -> B (linear).,,,,,,,,,,,,,,,............82
    2U <-> N ..................................96
  Equilibrium unfolding (denaturant):
    N <-> U  ..................................14
    N <-> I <-> U (w/ Z-value approx.).........11
    N <-> I <-> U (w/o Z-value approx.)........88
    N <-> I1 <-> I2 <-> U .....................21
    N <-> I1 <-> I2 <-> U (w/o Z-value approx.)89
    N <-> I1 (<-> D) <-> I2 <-> U .............79
    N <-> 2U ..................................15
    N <-> I <-> 2U ............................16
    N <-> 2I<-> 2U ............................69
    N <-> 3U  .................................41
    N3X3 <-> 3U + 3X  .........................72
    N <-> 4U ........ .........................93
    N <-> 2I <-> 4U ...........................95
  Equilibrium unfolding (denaturant;anisotropy):
    N <-> U  ..................................48
    N <-> I <-> U .............................49
    N <-> I1 <-> I2 <-> U .....................85
    N <-> I <-> U (w/o Z-value approx.)........92
    N <-> I1 <-> I2 <-> I3 <-> U ..............87
  Equilibrium unfolding (thermal):
    N -> U ....................................35
    N -> I -> U ...............................36
    N -> 2U ...................................37
    N -> I -> 2U ..............................38
    N -> 2I -> 2U .............................39
    N <-> 3U  .................................43
  Equilibrium unfolding (thermal+denaturant):
    N -> 2U ...................................94
ENTER <CR> FOR MORE, "Q" TO QUIT DISPLAY:
  Ultracentrifugation:
    Eq sedimentation single ideal species .....59
    Eq sedimentation single non-ideal species..60
    Monomer-dimer eq sedimentation ............57
    Monomer-dimer-trimer-tetramer eq sediment..58
  Custom models:
    Trp Repressor kinetic model 1 .............12
    Trp Repressor kinetic model 2 .............13
    Ras P21-ternary complex 2-state eq unfold..42
    Ras P21-binary  complex 2-state eq unfold..61
    Ras P21+APOP21 complex 2-state eq unfold...62
    2M + nH <-> MHn <-> DHn ...................33
    Exponential w/ denaturant dependence.......22
    N <-> I <-> 2U  KIN->EQ ...................17
    I1 <-> I2 <-> I3 <-> I4 <-> I5  KIN->EQ....50
    2-Site binding model ......................76
    Glorias 2-active form w 3-ionizable grps ..78
  Time-resolved anisotropy models:
    Ivv or Ivh, EXPONENTIAL ...................20
    Ivv or Ivh, GLOBALIZED A -> B .............23
    Ivv or Ivh, GLOBALIZED A -> B -> C ........29
    Ivv or Ivh, GLOBALIZED {A} -> {B} -> C.....90
    Ivv or Ivh, GLOBALIZED B <-> A -> C .......31
    Ivv or Ivh, ELLIPSOID .....................32
SUB-FUNCTION # (ENTER "0" TO END) = [  0 ] 11            # function 11 is the 3-state equilibrium model
SUB-FUNCTION # (ENTER "0" TO END) = [  0 ]
SA> lp                                                   # list parameters of the model

 LP> ENTER "0" WHEN DONE
LP> ENTER BUFFER NUMBER = [  1 ]                  # each parameter is described by a buffer number and parameter number
 BUFFER    1  [ 0.0000000E+00] 3state.01.asc      # each parameter also has a link, either to itself or another parameter
     1           Gni (Kcal/mol)            0.000000       1     1 VAR
     2       Ani (Kcal/mol/[D])            0.000000       1     2 VAR
     3           Giu (Kcal/mol)            0.000000       1     3 VAR
     4       Aiu (Kcal/mol/[D])            0.000000       1     4 VAR
     5 SLOPE OF NATIVE BASELINE            0.000000       1     5 VAR
     6 Y-INT OF NATIVE BASELINE            0.000000       1     6 VAR
     7 SLOPE OF UNFOLDED BASELIN           0.000000       1     7 VAR
     8 Y-INT OF UNFOLDED BASELIN           0.000000       1     8 VAR
     9              Z PARAMETER            0.000000       1     9 VAR
    10          TEMPERATURE (K)            0.000000       1    10 FIXED

 LP> ENTER "0" WHEN DONE
LP> ENTER BUFFER NUMBER = [  2 ]
 BUFFER    2  [ 0.0000000E+00] 3state.02.asc       #  buffer parameter var/fixed
     1           Gni (Kcal/mol)            0.000000       1     1 VAR # note that this parameter is linked to Gni of buff 1
     2       Ani (Kcal/mol/[D])            0.000000       1     2 VAR #  "     "    "      "      "    "    " Ani  "   "  "
     3           Giu (Kcal/mol)            0.000000       1     3 VAR # etc.
     4       Aiu (Kcal/mol/[D])            0.000000       1     4 VAR
     5 SLOPE OF NATIVE BASELINE            0.000000       2     5 VAR # by default, optical properties are not global.
     6 Y-INT OF NATIVE BASELINE            0.000000       2     6 VAR
     7 SLOPE OF UNFOLDED BASELIN           0.000000       2     7 VAR
     8 Y-INT OF UNFOLDED BASELIN           0.000000       2     8 VAR
     9              Z PARAMETER            0.000000       2     9 VAR
    10          TEMPERATURE (K)            0.000000       1    10 FIXED # temperature is global and fixed.

 LP> ENTER "0" WHEN DONE
LP> ENTER BUFFER NUMBER = [  3 ] 0
SA> ap            # alter/adjust parameters, allows you to enter parameter values/initial guesses.

 AP> ENTER "0" WHEN DONE
AP> ENTER BUFFER NUMBER = [  1 ]
 AP> BUFFER NUMBER     1          [ 0.0000000E+00]
 AP> <CR> TO RETAIN CURRENT VALUES
Gni (Kcal/mol) = [  0.0000000E+00 ] 4
Ani (Kcal/mol/[D]) = [  0.0000000E+00 ] 1
Giu (Kcal/mol) = [  0.0000000E+00 ] 7
Aiu (Kcal/mol/[D]) = [  0.0000000E+00 ] 2
SLOPE OF NATIVE BASELINE = [  0.0000000E+00 ]
Y-INT OF NATIVE BASELINE = [  0.0000000E+00 ]
SLOPE OF UNFOLDED BASELINE = [  0.0000000E+00 ]
Y-INT OF UNFOLDED BASELINE = [  0.0000000E+00 ] 11
Z PARAMETER = [  0.0000000E+00 ] .6
TEMPERATURE (K) = [  0.0000000E+00 ] 298.15

 AP> ENTER "0" WHEN DONE
AP> ENTER BUFFER NUMBER = [  2 ]
 AP> BUFFER NUMBER     2          [ 0.0000000E+00]
 AP> <CR> TO RETAIN CURRENT VALUES
Gni (Kcal/mol) = [      4.0000000 ]    # note how the linked parameters are automatically updated: it's the same parameter
Ani (Kcal/mol/[D]) = [      1.0000000 ]
Giu (Kcal/mol) = [      7.0000000 ]
Aiu (Kcal/mol/[D]) = [      2.0000000 ]
SLOPE OF NATIVE BASELINE = [  0.0000000E+00 ]
Y-INT OF NATIVE BASELINE = [  0.0000000E+00 ]
SLOPE OF UNFOLDED BASELINE = [  0.0000000E+00 ]
Y-INT OF UNFOLDED BASELINE = [  0.0000000E+00 ] 11
Z PARAMETER = [  0.0000000E+00 ] .3
TEMPERATURE (K) = [    298.1500000 ]

 AP> ENTER "0" WHEN DONE
AP> ENTER BUFFER NUMBER = [  3 ] 0
SA> mod    # calculate the model function
SA> sd 1    # change the plotting so that the data and model are superimposed. (How good are the initial guesses?)
SA> dr 1 2


SA> rms -p 1 -last 10    # let's estimate the noise level in the data from the last 10 points.  -p 1 indicates linear.
FIRST BUFFER = [  1 ]
LAST BUFFER = [  2 ]
 POLYNOMIAL COEFICIENTS
 SA> C(0) =  0.9121461E+01
 SA> C(1) = -0.8887876E-01
 BUFFER=    1  RMS DEVIATION=     0.0170229  AVERAGE=     0.0000000
 POLYNOMIAL COEFICIENTS
 SA> C(0) =  0.9092176E+01
 SA> C(1) = -0.1034156E+00
 BUFFER=    2  RMS DEVIATION=     0.0326645  AVERAGE=     0.0000000
SA> fit        # all set to start a least squares fit.  This uses the Marquardt algorithm.
ITERATION LIMIT = [  10 ]
 ITERATIONS=    0, RCHISQ= 19952.8249714
 ITERATIONS=    1, RCHISQ=  1194.4691027, %CHANGE=  94.01353
 ITERATIONS=    2, RCHISQ=  1025.1202235, %CHANGE=  14.17775
 ITERATIONS=    3, RCHISQ=   899.5766963, %CHANGE=  12.24671
 ITERATIONS=    4, RCHISQ=   813.7570586, %CHANGE=   9.54000
 ITERATIONS=    5, RCHISQ=   758.0014120, %CHANGE=   6.85163
 ITERATIONS=    6, RCHISQ=   654.9079986, %CHANGE=  13.60069
 ITERATIONS=    7, RCHISQ=   513.8801550, %CHANGE=  21.53399
 ITERATIONS=    8, RCHISQ=   361.4956974, %CHANGE=  29.65370
 ITERATIONS=    9, RCHISQ=   190.5288375, %CHANGE=  47.29430
 ITERATIONS=   10, RCHISQ=    93.3173257, %CHANGE=  51.02194

 %-----------FIT INFO AND STATISTICS-----------%

    DATA FROM FILE 3state.01.asc
    RANGE OF POINTS USED FOR FIT:    1   50
    MARQUARDT NON-LINEAR LEAST-SQUARES FIT
    NUMERICAL PARTIAL DERIVATIVES
    MATRIX INVERSION BY GAUSS-JORDAN
    CORRESPONDING DATA RANGE:       0.0000,       9.0000
    ITERATION LIMIT REACHED BEFORE CONVERGENCE
    FIT TOLERANCE =   1.0000000000000000E-04
    TOTAL # OF DATA POINTS =          100
    TOTAL # OF VAR PARAMETERS =           14
    NO. DEGREES OF FREEDOM =           86
    CHI-SQUARED=    8025.290006970623
    REDUCED CHI-SQUARED =    93.31732566244911
    GOODNESS OF FIT =   0.0000000000000000E+00

 %---------------   PARAMETERS  ---------------%
 

                                    value             stddev     dependency

 >> BUFFER     1 [   0.00000E+00] 3state.01.asc
            Gni (Kcal/mol) =      3.0393096  +/-      0.2655361  0.9514315
----- ENTER <CR> TO CONTINUE OR Q TO QUIT -----  :
        Ani (Kcal/mol/[D]) =      1.5838682  +/-      0.1114942  0.9418988
            Giu (Kcal/mol) =      7.2939581  +/-      1.3015531  0.9625408
        Aiu (Kcal/mol/[D]) =      1.7726415  +/-      0.3088753  0.9619133
  SLOPE OF NATIVE BASELINE =     -0.8172158  +/-      0.2879918  0.8787121
  Y-INT OF NATIVE BASELINE =      1.2169147  +/-      0.1122522  0.6606653
 SLOPE OF UNFOLDED BASELIN =     -0.0107279  +/-      0.0281425  0.8862934
 Y-INT OF UNFOLDED BASELIN =      9.3120813  +/-      0.1996915  0.9021817
               Z PARAMETER =      0.9160288  +/-      0.0206363  0.8134253
           TEMPERATURE (K) =    298.1500000

 >> BUFFER     2 [   0.00000E+00] 3state.02.asc
            Gni (Kcal/mol) =      3.0393096  +/-      0.2655361  0.9514315
        Ani (Kcal/mol/[D]) =      1.5838682  +/-      0.1114942  0.9418988
----- ENTER <CR> TO CONTINUE OR Q TO QUIT -----  :
            Giu (Kcal/mol) =      7.2939581  +/-      1.3015531  0.9625408
        Aiu (Kcal/mol/[D]) =      1.7726415  +/-      0.3088753  0.9619133
  SLOPE OF NATIVE BASELINE =     -0.5685914  +/-      0.2963942  0.8670376
  Y-INT OF NATIVE BASELINE =      1.1900560  +/-      0.1986495  0.6804628
 SLOPE OF UNFOLDED BASELIN =      0.0790031  +/-      0.0652208  0.9034655
 Y-INT OF UNFOLDED BASELIN =      8.6038054  +/-      0.4773007  0.9142960
               Z PARAMETER =      0.5522232  +/-      0.0559888  0.8516585
           TEMPERATURE (K) =    298.1500000

 FILE FOR STATISTICS:
FILE ALREADY EXISTS, OVERWRITE? [N]:
SA> fit    # didn't converge.  Let's try some more iterations.
ITERATION LIMIT = [  10 ]
 ITERATIONS=    0, RCHISQ=    93.3173257
 ITERATIONS=    1, RCHISQ=    61.5332220, %CHANGE=  34.06024
 ITERATIONS=    2, RCHISQ=    42.5853628, %CHANGE=  30.79289
 ITERATIONS=    3, RCHISQ=    26.1556747, %CHANGE=  38.58060
 ITERATIONS=    4, RCHISQ=     1.6750747, %CHANGE=  93.59575
 ITERATIONS=    5, RCHISQ=     0.9804490, %CHANGE=  41.46834
 ITERATIONS=    6, RCHISQ=     0.9803469, %CHANGE=   0.01042
 ITERATIONS=    7, RCHISQ=     0.9803469, %CHANGE=   0.00000

 %-----------FIT INFO AND STATISTICS-----------%

    DATA FROM FILE 3state.01.asc
    RANGE OF POINTS USED FOR FIT:    1   50
    MARQUARDT NON-LINEAR LEAST-SQUARES FIT
    NUMERICAL PARTIAL DERIVATIVES
    MATRIX INVERSION BY GAUSS-JORDAN
    CORRESPONDING DATA RANGE:       0.0000,       9.0000
    CHISQ CONVERGED IN            7 ITERATIONS
    FIT TOLERANCE =   1.0000000000000000E-04
    TOTAL # OF DATA POINTS =          100
    TOTAL # OF VAR PARAMETERS =           14
    NO. DEGREES OF FREEDOM =           86
    CHI-SQUARED=    84.30983142524234
    REDUCED CHI-SQUARED =   0.9803468770377016                # This is close to 1, a pretty good fit.
    GOODNESS OF FIT =   0.5313977911240007

 %---------------   PARAMETERS  ---------------%
 

                                    value             stddev     dependency

 >> BUFFER     1 [   0.00000E+00] 3state.01.asc
            Gni (Kcal/mol) =      6.0507302  +/-      0.0560609  0.9545390
----- ENTER <CR> TO CONTINUE OR Q TO QUIT -----  :
        Ani (Kcal/mol/[D]) =      3.0154808  +/-      0.0270514  0.9531400
            Giu (Kcal/mol) =      3.9656738  +/-      0.0625010  0.9593446
        Aiu (Kcal/mol/[D]) =      0.9886546  +/-      0.0149034  0.9578601
  SLOPE OF NATIVE BASELINE =      0.1212495  +/-      0.0156092  0.8182932
  Y-INT OF NATIVE BASELINE =      0.9931683  +/-      0.0110327  0.6779617
 SLOPE OF UNFOLDED BASELIN =     -0.0903052  +/-      0.0039520  0.9159318
 Y-INT OF UNFOLDED BASELIN =      9.9357623  +/-      0.0298294  0.9304619
               Z PARAMETER =      0.7530495  +/-      0.0035151  0.8453717
           TEMPERATURE (K) =    298.1500000

 >> BUFFER     2 [   0.00000E+00] 3state.02.asc
            Gni (Kcal/mol) =      6.0507302  +/-      0.0560609  0.9545390
        Ani (Kcal/mol/[D]) =      3.0154808  +/-      0.0270514  0.9531400
----- ENTER <CR> TO CONTINUE OR Q TO QUIT -----  :
            Giu (Kcal/mol) =      3.9656738  +/-      0.0625010  0.9593446
        Aiu (Kcal/mol/[D]) =      0.9886546  +/-      0.0149034  0.9578601
  SLOPE OF NATIVE BASELINE =      0.1361729  +/-      0.0201031  0.8488802
  Y-INT OF NATIVE BASELINE =      0.9764976  +/-      0.0189499  0.6971704
 SLOPE OF UNFOLDED BASELIN =     -0.1036810  +/-      0.0089232  0.9258739
 Y-INT OF UNFOLDED BASELIN =     10.0264725  +/-      0.0688860  0.9352576
               Z PARAMETER =      0.2413364  +/-      0.0065508  0.8412052
           TEMPERATURE (K) =    298.1500000

 FILE FOR STATISTICS: 3state.fit.sta    # This saves the output we just saw to a file. Values are correct.
SA> wp 3state.fit.par    # save the parameter file.  This is the most important thing to save.
SA> sca 1 2 1            # let's scan through the curves one by one (instead of overlaying).

SA> sd 2                 # let's change the plot style so that residuals are drawn also.
SA> sca 1 2 1



SA> wr 3state.01.mod     # we can save the fit curve and the residuals to separate xy ascii files.
WR> FORMAT (XY,XYE) [XY]:
WR> BUFFER# TO WRITE = [  1 ]
WR> DATA(D), MODEL(M), OR RESIDUALS(R)?: m
SA> wr 3state.02.mod
WR> FORMAT (XY,XYE) [XY]:
WR> BUFFER# TO WRITE = [  1 ] 2
WR> DATA(D), MODEL(M), OR RESIDUALS(R)?: m
SA>
SA> wr 3state.01.res
WR> FORMAT (XY,XYE) [XY]:
WR> BUFFER# TO WRITE = [  1 ]
WR> DATA(D), MODEL(M), OR RESIDUALS(R)?: r
SA> wr 3state.02.res
WR> FORMAT (XY,XYE) [XY]:
WR> BUFFER# TO WRITE = [  1 ] 2
WR> DATA(D), MODEL(M), OR RESIDUALS(R)?: r
SA>
SA>
SA> quit    # exit Savuka and return to Unix shell.
 

Subpages (1): 3-state simulated data
Comments