This script analyzes a folder full of dose-response data stored as text files, perhaps from an instrument. It creates a single file that tabulates the logEC50 values along with the standard error and the R square of the fit.
Script command |
Comments |
SetPath “c:\data\june21\” |
This sets the disk and directory to be used for the rest of the file. |
OpenOutput results.txt |
Create a file called results.txt to contain the output. |
Table Text |
Start a tab delimited text table in that file. |
Open dr.pzfx |
Open the Prism file dr.pzfx |
ForEach dr*.txt |
Loop for all files that begin with dr, have the extension .txt, and are located in the disk and directory defined by the SetPath command. |
Goto D |
Go to the data section, to the data table last visited. |
ClearTable |
Erase all data from the table. |
Import |
Import the file defined by the ForEach statement into the first empty columns. |
WTable “File name” %F |
Write the file name into the output file. |
Wtable “logEC50”, 5, 1 |
Write to the output table the value on the fifth row, first Y column (A), and label that column of the table “logEC50”. |
WTable “SE of logEC50”, 11, 1 |
Write the SE of the logEC50 (from the 11th row of results) into the next column. |
Wtable “R2”, 21, 1 |
Write the R2 value into the next column. |
Next |
Loop back to the ForEach statement and read the next file. Exit loop if no more files. |
Beep |
Signal completion. |