The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 switch command and script/function execution
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

willis@aec

USA
1 Posts

Posted - 04/11/2001 :  7:12:42 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello All,
Hi. I am a Biochemistry graduate student at Albert Einstein College of Medicine in New York. In a nutshell, I am studying protein-DNA interactions and use origin regularly to fit my experimental data. Importantly. I have recently switched from a UNIX program (NONLIN) to Origin for data fitting. Initially, this was not a problem because I could rewrite my UNIX functions fairly simply into Origin format with 5 total parameters (energy, temperature, hill coefficient, upper limit and lower limit) and one each independent (protein concentration) and dependent variables (fractional saturation). However, I recently have attempted to write a function that contains 2 independent variables, one for the titrated protein concentration and a second for the SITE on the DNA that is being bound by protein(s). I have written the function using the SWITCH command because it is used when more than 2 possibilities are included in a script. My problems are as follows:
1) How do you assign a second independent variable (In this case, SITE)?
2) How do you tell the function to choose which SITE is being occupied when all I have to direct it is specific protein titration data sets?
3) What is missing from the conversion of NONLIN (UNIX) format to the Origin Switch command? Below I have included the NONLIN function followed by my rewritten Switch function.
I can be reached at cloutier@aecom.yu.edu or 718-430-2860. Any help is greatly appreciated and I thank you very much in advance.

Sincerely,
Tim Cloutier

NONLIN:
c**********************************************************************
FUNCTION FX (ANS, X, Y, IERR, N)
c Function for fitting a two-site system with heterologous proteins.
c In this system the binding site for the second protein cannot be
c discerned.
c x(1) is the protein being titrated and x(2) is the protein being held
c constant.
c The multiple data sets being analyzed have are assumed to have been
c individually scaled. The format is x(1) = TBP, x(2) = TF, x(3) =
c site/competency
c ANS(1) = Delta G1
c ANS(2) = Delta G2
c ans(3) = Delta G12

REAL ANS(4),k1,k2,k12,X(3),Z,RT
integer site,comp
RT = ans(4)
k1 = exp(-ans(1)/RT)
k2 = exp(-ans(2)/RT)
k12 = exp(-ans(3)/RT)
site = x(3) / 10.
comp = mod(x(3),10.)

c Binding polynomial

Z = 1 + k1*x(1) + k2*x(2) + k1*k2*k12*x(1)*x(2)

c Binding equations

if(site.eq.1)then
fx = (k1*x(1) + k1*k2*k12*x(1)*x(2)) / Z
elseif(site.eq.2)then
fx = (k2*x(2) + k1*k2*k12*x(1)*x(2)) / Z
endif

RETURN
END

ORIGIN:

/*still need to define site as independent variable somehow*/
site = TBP
RT = 1.98E-3 * (C+273.33);
k1 = exp(-dGT/RT);
k2 = exp(-dG7/RT);
k12 = exp(-dGC/RT);
m = 1 + k1*x1 + k2*x2 + k1*k2*k12*x1*x2;

switch (site) {
case 1:
site = TBP;
y = (k1*x1 + k1*k2*k12*x1*x2) / m;
break;
case 2:
site = B70;
y = (k2*x2 + k1*k2*k12*x1*x2) / m;
break;
};

greg

USA
1380 Posts

Posted - 04/12/2001 :  1:53:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You may not be aware that Origin supports both Multiple Dependent and Multiple Independent variables in the fitter. There is an excellent example of using Multiple Independent Variables in the User's Manual on page 617. This information can also be found in the online Origin Help file. Click the Find tab and search for:
"Some General Notes on the Advanced Mode of the Nonlinear Least Squares Curve Fitter".
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000