I am building a script to import and analyze raw sample data generated in a bioassay.
For this, it is necessary to identify reference data and sample data and to set the corresponding dose range.
In my script I included a ‘sample info’ pop-up window in which operators can identify sample locations (Row x + x) and enter the desired dose-range for these samples. And this is where my struggle comes in!
The sample names are correctly added to the data table, but how do I get the dose points based on entered values in there?
The script should be able to calculate each dose point based on a starting concentration and dilution factor.
What I want it to look like (see 'Dose' column, manually entered for this example):
Any suggestions?
I am working in JMP 18, my script for the sample info pop up so far:
nw = New Window( "Sample info", << Modal,
H List Box(
Panel Box( "Enter Sample names",
V List Box(
Text Box( "Row A+E" ),
AE = Text Edit Box( "", << Set Width( 200 ) ),
Text Box( "Row B+F" ),
BF = val2 = Text Edit Box( "", << Set Width( 200 ) ),
Text Box( "Row C+G" ),
CG = val3 = Text Edit Box( "", << Set Width( 200 ) ),
Text Box( "Row D+H" ),
DH = val4 = Text Edit Box( "", << Set Width( 200 ) );
)
),
Spacer Box( Size( 10, 10 ) ),
V List Box(
Panel Box("Calculate dosepoints",
V List Box(
Text Box( "Start Conc. (ng/mL)" ),
Conc = Number Edit Box( ),
Text Box( "n Dosepoints" ),
nDP = Number Edit Box( 12 ),
Text Box( "Factor" ),
xF = Number Edit Box( 0.2 ),
)
),
Spacer Box( Size( , 8 ) ),
H List Box(
Spacer Box( Size( 77, 1 ) ),
Button Box("Ok",
val1 = AE << Get text ();
val2 = BF << Get text ();
val3 = CG << Get text ();
val4 = DH << Get text ();
val5 = Conc << Get ();
val6 = nDP << Get ();
val7 = xF << Get ();
Current Data Table() << New Column( "Sample", Character, "Nominal",
Formula(
Match( :Row,
"A", val1,
"E", val1,
"B", val2,
"F", val2,
"C", val3,
"G", val3,
"D", val4,
"H", val4
)
)
);
Current Data Table() << New Column( "Dose", Character, "Nominal",
//Formula( ????
// )
),
)
)
)
)
);
I have added an example Data table in which the above script should work.