The CyDAS Application: Main Window (Form1)
The CyDAS main window is the start object of the CyDAS application.
Programming Language
- Microsoft Visual Basic .Net.
Availability
- Copyrighted but free software under the GNU Public License.
- Binaries and source code can be obtained from the Download section.
Internal Processing
The Start Process
The initialisation of a Form1 object means the start of the CyDAS application. In its constructor, further start up functions residing in the static class ConfigData are called. These functions read the CyDAS configuration file (CyDAS.ini) and the import filters; a database connection is established if configured. Indirectly, functions of the ChromosomeData class of the ISCNAnalyser are invoked, which load information on the chromosome set to be used, and determines the directory CyDAS resides in.
If an error occured during start up, the user is informed on the error, and CyDAS is shut down. Since the shut down cannot be done in the constructor, an object wide variable is set which is evaluated during the Form_Load handler.
Menu Availability Control
Some items of the menu depend on the availabity of a database or an Active Group.
During the object instantiation, the database availabilty is checked, and if none is available, the menus "File - Open", "File - New", "File - Open", "File - Close", "File - Import", and "File - Export" are disabled.
Furthermore, during the reorganisation of the main window (function "reorganizeMainWindow") which is also invoked in the Form_Resize handler, menus depending on an Active Group are enabled or disabled: "Edit", "Analyse", "Mine", and "Group".
Window Reorganisation
The Main Window contains a space for a tool bar (the tool bar is not yet implemented) and a status line which can be hidden or activated. The position of the items is calculated in the private function "reorganizeMainWindow" which also enables / disables some menus depending on the presence / absence of an active group.
If an active group is present, its short name is written into the status line.
Event Procedures
Generally, event procedures are envelloped into a try - catch wrapper. All exceptions caught by this wrapper are passed into ConfigData.handleException() which displays the error message to the user.
Handling of Dependent Windows
Most windows opened via the menu of the Main Window are shown non-modally, only those dealing with data editing are displayed modally.
References to windows dealing with aspects of the data evaluation are added into a collection of forms in ConfigData (function handleForm). This allows all forms to be closed when the active group is closed or changed.
Functions
Here, background information is given for some special functions.
Edit - Breakpoint search (Menu 15)
In contrast to other functions, a direct database access from the Main Window is present.
In a first query, all karyotypes with errors of the active group are selected and those with a missing break point error are stored in the private class BreakPointSmoothingStructure.
Next, karyotypes from investigations of the same reference (publication) are searched for. The Karyotypes.expand function then tries to add the missing break points. If break points could be added, the karyotypes are re-evaluated.
Furthermore, break points can be added via the user defined values in the ExpandAberrations table. A virtual karyotype is established containing all the (fully described) aberrations shown in the table. Next, all remaining karyotypes with errors of the active group are selected and those with a missing break point error are stored in the private class BreakPointSmoothingStructure. Now, break point search is done with the above virtual karyotype in the Karyotypes.expand function. Again, karyotypes may be re-evaluated.
Finally, the Active Group is re-set in order to make the changes available for further analysis.
Analyse - Gains and Losses / Structural Aberrations (Menus 21 and 22)
Both gains and losses as well as structural aberrations are displayed on the same form "frmGraphicalAnalysis". Before setting the data to be analysed proper, the "GraphType" property of the form is set accordingly.
Analyse - Cytoband List (Menu 23)
A report window is created. A GainsLossesStructs object is filled with the respective data from the Karyotypes objects in the application wide KaryotypesCollection (of ConfigData.ActiveGroup) and CGHs objects in the global CGHCollection (of ConfigData.ActiveGroup), and then printed in exact format into a string after a report header. This string is then passed into the Report window.
File - Close (Menu 30)
Upon close(), all windows pertaining to the previously active group are closed. Furthermore, the parameters for analysis and mining are reset to their default values.
Edit - Clean Up DB (Menu 40)
Here, a cleanUp call is sent to many database representing classes which will clean up the respective section of the database.