Fitting Protein Thermal Unfolding Measurements to a Two-State Transition

DESCRIPTION

	This notebook will fit temperature (x)-induced changes in ellipticity, fluorescence, absorption, or other optical parameters (y) to a two-state transition, yielding the differences between the folded and unfolded enthalpy (DHm) and entropy (DSm) at the transition mid-point (Tm), the slopes of the curve before (mN) and after (mU) the transition, and the zero temperature optical values for the fully folded (thetaN) and unfolded (thetaU) forms of the protein.  
	
	y = (thetaN+mN*x)+(Exp-[(DHm+x*DSm)/(R*x)]))*(thetaU+mU*x)
	                             1+ Exp(-[(DHm+x*DSm)/(R*x)])
	                             
	Strictly, the enthalpy and entropy terms are only meaningful if the unfolding transition is reversible and the measurements are made under conditions of equilibrium.
	
	 The notebook will also generate graphs of the data and the fitted curve,  statistical information on the goodness of the fit, and a measure of the cooperativity of the transition (DT). A table of points is produced to permit export of the theoretical curve.															                                        			        		
    			   					                                        			        		INSTRUCTIONS

	Hit the down arrow to move from cell to cell and press "enter" (not "return") to execute each calculation. 
	
	If you wish to enter data manually, use the notebook titled "ThermaUnfold-manual2.nb". The present notebook will read in a Jasco data file. Set the directory containing the Jasco file in the first line below. In the second line put the name of your file in the quotation marks.  The third line calculates the number of points in your file. The 4th line strips the absorbance measurements from the file and converts temperatures in Celcius to degrees Kelvin.  The original Jasco file was edited to introduce carriage returns after each set of points.

SetDirectory["~/Documents/JOE/Mathematica/470Lab"];

list1=ReadList["termaldenatRNase-05-ed.txt",Number,RecordLists->True];

totalres1=Length[list1]

shortlist1=Table[{273.15+list1[[res,1]],list1[[res,2]]},{res,1,totalres1}]

Clear[thetaN,thetaU,mN,mU,deltaH,deltaS,DT,modelY5,NLR,param,lp1,x]

lp1=ListPlot[shortlist1,PlotStyle->{PointSize[0.02`]},FrameStyle->{Thickness[0.01`]},PlotRange->Automatic,Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

<<"NonlinearRegression`"

R=8.315

modelY5:=((thetaN+((mN)*(x)))+((Exp[((-deltaH)/(R*x))+(deltaS/R)])*(thetaU+((mU)*(x)))))/((1)+(Exp[((-deltaH)/(R*x))+(deltaS/R)]))

modelY5

Users: Enter your best guesses after each parameter in the line below:

NLR=NonlinearRegress[shortlist1,modelY5, {{deltaH,372430},{deltaS,1089},{thetaN,-23.5},{thetaU,5},{mN,0.085},{mU,-0.005}},{x}, MaxIterations->10000,ShowProgress ->False ]

param=BestFitParameters/.NLR

deltaH=deltaH/.param
deltaS=deltaS/.param
mN=mN/.param 
mU=mU/.param 
thetaN=thetaN/.param
thetaU=thetaU/.param

Plot[modelY5,{x,280,380},PlotStyle->{Thickness[0.01`]},FrameStyle->{Thickness[0.01`]},PlotRange->Automatic,Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

Show[%,lp1]

The next line calculates the transition mid-point in degrees Kelvin:

Tm=deltaH/deltaS

Next we calculate the Temperature range for 80% of the transition.  This corresponds to Keq = 0.25 to 4.0, and is a measure of the cooperativity of the transition.

K:=Exp[((-deltaH)/(R*x))+(deltaS/R)]

K

Solve[K==0.25,x]

x/.%

Solve[K==4.0,x]

x/.%

%-%%%

DT=%

The next line calculates points from the theoretical curve in case you want to graph the curve in another application:

theor=Table[{x,modelY5},{x,280,380,0.10}]

The next line exports a file containing the theoretical points just calculated. Name the exported file between the 1st set of quotes below:

Export["termaldenatRNase-05-edfit.txt",theor,"Table"]

Just to confirm, here are graphs of the theoretical points and the data.

ListPlot[theor,PlotStyle->{PointSize[0.01`]},FrameStyle->{Thickness[0.01`]},PlotRange->Automatic,Frame->True,RotateLabel->False,FrameLabel->{"Temperature","Theta"},Axes->False,BaseStyle->{14,FontFamily->"Times"}]

Show[%,lp1]

Clear[thetaN,thetaU,mN,mU,deltaH,deltaS,DT,modelY5,lp1,NLR, param, x]

END