nathanclark111
YaBB Newbies
Offline
Feed your monkey!
Posts: 6
|
I'm working on modeling evolutionary rates for 2 genes jointly in a linear relationship. Starting with codon models I model their rates using 2 global parameters defining the line ('slope' and 'y-intercept'). I'm trying to add a new feature in which the variable "slope" is optimized as its tangent. I want to test if this will help with convergence problems.
The error is encountered when trying to implement this. I added the tangent function into the ReplicateConstraint command and now it will not work. Simply removing the "Tan()" makes the script work again. I hope this is a simple syntax error. THANKS in advance for anyone who can help!
Here is the single offending line of code: ReplicateConstraint ("this1.?.nonSynRate := Tan(slope) * this2.?.synRate * this3.?.nonSynRate / this4.?.synRate + yint * this5.?.synRate", Tree1, Tree1, Tree2, Tree2, Tree1);
Here is the error message I get: Bad Binary Operator Placement: (Tan(slope)) *? Tree1.dmel.synRate ...etc
Here is more context of the offending code: global slope = 0; global slope :> -3.14159; global slope :< 3.14159; global yint = 0; global yint :> -1e25; ReplicateConstraint ("this1.?.nonSynRate := Tan(slope) * this2.?.synRate * this3.?.nonSynRate / this4.?.synRate + yint * this5.?.synRate", Tree1, Tree1, Tree2, Tree2, Tree1); Optimize (corrA_params, LF); lnL_A0 = corrA_params[1][0]; fprintf (stdout , "corrA\t" , corrA_params[1][1] , "\t" , corrA_params[1][0] , "\tyint=" , yint,"\tslope=" , (Tan(slope)) , "\n");
|