RNAThink
MEDDATA RESEARCH, INC.
Contents
1- Algorithm
2- Input Data Files
3- Implementation
4- User’s Guide
5- Installation Guide
RNAThink is a platform independent JAVA program that computes piece-wise-linear estimates of normalized values form a set of measured dilution values based on given control data and dilution factor.
The control data set (a column of data up to 12 elements) and the associated dilution value set (a column of data up to 12 elements starting with 96) will be used together to compute the relative (e.g. normalized) dilution value for each of the data elements. We will get an 8 by 60 matrix of relative dilution value. Then the average and standard deviation of each column of the relative dilution value will be computed to get the normalized values.
To compute the normalized dilution value, first we compute the relative dilution value as follows. The relative dilution value for each data element is calculated by interpolating the control values. Suppose a data element has a value Y. First, an interval (X1, X2] in the control data set is found such that X1 < Y £ X2. Also, suppose the dilution values for X1 and X2 are D1 and D2, respectively. Then, the relative Dr dilution value for Y will be calculated by linear interpolation:
Dr = D1 + ( D2 – D1 ) * ( Y – X1 ) / ( X2 – X1 )
The normalized dilution value, Dn, is then computed by dividing Dr by the dilution value of the row in which the data element is (assume it is D). This happens when Y is not in the same row with X1 or X2. For instance, X1 is on the second row, X2 is on the first row, but Y is on the third row. The normalized dilution value is:
Dn = [D1 + ( D2 – D1 ) * ( Y – X1 ) / ( X2 – X1 ) ] / D
Finally, the average and standard deviation for each column of the normalized
dilution values are computed. At this time, users have the option to save
the results into files. BACK TO TOP
Each data file must be in the following format in order to be correctly processed (Figure 1). The file has a matrix of 8 rows and up to 60 columns of experimental data. The first row starts with “1 (first dilution)”, the second with “2 (2nd dilution)”…, and the last starts with “8 (eighth dilution)”.
Following these substrings are the data elements, which are separated with Tabs. Data holes (missing data elements in the data set) are allowed.
There should also be 4 rows starting with “dilution A”, “dilution B”, “dilution C”, and “dilution D” right in front of the row with “1 (first dilution)”.
Following these substrings is an optional column of experimental data. The first column of the 8 by 60 matrix and the optional column after “dilution A” etc., will be used as the control data set. There is a dilution amount corresponding to each row. Optionally, we can have another row starting with “dilution factor”. Following this substring (and a Tab) is the optional dilution factor value. This is the place to set another dilution factor other than the default value of 0.5. The dilution value for the row with “dilution A” is set to 96. The dilution value of each row is determined by multiplying the dilution factor to the dilution value of the previous row. So, in the case the dilution factor is 0.5, the dilution value is set to 48
Figure 1. Sample data file
for the row with “dilution B”, 24 for the row with “dilution C”, 12 for the row with “dilution D”, 6 for the row of “1 (first dilution)”, 3 for the row of “2 (2nd dilution)”, and so on. Row “8 (eighth dilution)” has the value of 0.046875 for the dilution value. The substrings mentioned above are case sensitive. Each one of the substrings should appear only once in the file. BACK TO TOP
This program is implemented with Java AWT in an event driven manner. It is a standalone application that can be run on both Windows NT and Mac systems. The compiler used for both systems is CodeWarrior released by Metrowerks Corporation (http://www.metrowerks.com). However, there are minor differences between the execution on the two systems. For instance, since the roundup effects are not the same for method “format” of class java.text.DecimalFormat, there might be a slight difference between the results of Mac and Windows NT.
The Graphical User Interface (GUI) of this program includes two panels and a menu bar. On either of the panels, there is a display area and a button. The buttons are used to trigger events and the display areas are used to show the data processing information and final result.
Altogether there are six classes: The main public class is RnaThink; Class CloseWindowAndExit is a window adapter used to control window closing and project exit; Class PanelSeparator is used in ButtonPanel to separate button and the display area for a better visual effect; Class ButtonPanel contains the button to trigger event; Class MessageDialog and PromptDialog are used to display interactive messages to the users and get response from the user.
The program processes data files in a batch style. Users can specify a directory as the data file directory. The program then tries to process each data file in this directory. BACK TO TOP
Following are the notes on how to use the RNAThink. All the snapshots are from the execution under Windows NT system.
a) Before starting the program, you have to create a directory in which all the data files you want to process exist. Be sure you have at least one data file in the directory. To run the program more robustly, do not create any subdirectories under this directory.
b) To start the program, double click the program icon to start it (Figure 2).
Figure 2. Initial RNAThink Interface
Figure 3. Open File Dialog box
c) To open a directory, click File ® Open, the file dialog box “Select Data Directory” will appear (Figure 3). Go to the directory with the files you want to process. Click on one of the files. Then click Open. By doing this the data directory is specified. You have to select a file for the program to get the data directory path information. That is the way the file dialog box works. However, choosing different files in the directory will not cause any difference to the data processing since only the directory path information is extracted by the program. The files under this directory will be listed in the display area (Figure 4). These are the files that the program tries to process. Files will be processed in alphabetic order.
Figure 4. List of files that will be tentatively processed
d) Processing the data. Click the button “Run” to start the data processing. If the input data files are in their proper format and no error occurs in processing the data, computation of normalized dilution values are completed. And, finally the results will be displayed (Figure 5).
Figure 5. Result Panel
There are, however, certain errors that may take place in processing of the data. Some of these errors provide the user with diagnostic messages:
A file is not in correct format (Figure 6), in which case the file will not be processed.
Figure 6. Error message for incorrect input file format
Or a file has nonnumeric characters in a data element position (Figure 7), in which case the data element will be discarded. Click “OK” to proceed.
Figure 7. Error message for non-numeric data
All processed files are listed. For each input file, there are two columns of results, one for average (abbreviated as “Avg”), one for standard deviation (abbreviated as “Std Dev”). Each pair of the values corresponds to a column of data set in the input data file. The above example shows that file “sample3.txt” has 12 data columns.
The first pair of average and standard deviation is always 1 and 0 because they are computed with the control data set.
In the above example, either file “sample3.txt” has an empty column of data in the second column position, or all its data elements in the second column are out of the range of the control data set (do not fit in any interval of the control data set). So the second pair of the result is empty. The third pair is 0.805 and 0.05 and the last pair is 0.394 and 0.012.
Figure 8. File Save Dialog
You can discard the computation result by clicking the button “CANCEL”. This will bring you back to the panel shown before the computation (with the button “RUN”). By clicking buttons “RUN” and “CANCEL”, you can switch between these two panels easily.
The display on the Mac System is somewhat different from that on the
Windows NT system because Tabs are displayed differently. However, when
opened by Microsoft Excel, the results in the two systems appear to be
the same.
e) Saving the result. You can save the result to a file only when the result panel (with the button “CANCEL” in Figure 5) is shown. Click File ® Save, the file dialog box “Save” will appear (Figure 8). Go to the directory that you want to save the result and type in the file name. You can also select a file name from the file list to overwrite the selected file with the new results. Click “Save” to save the results into the specified file. The result file would be in tab delimited text format. You can view the data in any spread sheet or word processing program. BACK TO TOP
RNA Think is a code that works on both PC and Mac computers.
a) Obtain a compiler (e.g. CodeWarrior) and Virtual Machine (can be downloaded from web) for your machine.
b) Obtain the source code for RNAThink.
c) Compile the source code “RnaThink.java” to get to “.class” files.
d) For PC: Execute the command “java RnaThink” at windows DOS prompt. Or, create a batch file that has “java RnaThink” as its only line (this batch file “.bat” should be double clickable).
e) For Mac: follow the instructions on “The New JBinary Method”, page 163, in the “CodeWarrior Targeting the JAVA VM From Mac OS” (in the green binder).
You need both VM and the compiled executable file to be able to run
the program. Note that VM is essential in allowing the machine to interpret
the JAVA code. BACK TO TOP