I am in need of help editing a script originally developed to pull microbial growth parameters from a Logistic 4P model (Fit Curve Platform). I would like to edit the script to pull parameters from each treatment "strain, media, replicate", see desired output for what I would like. I am obviously missing some important language in the script but I am not clear how to do this. A scripting answer would be great! Please help!
This is the error I am getting:
"Subscript problem in access or evaluation of 'r[Outline Box(Parameter Estimates"),Number Col Box("Estimate",1)]', r]/*###*/Outline Box( "Parameter Estimates" ), Number Col Box( "Estimate", 1 )]
Script I would like to edit - "Extract Critical Values"
Script for desired output table - "Desired Output"
Extract Critical Values
Names Default To Here(1);
// Determine coefficients of Logistic 4P model, for estimation of growth parameters.
// This assumes that the current data table contains the data of interest, and that:
// the column containing the time values is labeled "Time (h)"
// the column containing the data values is labeled "Ln OD600"
// the column containing “strain” and “media” and “replicate” are grouping columns
//
// The names can be changed in the lines below,
// or the code can be changed to add a file dialog and a column selection,
// or the code can be changed to loop through multiple Y columns.
// First step: Fit Logistic 4P curve to data, store results in object Test.
Test = Fit Curve(
Y( :Ln OD600 ),
X( :Name( "Time (h)" ) ),
By( :Strain, :Media, :Replicate ),
Fit Logistic 4P
);
// 2nd step: Send report to variable r.
r = Test<<REPORT></REPORT>
I think that there is an unnecessary level of subscripting in the display tree that is causing the error. Here is an example of what I mean:
a = GrowthRate = r[outlinebox("Parameter Estimates"),NumberColBox("Estimate",1)] << get(1);
I think that removing the last level will avoid the error:
a = GrowthRate = r[outlinebox("Parameter Estimates"),NumberColBox("Estimate")] << get(1);Hi @markbailey
Thanks for the help but I am still getting the same error. I removed the last level or the "1" after "Estimate". Any other suggestions are welcome!
Here is an example of how I do it.
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
fc = dt << Fit Curve(
Y( :weight ),
X( :height ),
Fit Exponential 2P
);
fcr = fc << Report;
{ a, b } = fcr["Parameter Estimates"][NumberColBox("Estimate")] << Get;